diff options
author | mkaruza <mario.karuza@galeracluster.com> | 2020-03-26 09:45:03 +0100 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-03-31 09:59:37 +0300 |
commit | 2d16452a31e7c2c99d191f34897e519928541cda (patch) | |
tree | fcbdfb9b7d6b4b9a1884644de47eaa7fd5363b80 /sql/wsrep_hton.cc | |
parent | 5001487632d60c2d0d9ce5c1be697c016813a994 (diff) | |
download | mariadb-git-2d16452a31e7c2c99d191f34897e519928541cda.tar.gz |
MDEV-22021: Galera database could get inconsistent with rollback to savepoint
When binlog is disabled, WSREP will not behave correctly when
SAVEPOINT ROLLBACK is executed since we don't register handlers for such case.
Fixed by registering WSREP handlerton for SAVEPOINT related commands.
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r-- | sql/wsrep_hton.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 7c154d6ce6f..459cd368355 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -219,32 +219,20 @@ static int wsrep_prepare(handlerton *hton, THD *thd, bool all) DBUG_RETURN(0); } +/* + Empty callbacks to support SAVEPOINT callbacks. +*/ + static int wsrep_savepoint_set(handlerton *hton, THD *thd, void *sv) { DBUG_ENTER("wsrep_savepoint_set"); - - if (thd->wsrep_exec_mode == REPL_RECV) - { - DBUG_RETURN(0); - } - - if (!wsrep_emulate_bin_log) DBUG_RETURN(0); - int rcode = wsrep_binlog_savepoint_set(thd, sv); - DBUG_RETURN(rcode); + DBUG_RETURN(0); } static int wsrep_savepoint_rollback(handlerton *hton, THD *thd, void *sv) { DBUG_ENTER("wsrep_savepoint_rollback"); - - if (thd->wsrep_exec_mode == REPL_RECV) - { - DBUG_RETURN(0); - } - - if (!wsrep_emulate_bin_log) DBUG_RETURN(0); - int rcode = wsrep_binlog_savepoint_rollback(thd, sv); - DBUG_RETURN(rcode); + DBUG_RETURN(0); } static int wsrep_rollback(handlerton *hton, THD *thd, bool all) |