mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-25089 : Assertion `error.len > 0' failed in galera::ReplicatorSMM::handle_apply_error()
Problem is that Galera starts TOI (total order isolation) i.e. it sends query to all nodes. Later it is discovered that used engine or other feature is not supported by Galera. Because TOI is executed parallelly in all nodes appliers could execute given TOI and ignore the error and start inconsistency voting causing node to leave from cluster or we might have a crash as reported. For example SEQUENCE engine does not support GEOMETRY data type causing either inconsistency between nodes (because some errors are ignored on applier) or crash. Fixed my adding new function wsrep_check_support to check can Galera support provided CREATE TABLE/SEQUENCE before TOI is started and if not clear error message is provided to the user. Currently, not supported cases: * CREATE TABLE ... AS SELECT when streaming replication is used * CREATE TABLE ... WITH SYSTEM VERSIONING AS SELECT * CREATE TABLE ... ENGINE=SEQUENCE * CREATE SEQUENCE ... ENGINE!=InnoDB * ALTER TABLE t ... ENGINE!=InnoDB where table t is SEQUENCE Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
committed by
Julius Goryavsky
parent
3228c08fa8
commit
daaa16a47f
@ -27,6 +27,9 @@
|
||||
#include "sql_acl.h"
|
||||
#ifdef WITH_WSREP
|
||||
#include "wsrep_mysqld.h"
|
||||
bool wsrep_check_sequence(THD* thd,
|
||||
const sequence_definition *seq,
|
||||
const bool used_engine);
|
||||
#endif
|
||||
|
||||
struct Field_definition
|
||||
@ -945,7 +948,8 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
|
||||
#ifdef WITH_WSREP
|
||||
if (WSREP(thd) && wsrep_thd_is_local(thd))
|
||||
{
|
||||
if (wsrep_check_sequence(thd, new_seq))
|
||||
const bool used_engine= lex->create_info.used_fields & HA_CREATE_USED_ENGINE;
|
||||
if (wsrep_check_sequence(thd, new_seq, used_engine))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
if (wsrep_to_isolation_begin(thd, first_table->db.str,
|
||||
|
Reference in New Issue
Block a user