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

MDEV-25228 JSON_TABLE: Server crashes in Query_cache::unlink_table.

JSON_TABLE shojldn't be counted in the query_cache.
This commit is contained in:
Alexey Botchkov
2021-03-24 15:05:24 +04:00
parent 7075955f4e
commit 707d8653c4
3 changed files with 18 additions and 2 deletions

View File

@ -4094,11 +4094,13 @@ Query_cache::process_and_count_tables(THD *thd, TABLE_LIST *tables_used,
*tables_type|= HA_CACHE_TBL_NONTRANSACT;
continue;
}
if (tables_used->derived)
if (tables_used->derived || tables_used->table_function)
{
DBUG_PRINT("qcache", ("table: %s", tables_used->alias.str));
table_count--;
DBUG_PRINT("qcache", ("derived table skipped"));
DBUG_PRINT("qcache", (tables_used->table_function ?
"table function skipped" :
"derived table skipped"));
continue;
}