summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/galera/t')
-rw-r--r--mysql-test/suite/galera/t/MDEV-26597.test32
-rw-r--r--mysql-test/suite/galera/t/MDEV-27123.opt2
-rw-r--r--mysql-test/suite/galera/t/MDEV-27123.test8
-rw-r--r--mysql-test/suite/galera/t/MDEV-29142.test73
-rw-r--r--mysql-test/suite/galera/t/galera_repl_max_ws_size.test2
-rw-r--r--mysql-test/suite/galera/t/galera_var_max_ws_size.test2
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf20
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test20
9 files changed, 158 insertions, 2 deletions
diff --git a/mysql-test/suite/galera/t/MDEV-26597.test b/mysql-test/suite/galera/t/MDEV-26597.test
new file mode 100644
index 00000000000..783a52cad50
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-26597.test
@@ -0,0 +1,32 @@
+--source include/galera_cluster.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--connection node_2
+CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 FLOAT(3,2));
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
+SET @@autocommit=0;
+INSERT INTO t3 VALUES (1000,0.00),(1001,0.25),(1002,0.50),(1003,0.75),(1008,1.00),(1009,1.25),(1010,1.50),(1011,1.75);
+--error ER_UNKNOWN_ERROR
+CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB;
+SHOW WARNINGS;
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--let $start_mysqld_params = ""
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+#
+# Cleanup
+#
+--source ../../galera/include/auto_increment_offset_restore.inc
+--connection node_1
+DROP TABLE t3;
+
+
diff --git a/mysql-test/suite/galera/t/MDEV-27123.opt b/mysql-test/suite/galera/t/MDEV-27123.opt
new file mode 100644
index 00000000000..1c4accb816a
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27123.opt
@@ -0,0 +1,2 @@
+--wsrep_auto_increment_control=OFF --auto_increment_increment=3 --auto_increment_offset=3
+
diff --git a/mysql-test/suite/galera/t/MDEV-27123.test b/mysql-test/suite/galera/t/MDEV-27123.test
new file mode 100644
index 00000000000..c2b682d6ded
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27123.test
@@ -0,0 +1,8 @@
+--source include/galera_cluster.inc
+
+show variables like 'auto_increment%';
+create table t4 (c1 int primary key auto_increment) engine=innodb;
+show variables like 'auto_increment%';
+alter table t4 add (c2 varchar(50));
+show variables like 'auto_increment%';
+DROP TABLE t4;
diff --git a/mysql-test/suite/galera/t/MDEV-29142.test b/mysql-test/suite/galera/t/MDEV-29142.test
new file mode 100644
index 00000000000..7e9776b005b
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-29142.test
@@ -0,0 +1,73 @@
+--source include/galera_cluster.inc
+--source include/have_sequence.inc
+--source include/force_restart.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
+--connection node_1
+call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*");
+call mtr.add_suppression("WSREP: Failed to apply write set:.*");
+call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*");
+
+--connection node_2
+call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
+call mtr.add_suppression("WSREP: Failed to open SR table for write");
+call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
+call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*");
+
+SET @@global.tx_read_only = ON;
+--error 0,1286
+SET default_storage_engine = SEQUENCE;
+--error 1005
+create table t1 (c1 int);
+CREATE TABLE t1(c1 VARCHAR(20)) engine=innodb;
+INSERT INTO t1 VALUES(0xA9B8);
+--error 1050
+create TABLE t1 (c1 int) engine=innodb;
+--error 1050
+create TABLE t1 (c1 int) engine=innodb;
+--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address`
+SET GLOBAL wsrep_on=OFF;
+SET GLOBAL wsrep_cluster_address='gcomm://';
+INSERT INTO t1 VALUES (1);
+SELECT 1;
+SELECT 1;
+COMMIT;
+
+#
+# Kill the entire cluster and restart
+#
+--echo # Killing cluster because we have messed with wsrep_cluster_address
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+--source include/kill_galera.inc
+
+--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat
+--let $start_mysqld_params = "--wsrep-new-cluster"
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--source include/start_mysqld.inc
+
+--connection node_2
+--let $start_mysqld_params = ""
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--source include/start_mysqld.inc
+
+call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
+call mtr.add_suppression("WSREP: Failed to open SR table for write");
+call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
+
+#
+# Cleanup
+#
+--source ../../galera/include/auto_increment_offset_restore.inc
+# We killed cluster, it might mean that table does not exists
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
diff --git a/mysql-test/suite/galera/t/galera_repl_max_ws_size.test b/mysql-test/suite/galera/t/galera_repl_max_ws_size.test
index 60b866ae018..2e29a030664 100644
--- a/mysql-test/suite/galera/t/galera_repl_max_ws_size.test
+++ b/mysql-test/suite/galera/t/galera_repl_max_ws_size.test
@@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 VARCHAR(512)) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
---error ER_ERROR_DURING_COMMIT
+--error ER_UNKNOWN_ERROR
INSERT INTO t1 VALUES (REPEAT('a', 512));
SELECT COUNT(*) = 0 FROM t1;
diff --git a/mysql-test/suite/galera/t/galera_var_max_ws_size.test b/mysql-test/suite/galera/t/galera_var_max_ws_size.test
index 8eb93bda9be..9444b8f2c4d 100644
--- a/mysql-test/suite/galera/t/galera_var_max_ws_size.test
+++ b/mysql-test/suite/galera/t/galera_var_max_ws_size.test
@@ -12,7 +12,7 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 VARCHAR(1024)) Engine
--let $wsrep_max_ws_size_orig = `SELECT @@wsrep_max_ws_size`
SET GLOBAL wsrep_max_ws_size = 1024;
---error ER_ERROR_DURING_COMMIT
+--error ER_UNKNOWN_ERROR
INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
SELECT COUNT(*) = 0 FROM t1;
diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt
new file mode 100644
index 00000000000..99c5889916b
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6-master.opt
@@ -0,0 +1 @@
+--wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify_ssl.sh --wsrep-sync-wait=0
diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf
new file mode 100644
index 00000000000..ce121d20e03
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.cnf
@@ -0,0 +1,20 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
+ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem
+ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
+bind-address=::
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_node_incoming_address='[::1]:@mysqld.1.port'
+wsrep_node_address=::1
+wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
+
+[mysqld.2]
+wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port;gcache.size=1;pc.ignore_sb=true'
+wsrep_node_address=::1
+wsrep_node_incoming_address='[::1]:@mysqld.2.port'
+wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
diff --git a/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test
new file mode 100644
index 00000000000..2c2b106c2ae
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_notify_ssl_ipv6.test
@@ -0,0 +1,20 @@
+#
+# Test wsrep_notify_cmd. We use a version of the support-files/wsrep_notify.sh script that writes
+# notifications into a table.
+#
+
+--source include/galera_cluster.inc
+--source include/have_ssl_communication.inc
+--source include/check_ipv6.inc
+--source include/force_restart.inc
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
+--source include/wait_condition.inc
+
+SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership;
+SELECT MAX(size) AS EXPECT_2 FROM mtr_wsrep_notify.status;
+SELECT COUNT(DISTINCT idx) AS EXPECT_2 FROM mtr_wsrep_notify.status;
+
+# CLEANUP
+DROP SCHEMA mtr_wsrep_notify;