1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-24975 Server consumes extra 4G memory upon querying INFORMATION_SCHEMA.OPTIIMIZER_TRACE

if a query used no fields from an I_S table, we were creating a temp
table with one, first, field (as a table cannot have zero fields),
with its length truncated to 1.

Now - force also this dummy field to be a normal field, not a BLOB
This commit is contained in:
Sergei Golubchik
2021-03-07 01:53:52 +01:00
parent f24038b851
commit 01a0d739c8
3 changed files with 23 additions and 0 deletions

View File

@ -8767,6 +8767,7 @@ bool optimize_schema_tables_memory_usage(List<TABLE_LIST> &tables)
{
/* all fields were optimized away. Force a non-0-length row */
table->s->reclength= to_recinfo->length= 1;
to_recinfo->type= FIELD_NORMAL;
to_recinfo++;
}
p->recinfo= to_recinfo;