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 Elkin <andrei.elkin@mariadb.com>2021-10-28 21:44:04 +0300
commit185ac56cd32f8a3e0eef25964f8afae62c7f67b1 (patch)
tree3507d64cfff88fa69fc0f11fa3ec17dea791b733 /sql/sql_class.h
parenta8ded395578ccab9c256b9beee7e62d4ada08522 (diff)
downloadmariadb-git-bb-10.5-MDEV-26833-andrei.tar.gz
MDEV-26833 Missed statement rollback in case transaction drops or create temporary tablebb-10.5-MDEV-26833-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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 7aac98eccb2..03c1bf0d418 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -5154,8 +5154,9 @@ 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::DROPPED_TEMP_TABLE | THD_TRANS::DID_DDL |
+ (THD_TRANS::MODIFIED_NON_TRANS_TABLE |
+ THD_TRANS::DID_WAIT | THD_TRANS::CREATED_TEMP_TABLE |
+
THD_TRANS::EXECUTED_TABLE_ADMIN_CMD));
}