1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-30388 : Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted' failed

Problem for Galera is the fact that sequences are not really
transactional. Sequence operation is committed immediately
in sql_sequence.cd and later Galera could find out that
we have changes but actual statement is not there anymore.

Therefore, we must make some restrictions what kind
of sequences Galera can support.

(1) Galera cluster supports only sequences implemented
by InnoDB storage engine. This is because Galera replication
supports currently only InnoDB.

(2) We do not allow LOCK TABLE on sequence object and
we do not allow sequence creation under LOCK TABLE, instead
lock is released and we issue warning.

(3) We allow sequences with NOCACHE definition or with
INCREMEMENT BY 0 CACHE=n definition. This makes sure that
sequence values are unique accross Galera cluster.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
Jan Lindström
2023-05-10 08:42:37 +03:00
committed by Julius Goryavsky
parent de703a2b21
commit 28eaf66e18
13 changed files with 516 additions and 74 deletions

View File

@ -285,4 +285,8 @@ extern mysql_mutex_t LOCK_gdl;
bool check_engine(THD *, const char *, const char *, HA_CREATE_INFO *);
#ifdef WITH_WSREP
bool wsrep_check_sequence(THD* thd, const sequence_definition *seq);
#endif
#endif /* SQL_TABLE_INCLUDED */