diff options
author | Andrei Elkin <andrei.elkin@mariadb.com> | 2021-10-25 18:25:03 +0300 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@mariadb.com> | 2021-10-28 19:54:03 +0300 |
commit | 42ae765960869a7ce381341d7b98c1e8aa157b29 (patch) | |
tree | 3dff06a0dccc6473a8baf05fdb1cdf265659da88 /sql/sql_class.h | |
parent | 4e5cf34819f80b5184cce371d2ec95f83e597ef8 (diff) | |
download | mariadb-git-42ae765960869a7ce381341d7b98c1e8aa157b29.tar.gz |
MDEV-26833 Missed statement rollback in case transaction drops or create temporary tablebb-10.2-andrei
When transaction creates or drops temporary tables and afterward its statement
faces an error even the transactional table statement's cached ROW
format events get involved into binlog and are visible after the transaction's commit.
Fixed with proper analysis of whether the errored-out statement needs
to be rolled back in binlog.
For instance a fact of already cached CREATE or DROP for temporary
tables by previous statements alone
does not cause to retain the being errored-out statement events in the
cache.
Conversely, if the statement creates or drops a temporary table
itself it can't be rolled back - this rule remains.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 5f871f9caf6..a767a34d869 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -4524,7 +4524,8 @@ public: transaction.all.modified_non_trans_table= TRUE; transaction.all.m_unsafe_rollback_flags|= (transaction.stmt.m_unsafe_rollback_flags & - (THD_TRANS::DID_WAIT | THD_TRANS::CREATED_TEMP_TABLE | + (THD_TRANS::MODIFIED_NON_TRANS_TABLE | + THD_TRANS::DID_WAIT | THD_TRANS::CREATED_TEMP_TABLE | THD_TRANS::DROPPED_TEMP_TABLE | THD_TRANS::DID_DDL | THD_TRANS::EXECUTED_TABLE_ADMIN_CMD)); } |