mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
MDEV-36469 don't check is_infoschema_db for null db
The is_infoschema_db is a deep character set based comparision. In in many cases the db is still an empty structure. Doing this comparion early prevents a UBSAN error by not performing character set operations on a null pointer.
This commit is contained in:
@@ -8111,7 +8111,8 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
DBUG_RETURN(0);
|
||||
else
|
||||
fqtn= FALSE;
|
||||
bool info_schema= is_infoschema_db(&db);
|
||||
bool info_schema= (db.is_null() || db.is_empty())
|
||||
? false : is_infoschema_db(&db);
|
||||
if (!table->sel && info_schema &&
|
||||
(table_options & TL_OPTION_UPDATING) &&
|
||||
/* Special cases which are processed by commands itself */
|
||||
|
Reference in New Issue
Block a user