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:
@ -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;
|
||||
|
Reference in New Issue
Block a user