mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-12466 : Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || ...
When "FLUSH TABLE ... FOR EXPORT" fails, the SQL layer should rollback the statement. Otherwise we hit an assert when we try to close the tables while having a non-empty list of statement transaction participants.
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
#include "sql_show.h"
|
||||
#include "debug_sync.h"
|
||||
#include "des_key_file.h"
|
||||
#include "transaction.h"
|
||||
|
||||
static void disable_checkpoints(THD *thd);
|
||||
|
||||
@ -593,6 +594,7 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables)
|
||||
return FALSE;
|
||||
|
||||
error_reset_bits:
|
||||
trans_rollback_stmt(thd);
|
||||
close_thread_tables(thd);
|
||||
thd->variables.option_bits&= ~OPTION_TABLE_LOCK;
|
||||
error:
|
||||
|
Reference in New Issue
Block a user