mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-35510 ASAN build crashes during bootstrap
Avoid ASAN failure by collecting statistics from Result objects before cleaning them up. In related single-table cases, statistics are maintained directly by the single-table update and delete functions.
This commit is contained in:
committed by
Dave Gosselin
parent
6cff704e57
commit
d3c9a2ee21
@@ -366,7 +366,7 @@ bool Sql_cmd_update::update_single_table(THD *thd)
|
||||
ha_rows dup_key_found;
|
||||
bool need_sort= TRUE;
|
||||
bool reverse= FALSE;
|
||||
ha_rows updated, updated_or_same, found;
|
||||
ha_rows updated_or_same;
|
||||
key_map old_covering_keys;
|
||||
TABLE *table;
|
||||
SQL_SELECT *select= NULL;
|
||||
@@ -3140,6 +3140,13 @@ bool Sql_cmd_update::execute_inner(THD *thd)
|
||||
|
||||
if (result)
|
||||
{
|
||||
/* In single table case, this->updated set by update_single_table */
|
||||
if (res && multitable)
|
||||
{
|
||||
found= ((multi_update*)get_result())->num_found();
|
||||
updated= ((multi_update*)get_result())->num_updated();
|
||||
}
|
||||
|
||||
res= false;
|
||||
delete result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user