1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00
Files
mariadb/mysql-test/suite/galera/r/wsrep_mode_strict_replication.result
mkaruza 95a2bca01f MDEV-20008: Galera strict mode
Added new enum variable `wsrep_mode` which can be used to turn on WSREP
features which are not part of default behaviour.
Added enum `BINLOG_ROW_FORMAT_ONLY`, `REQUIRED_PRIMARY_KEY` and
`STRICT_REPLICATION`. `wsrep-mode=STRICT_REPLICATION` behaves
like variable `wsrep_strict_ddl`.

Variable wsrep_strict_ddl is deprecated and if set we use
new wsrep_mode setting instead.

Reviewed and improved by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-01-26 14:02:24 +02:00

195 lines
5.7 KiB
Plaintext

connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
connection node_1;
SET GLOBAL binlog_format='ROW';
create table before_t1(a int, count int, b int, key(b)) engine=Aria;
INSERT INTO before_t1 values (1,1,1);
SET @@global.wsrep_mode=STRICT_REPLICATION;
select @@global.wsrep_mode;
@@global.wsrep_mode
STRICT_REPLICATION
connection node_2;
SET @@global.wsrep_mode=STRICT_REPLICATION;
select @@global.wsrep_mode;
@@global.wsrep_mode
STRICT_REPLICATION
connection node_1;
CREATE TABLE t1(a int) engine=Aria;
ERROR HY000: Galera replication not supported
SHOW WARNINGS;
Level Code Message
Error 4165 Galera replication not supported
Warning 1031 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria not supported.
connection node_2;
SHOW CREATE TABLE t1;
ERROR 42S02: Table 'test.t1' doesn't exist
connection node_1;
CREATE TABLE t2(a int not null primary key) engine=InnoDB;
ALTER TABLE t2 engine=MyISAM;
ERROR HY000: Galera replication not supported
SHOW WARNINGS;
Level Code Message
Error 4165 Galera replication not supported
Warning 1031 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM not supported.
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection node_2;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection node_1;
TRUNCATE TABLE before_t1;
ERROR HY000: Galera replication not supported
SELECT * FROM before_t1;
a count b
1 1 1
connection node_2;
SET SESSION wsrep_sync_wait=15;
SELECT @@wsrep_sync_wait;
@@wsrep_sync_wait
15
SELECT * FROM before_t1;
a count b
connection node_1;
CREATE VIEW x1 AS SELECT * FROM before_t1;
ERROR HY000: Galera replication not supported
SHOW CREATE VIEW x1;
ERROR 42S02: Table 'test.x1' doesn't exist
connection node_2;
SHOW CREATE VIEW x1;
ERROR 42S02: Table 'test.x1' doesn't exist
connection node_1;
CREATE DEFINER=`root`@`localhost` TRIGGER increment_before_t1
AFTER INSERT ON before_t1 FOR EACH ROW
UPDATE before_t1 SET before_t1.count = before_t1.count+1;
ERROR HY000: Galera replication not supported
SHOW CREATE TRIGGER increment_before_t1;
ERROR HY000: Trigger does not exist
connection node_2;
SHOW CREATE TRIGGER increment_before_t1;
ERROR HY000: Trigger does not exist
connection node_1;
CREATE INDEX xx2 ON before_t1(a);
ERROR HY000: Galera replication not supported
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
DROP INDEX b ON before_t1;
ERROR HY000: Galera replication not supported
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
ALTER TABLE before_t1 ADD COLUMN f int;
ERROR HY000: Galera replication not supported
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
RENAME TABLE before_t1 to after_t1;
ERROR HY000: Galera replication not supported
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
SHOW CREATE TABLE after_t1;
ERROR 42S02: Table 'test.after_t1' doesn't exist
connection node_2;
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
SHOW CREATE TABLE after_t1;
ERROR 42S02: Table 'test.after_t1' doesn't exist
connection node_1;
DROP TABLE before_t1;
ERROR HY000: Galera replication not supported
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_2;
SHOW CREATE TABLE before_t1;
Table Create Table
before_t1 CREATE TABLE `before_t1` (
`a` int(11) DEFAULT NULL,
`count` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `b` (`b`)
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
connection node_1;
set @@global.wsrep_mode=default;
select @@global.wsrep_mode;
@@global.wsrep_mode
connection node_2;
set @@global.wsrep_mode=default;
select @@global.wsrep_mode;
@@global.wsrep_mode
DROP TABLE t2;
DROP TABLE before_t1;