Skip to content

Commit

Permalink
MDEV-27673 Warning after "select progress from information_schema.pro…
Browse files Browse the repository at this point in the history
…cesslist"

after moving fields in optimize_schema_tables_memory_usage()
store default values into their new, moved, locations.
  • Loading branch information
vuvova committed Apr 5, 2022
1 parent cf8d30e commit 2d2c3da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions mysql-test/main/information_schema.result
Original file line number Diff line number Diff line change
Expand Up @@ -2370,5 +2370,11 @@ DROP TABLE t1;
DROP TABLE t1;
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
#
5 changes: 4 additions & 1 deletion mysql-test/main/information_schema.test
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,10 @@ DROP TABLE t1;
DROP TABLE t1;
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 # End of 10.3 tests
Expand Down
2 changes: 2 additions & 0 deletions sql/sql_show.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8803,6 +8803,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
if (bitmap_is_set(table->read_set, i))
{
field->move_field(cur);
field->reset();
*to_recinfo++= *from_recinfo;
cur+= from_recinfo->length;
}
Expand All @@ -8823,6 +8824,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
table->s->reclength= to_recinfo->length= 1;
to_recinfo++;
}
store_record(table, s->default_values);
p->recinfo= to_recinfo;

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

0 comments on commit 2d2c3da

Please sign in to comment.