mirror of
https://github.com/MariaDB/server.git
synced 2025-02-12 00:15:35 +01:00
![Jan Lindström](/assets/img/avatar_default.png)
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>
23 lines
835 B
Text
23 lines
835 B
Text
connection node_2;
|
|
connection node_1;
|
|
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY (10), c3 DATETIME);
|
|
SELECT get_lock ('test2', 0);
|
|
get_lock ('test2', 0)
|
|
1
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (c1 SMALLINT NOT NULL AUTO_INCREMENT PRIMARY KEY);
|
|
INSERT INTO t1 VALUES (1);
|
|
SET SESSION wsrep_trx_fragment_size=10;
|
|
SET SESSION autocommit=0;
|
|
SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
|
|
c1
|
|
INSERT INTO t1 VALUES (4),(3),(1),(2);
|
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
|
|
ERROR 42000: This version of MariaDB doesn't yet support 'non-InnoDB sequences in Galera cluster'
|
|
ALTER TABLE t1 DROP COLUMN c2;
|
|
ERROR 42000: Can't DROP COLUMN `c2`; check that it exists
|
|
SELECT get_lock ('test', 1.5);
|
|
get_lock ('test', 1.5)
|
|
1
|
|
DROP TABLE t1;
|