mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge remote-tracking branch 'origin/11.2' into 11.4
This commit is contained in:
@@ -536,6 +536,12 @@ bool Sql_cmd_delete::delete_from_single_table(THD *thd)
|
||||
if (thd->binlog_for_noop_dml(transactional_table))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (!thd->lex->current_select->leaf_tables_saved)
|
||||
{
|
||||
thd->lex->current_select->save_leaf_tables(thd);
|
||||
thd->lex->current_select->leaf_tables_saved= true;
|
||||
}
|
||||
|
||||
my_ok(thd, 0);
|
||||
DBUG_RETURN(0); // Nothing to delete
|
||||
}
|
||||
@@ -908,10 +914,10 @@ cleanup:
|
||||
query_cache_invalidate3(thd, table_list, 1);
|
||||
}
|
||||
|
||||
if (thd->lex->current_select->first_cond_optimization)
|
||||
if (!thd->lex->current_select->leaf_tables_saved)
|
||||
{
|
||||
thd->lex->current_select->save_leaf_tables(thd);
|
||||
thd->lex->current_select->first_cond_optimization= 0;
|
||||
thd->lex->current_select->leaf_tables_saved= true;
|
||||
}
|
||||
|
||||
delete deltempfile;
|
||||
|
Reference in New Issue
Block a user