summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorAndrei Elkin <andrei.elkin@mariadb.com>2021-10-25 18:25:03 +0300
committerAndrei <andrei.elkin@mariadb.com>2021-11-05 19:33:28 +0200
commit561b6c7e513abc4ceba263252b519bf715ce80f4 (patch)
tree1a820c0a1abf2ef87bd681fe78f2d1297d92f5c8 /sql/sql_class.h
parente571eaae9fb6587932f8d191380b7f289a5f40a0 (diff)
downloadmariadb-git-561b6c7e513abc4ceba263252b519bf715ce80f4.tar.gz
MDEV-26833 Missed statement rollback in case transaction drops or create temporary tablemariadb-10.2.41
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.h3
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));
}