Commit 2d2c3da8 authored by Sergei Golubchik's avatar Sergei Golubchik

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.
parent cf8d30ef
...@@ -2370,5 +2370,11 @@ DROP TABLE t1; ...@@ -2370,5 +2370,11 @@ DROP TABLE t1;
DROP TABLE t1; DROP TABLE t1;
SET SQL_MODE=DEFAULT; SET SQL_MODE=DEFAULT;
# #
# MDEV-27673 Warning after "select progress from information_schema.processlist"
#
select progress from information_schema.processlist limit 1;
progress
0.000
#
# End of 10.3 tests # End of 10.3 tests
# #
...@@ -2104,7 +2104,10 @@ DROP TABLE t1; ...@@ -2104,7 +2104,10 @@ DROP TABLE t1;
DROP TABLE t1; DROP TABLE t1;
SET SQL_MODE=DEFAULT; SET SQL_MODE=DEFAULT;
--echo #
--echo # MDEV-27673 Warning after "select progress from information_schema.processlist"
--echo #
select progress from information_schema.processlist limit 1;
--echo # --echo #
--echo # End of 10.3 tests --echo # End of 10.3 tests
......
...@@ -8803,6 +8803,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables) ...@@ -8803,6 +8803,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
if (bitmap_is_set(table->read_set, i)) if (bitmap_is_set(table->read_set, i))
{ {
field->move_field(cur); field->move_field(cur);
field->reset();
*to_recinfo++= *from_recinfo; *to_recinfo++= *from_recinfo;
cur+= from_recinfo->length; cur+= from_recinfo->length;
} }
...@@ -8823,6 +8824,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables) ...@@ -8823,6 +8824,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
table->s->reclength= to_recinfo->length= 1; table->s->reclength= to_recinfo->length= 1;
to_recinfo++; to_recinfo++;
} }
store_record(table, s->default_values);
p->recinfo= to_recinfo; p->recinfo= to_recinfo;
// TODO switch from Aria to Memory if all blobs were optimized away? // TODO switch from Aria to Memory if all blobs were optimized away?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment