mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-22063 : Assertion `0' failed in wsrep::transaction::before_rollback
Problem was that REPLACE was using consistency check that started TOI and we tried to rollback it. Do not use wsrep_before_rollback and wsrep_after_rollback if we are runing consistency check because no writeset keys are in that case added. Do not allow consistency check usage if table storage for target table is not InnoDB, instead give warning. REPLACE|SELECT INTO ... SELECT will use now TOI if table storage for target table is not InnoDB to maintain consistency between galera nodes. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
committed by
Julius Goryavsky
parent
112eb14f7e
commit
3228c08fa8
@ -1940,8 +1940,11 @@ int ha_rollback_trans(THD *thd, bool all)
|
||||
}
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
(void) wsrep_before_rollback(thd, all);
|
||||
// REPLACE|INSERT INTO ... SELECT uses TOI in consistency check
|
||||
if (thd->wsrep_consistency_check != CONSISTENCY_CHECK_RUNNING)
|
||||
(void) wsrep_before_rollback(thd, all);
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
if (ha_info)
|
||||
{
|
||||
/* Close all cursors that can not survive ROLLBACK */
|
||||
@ -1977,8 +1980,12 @@ int ha_rollback_trans(THD *thd, bool all)
|
||||
thd->thread_id, all?"TRUE":"FALSE", wsrep_thd_query(thd),
|
||||
thd->get_stmt_da()->message(), is_real_trans);
|
||||
}
|
||||
(void) wsrep_after_rollback(thd, all);
|
||||
|
||||
// REPLACE|INSERT INTO ... SELECT uses TOI in consistency check
|
||||
if (thd->wsrep_consistency_check != CONSISTENCY_CHECK_RUNNING)
|
||||
(void) wsrep_after_rollback(thd, all);
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
/* Always cleanup. Even if nht==0. There may be savepoints. */
|
||||
if (is_real_trans)
|
||||
{
|
||||
|
Reference in New Issue
Block a user