mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-18300: ASAN error in Field_blob::get_key_image upon UPDATE with subquery
For single table updates and multi-table updates , engine independent statistics were not being read even if the statistics were collected. Fixed it, so when the optimizer_use_condition_selectivity > 2 then we would read the available statistics for update queries.
This commit is contained in:
@ -301,6 +301,8 @@ int mysql_update(THD *thd,
|
||||
if (lock_tables(thd, table_list, table_count, 0))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
(void) read_statistics_for_tables_if_needed(thd, table_list);
|
||||
|
||||
if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT))
|
||||
DBUG_RETURN(1);
|
||||
if (table_list->handle_derived(thd->lex, DT_PREPARE))
|
||||
@ -1540,6 +1542,7 @@ int mysql_multi_update_prepare(THD *thd)
|
||||
{
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
(void) read_statistics_for_tables_if_needed(thd, table_list);
|
||||
/* @todo: downgrade the metadata locks here. */
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user