Skip to content

Commit 2d2c3da

Browse files
committed
MDEV-27673 Warning after "select progress from information_schema.processlist"
after moving fields in optimize_schema_tables_memory_usage() store default values into their new, moved, locations.
1 parent cf8d30e commit 2d2c3da

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

mysql-test/main/information_schema.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,5 +2370,11 @@ DROP TABLE t1;
23702370
DROP TABLE t1;
23712371
SET SQL_MODE=DEFAULT;
23722372
#
2373+
# MDEV-27673 Warning after "select progress from information_schema.processlist"
2374+
#
2375+
select progress from information_schema.processlist limit 1;
2376+
progress
2377+
0.000
2378+
#
23732379
# End of 10.3 tests
23742380
#

mysql-test/main/information_schema.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,10 @@ DROP TABLE t1;
21042104
DROP TABLE t1;
21052105
SET SQL_MODE=DEFAULT;
21062106

2107-
2107+
--echo #
2108+
--echo # MDEV-27673 Warning after "select progress from information_schema.processlist"
2109+
--echo #
2110+
select progress from information_schema.processlist limit 1;
21082111

21092112
--echo #
21102113
--echo # End of 10.3 tests

sql/sql_show.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8803,6 +8803,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
88038803
if (bitmap_is_set(table->read_set, i))
88048804
{
88058805
field->move_field(cur);
8806+
field->reset();
88068807
*to_recinfo++= *from_recinfo;
88078808
cur+= from_recinfo->length;
88088809
}
@@ -8823,6 +8824,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
88238824
table->s->reclength= to_recinfo->length= 1;
88248825
to_recinfo++;
88258826
}
8827+
store_record(table, s->default_values);
88268828
p->recinfo= to_recinfo;
88278829

88288830
// TODO switch from Aria to Memory if all blobs were optimized away?

0 commit comments

Comments
 (0)