1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.4' into mariadb-10.4.33

This commit is contained in:
Oleksandr Byelkin
2024-02-06 15:58:12 +01:00
57 changed files with 1059 additions and 366 deletions

View File

@@ -13,7 +13,6 @@
galera_as_slave_ctas : MDEV-28378 timeout
galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
galera_shutdown_nonprim : MDEV-32635 galera_shutdown_nonprim: mysql_shutdown failed
versioning_trx_id : MDEV-18590 : galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()

View File

@@ -3,21 +3,21 @@ connection node_1;
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
--- CTAS with empty result set ---
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
CREATE TABLE t2 SELECT * FROM t1;
connection node_1;
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
TRUNCATE TABLE t1;
connection con1;
ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC = 'RESET';
--- CTAS with non-empty result set ---
INSERT INTO t1 VALUES (10), (20), (30);
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
CREATE TABLE t2 SELECT * FROM t1;
connection node_1;
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
TRUNCATE TABLE t1;
connection con1;
ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC = 'RESET';

View File

@@ -14,7 +14,7 @@ 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 42S01: Table 't1' already exists
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);

View File

@@ -0,0 +1,34 @@
connection node_2;
connection node_1;
connection node_1;
SET GLOBAL wsrep_load_data_splitting=ON;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SET GLOBAL wsrep_replicate_myisam=ON;
CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
Warnings:
Warning 1235 wsrep_load_data_splitting for other than InnoDB tables
SELECT COUNT(*) AS EXPECT_6 FROM t1;
EXPECT_6
6
connection node_2;
SELECT COUNT(*) AS EXPECT_6 FROM t1;
EXPECT_6
6
connection node_1;
ALTER TABLE t1 ENGINE=InnoDB;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
SELECT COUNT(*) AS EXPECT_12 FROM t1;
EXPECT_12
12
connection node_2;
SELECT COUNT(*) AS EXPECT_12 FROM t1;
EXPECT_12
12
connection node_1;
DROP TABLE t1;
SET GLOBAL wsrep_load_data_splitting=OFF;
Warnings:
Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
SET GLOBAL wsrep_replicate_myisam=OFF;

View File

@@ -1,7 +1,8 @@
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET @wsrep_slave_threads_orig = @@wsrep_slave_threads;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
# Set slave threads to 10 step 1
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
@@ -9,7 +10,7 @@ EXPECT_10
10
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (NULL);
connection node_1;
# Wait until one of the appliers has exited
SELECT VARIABLE_VALUE AS EXPECT_9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
@@ -27,33 +28,14 @@ EXPECT_20
20
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
connection node_1;
# Wait until 19 of the appliers has exited
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
EXPECT_1
1
SELECT COUNT(*) FROM t1;
COUNT(*)
20
SELECT COUNT(*) AS EXPECT_51 FROM t1;
EXPECT_51
51
SET GLOBAL wsrep_slave_threads = 10;
# Set slave threads to 10 step 3
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
@@ -62,22 +44,12 @@ EXPECT_10
connection node_1;
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
INSERT INTO t1 VALUES (21);
INSERT INTO t1 VALUES (22);
INSERT INTO t1 VALUES (23);
INSERT INTO t1 VALUES (24);
INSERT INTO t1 VALUES (25);
INSERT INTO t1 VALUES (26);
INSERT INTO t1 VALUES (27);
INSERT INTO t1 VALUES (28);
INSERT INTO t1 VALUES (29);
INSERT INTO t1 VALUES (30);
connection node_1;
# Wait until slave threads back to 1
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
EXPECT_1
1
SELECT COUNT(*) FROM t1;
COUNT(*)
30
SELECT COUNT(*) AS EXPECT_101 FROM t1;
EXPECT_101
101
DROP TABLE t1;

View File

@@ -1,44 +1,68 @@
connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (2, 'a');
connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
SET SESSION wsrep_sync_wait=0;
LOCK TABLE t2 WRITE;
connection node_1;
SET @@debug_dbug = "d,sync.wsrep_before_mdl_wait";
SET DEBUG_SYNC= 'wsrep_before_mdl_wait SIGNAL before_mdl_wait WAIT_FOR mdl_wait_continue';
SELECT * FROM t2;;
connection node_1a;
# Wait until select is blocked before MDL lock wait
SET DEBUG_SYNC= 'now WAIT_FOR before_mdl_wait';
connection node_1a;
SET @@debug_dbug = "d,sync.wsrep_after_BF_victim_lock";
connection node_2;
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
connection node_1a;
SET @@debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1b;
SET SESSION wsrep_sync_wait=0;
# Wait for conflicting update to block
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1c;
connection node_1a;
SET DEBUG_SYNC = "now SIGNAL BF_victim_continue";
UNLOCK TABLES;
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
COUNT(*) = 1
connection node_1;
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
EXPECT_1
1
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
COUNT(*) = 1
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
EXPECT_1
1
SELECT * FROM t1;
f1 f2
1 c
2 a
connection node_2;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
COUNT(*) = 1
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
EXPECT_1
1
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
COUNT(*) = 1
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
EXPECT_1
1
SELECT * FROM t1;
f1 f2
1 c
2 a
DROP TABLE t1;
DROP TABLE t2;
connection node_1a;
SET DEBUG_SYNC = "RESET";
connection node_1b;
SET DEBUG_SYNC = "RESET";
connection node_1;
disconnect node_1a;
disconnect node_1b;
disconnect node_1c;

View File

@@ -1,5 +1,6 @@
connection node_2;
connection node_1;
SET GLOBAL wsrep_replicate_myisam=ON;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2), (3);
@@ -14,14 +15,37 @@ UPDATE t1 SET f1 = 9;
UPDATE t2 SET f1 = 9 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 9;
DELETE FROM t2 WHERE f1 = 9;
TRUNCATE TABLE t1;
TRUNCATE TABLE t1;
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
2
3
4
5
6
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
2
3
4
5
6
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
connection node_2;
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
connection node_1;
SET GLOBAL wsrep_replicate_myisam=OFF;
DROP TABLE t1;
DROP TABLE t2;

View File

@@ -0,0 +1,12 @@
connection node_2;
connection node_1;
SET GLOBAL wsrep_ignore_apply_errors=0;
SET SESSION AUTOCOMMIT=0;
SET SESSION max_error_count=0;
CREATE TABLE t0 (id GEOMETRY,parent_id GEOMETRY)ENGINE=SEQUENCE;
ERROR 42000: This version of MariaDB doesn't yet support 'non-InnoDB sequences in Galera cluster'
connection node_2;
SHOW CREATE TABLE t0;
ERROR 42S02: Table 'test.t0' doesn't exist
connection node_1;
SET GLOBAL wsrep_ignore_apply_errors=DEFAULT;

View File

@@ -5,7 +5,12 @@ connection node_2;
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.weight=2';
connection node_2;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
connection node_1;
connection node_2;
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.weight = 1';

View File

@@ -0,0 +1,242 @@
connection node_2;
connection node_1;
# Case 1 CREATE SEQUENCE with no NOCACHE
CREATE SEQUENCE s ENGINE=InnoDB;
ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster'
CREATE SEQUENCE s NOCACHE ENGINE=InnoDB;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
START TRANSACTION;
REPLACE INTO s VALUES (1,1,9223372036854775806,1,1,1000,0,0);
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
SELECT * FROM t1;
a
SELECT * FROM s;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 1000 0 0
connection node_2;
SELECT * FROM t1;
a
SELECT * FROM s;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 1000 0 0
connection node_1;
DROP TABLE t1;
DROP SEQUENCE s;
# Case 2 REPLACE INTO ... SELECT with error
CREATE TABLE t (id INT KEY,a YEAR,INDEX (id,a)) engine=innodb;
REPLACE INTO t (id,a)SELECT /*!99997 */ 1;
ERROR 21S01: Column count doesn't match value count at row 1
REPLACE INTO t (id,a)SELECT /*!99997 */ 1,2;
SELECT * FROM t;
id a
1 2002
CREATE TABLE t2 (id INT KEY,a YEAR,INDEX (id,a)) engine=myisam;
REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1;
ERROR 21S01: Column count doesn't match value count at row 1
REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1,2;
Warnings:
Warning 138 Galera cluster does support consistency check only for InnoDB tables.
SELECT * FROM t2;
id a
1 2002
CREATE TABLE t3 (id INT KEY,a YEAR,INDEX (id,a)) engine=aria;
REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1;
ERROR 21S01: Column count doesn't match value count at row 1
REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1,2;
Warnings:
Warning 138 Galera cluster does support consistency check only for InnoDB tables.
SELECT * FROM t3;
id a
1 2002
connection node_2;
SELECT * FROM t;
id a
1 2002
SELECT * FROM t2;
id a
1 2002
SELECT * FROM t3;
id a
1 2002
connection node_1;
DROP TABLE t,t2,t3;
# Bigger REPLACE ... AS SELECT test
SET GLOBAL wsrep_replicate_myisam=ON;
CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
REPLACE INTO t4 SELECT * FROM t1;
REPLACE INTO t5 SELECT * FROM t2;
REPLACE INTO t6 SELECT * FROM t3;
REPLACE INTO t7 SELECT * FROM t2;
REPLACE INTO t8 SELECT * FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
EXPECT_1000
1000
connection node_2;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
EXPECT_1000
1000
connection node_1;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
# Bigger INSERT INTO ... SELECT test
CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t4 SELECT * FROM t1;
INSERT INTO t5 SELECT * FROM t2;
INSERT INTO t6 SELECT * FROM t3;
INSERT INTO t7 SELECT * FROM t2;
INSERT INTO t8 SELECT * FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
EXPECT_1000
1000
connection node_2;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
EXPECT_1000
1000
connection node_1;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
CREATE TABLE t1(pk int not null primary key) engine=innodb;
INSERT INTO t1 values (1),(2),(3),(4);
CREATE VIEW view_t1 AS SELECT * FROM t1;
INSERT INTO view_t1 VALUES (5);
SELECT * FROM t1;
pk
1
2
3
4
5
DROP TABLE t1;
DROP VIEW view_t1;
CREATE TABLE t1(pk int not null primary key) engine=myisam;
INSERT INTO t1 values (1),(2),(3),(4);
CREATE VIEW view_t1 AS SELECT * FROM t1;
INSERT INTO view_t1 VALUES (5);
SELECT * FROM t1;
pk
1
2
3
4
5
DROP TABLE t1;
DROP VIEW view_t1;
CREATE TABLE t1(pk int not null primary key) engine=aria;
INSERT INTO t1 values (1),(2),(3),(4);
CREATE VIEW view_t1 AS SELECT * FROM t1;
INSERT INTO view_t1 VALUES (5);
SELECT * FROM t1;
pk
1
2
3
4
5
DROP TABLE t1;
DROP VIEW view_t1;
SET GLOBAL wsrep_replicate_myisam=OFF;

View File

@@ -1,23 +1,8 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 1 AS i;
ERROR 42000: This version of MariaDB doesn't yet support 'SYSTEM VERSIONING AS SELECT in Galera cluster'
connection node_2;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`i` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
SELECT * from t;
i
1
DROP TABLE IF EXISTS t;
COMMIT;
connection node_2;
SET SESSION wsrep_sync_wait=0;
Killing server ...
Starting server ...
connection node_2;
call mtr.add_suppression("WSREP: Event .*Write_rows_v1 apply failed:.*");
call mtr.add_suppression("SREP: Failed to apply write set: gtid:.*");
ERROR 42S02: Table 'test.t' doesn't exist

View File

@@ -18,19 +18,16 @@
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
# Run CTAS until the resulting table gets created,
# then it gets BF aborted by ALTER.
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
# then it gets BF aborted by other DDL.
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
--send
CREATE TABLE t2 SELECT * FROM t1;
# Wait for CTAS to reach the table create point,
# start executing ALTER and BF abort CTAS.
# start executing other DDL and BF abort CTAS.
--connection node_1
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
--disable_result_log
--error ER_ERROR_ON_RENAME
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
--enable_result_log
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
TRUNCATE TABLE t1;
--connection con1
# CTAS gets BF aborted.
@@ -46,19 +43,16 @@ SET DEBUG_SYNC = 'RESET';
INSERT INTO t1 VALUES (10), (20), (30);
# Run CTAS until the resulting table gets created,
# then it gets BF aborted by ALTER.
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
# then it gets BF aborted by other DDL.
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
--send
CREATE TABLE t2 SELECT * FROM t1;
# Wait for CTAS to reach the table create point,
# start executing ALTER and BF abort CTAS.
# start executing other DDL and BF abort CTAS.
--connection node_1
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
--disable_result_log
--error ER_ERROR_ON_RENAME
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
--enable_result_log
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
TRUNCATE TABLE t1;
--connection con1
# CTAS gets BF aborted.

View File

@@ -11,7 +11,11 @@ SET SESSION autocommit=0;
SELECT * FROM t1 WHERE c1 <=0 ORDER BY c1 DESC;
--error ER_LOCK_DEADLOCK
INSERT INTO t1 VALUES (4),(3),(1),(2);
--error ER_TABLE_EXISTS_ERROR
#
# This is because support for CREATE TABLE ENGINE=SEQUENCE
# is done before we check does table exists already.
#
--error ER_NOT_SUPPORTED_YET
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
--error ER_CANT_DROP_FIELD_OR_KEY
ALTER TABLE t1 DROP COLUMN c2;

View File

@@ -0,0 +1,27 @@
--source include/galera_cluster.inc
--source include/have_aria.inc
--connection node_1
SET GLOBAL wsrep_load_data_splitting=ON;
SET GLOBAL wsrep_replicate_myisam=ON;
CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
SELECT COUNT(*) AS EXPECT_6 FROM t1;
--connection node_2
SELECT COUNT(*) AS EXPECT_6 FROM t1;
--connection node_1
ALTER TABLE t1 ENGINE=InnoDB;
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
SELECT COUNT(*) AS EXPECT_12 FROM t1;
--connection node_2
SELECT COUNT(*) AS EXPECT_12 FROM t1;
--connection node_1
DROP TABLE t1;
SET GLOBAL wsrep_load_data_splitting=OFF;
SET GLOBAL wsrep_replicate_myisam=OFF;

View File

@@ -2,6 +2,8 @@
[mysqld.1]
wsrep-debug=SERVER
loose-wsrep-mw-336=1
[mysqld.2]
wsrep-debug=SERVER
loose-wsrep-mw-336=2

View File

@@ -3,11 +3,12 @@
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/force_restart.inc
--source include/have_sequence.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET @wsrep_slave_threads_orig = @@wsrep_slave_threads;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
@@ -22,7 +23,7 @@ SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE V
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (NULL);
--connection node_1
--echo # Wait until one of the appliers has exited
@@ -54,27 +55,19 @@ SELECT VARIABLE_VALUE AS EXPECT_20 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE V
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
--disable_query_log
let $c = 50;
while ($c) {
INSERT INTO t1 VALUES(NULL); COMMIT;
dec $c;
}
--enable_query_log
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 51 FROM t1;
--let $wait_condition_on_error_output = SELECT COUNT(*) FROM t1;
--source include/wait_condition_with_debug.inc
--echo # Wait until 19 of the appliers has exited
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--let $wait_condition_on_error_output = SELECT COUNT(*), 1 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
@@ -82,7 +75,7 @@ INSERT INTO t1 VALUES (20);
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) AS EXPECT_51 FROM t1;
SET GLOBAL wsrep_slave_threads = 10;
--echo # Set slave threads to 10 step 3
@@ -96,16 +89,13 @@ SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE V
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
INSERT INTO t1 VALUES (21);
INSERT INTO t1 VALUES (22);
INSERT INTO t1 VALUES (23);
INSERT INTO t1 VALUES (24);
INSERT INTO t1 VALUES (25);
INSERT INTO t1 VALUES (26);
INSERT INTO t1 VALUES (27);
INSERT INTO t1 VALUES (28);
INSERT INTO t1 VALUES (29);
INSERT INTO t1 VALUES (30);
--disable_query_log
let $c = 50;
while ($c) {
INSERT INTO t1 VALUES(NULL); COMMIT;
dec $c;
}
--enable_query_log
--connection node_1
--echo # Wait until slave threads back to 1
@@ -115,6 +105,10 @@ INSERT INTO t1 VALUES (30);
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) AS EXPECT_101 FROM t1;
DROP TABLE t1;
--disable_query_log
SET GLOBAL wsrep_slave_threads = @wsrep_slave_threads_orig;
--enable_query_log

View File

@@ -3,70 +3,92 @@
#
--source include/galera_cluster.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=innodb;
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (2, 'a');
--connection node_1
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
# block access to t2
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
SET SESSION wsrep_sync_wait=0;
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.TABLES
--source include/wait_condition_with_debug.inc
LOCK TABLE t2 WRITE;
# Block before MLD lock wait
# Block before MDL lock wait
--connection node_1
SET @@debug_dbug = "d,sync.wsrep_before_mdl_wait";
SET DEBUG_SYNC= 'wsrep_before_mdl_wait SIGNAL before_mdl_wait WAIT_FOR mdl_wait_continue';
--send SELECT * FROM t2;
# Wait for SELECT to be blocked
--connection node_1a
#--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIS WHERE STATE = 'System lock';
#--source include/wait_condition.inc
#--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
#--source include/wait_condition.inc
--echo # Wait until select is blocked before MDL lock wait
SET DEBUG_SYNC= 'now WAIT_FOR before_mdl_wait';
# block applier to wait after BF victim is locked
--connection node_1a
SET @@debug_dbug = "d,sync.wsrep_after_BF_victim_lock";
# Issue a conflicting update on node #2
--connection node_2
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
# Unblock the SELECT, to enter wsrep_thd_is_BF
--connection node_1a
SET @@debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1b
SET SESSION wsrep_sync_wait=0;
--echo # Wait for conflicting update to block
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event:%';
--source include/wait_condition.inc
# unblock applier to try to BF the SELECT
# Unblock the SELECT, to enter wsrep_thd_is_BF
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1c
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event:%';
--source include/wait_condition.inc
--connection node_1a
# unblock applier to try to BF the SELECT
SET DEBUG_SYNC = "now SIGNAL BF_victim_continue";
# table lock is not needed anymore
UNLOCK TABLES;
# SELECT succeeds
# SELECT returns deadlock
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
--connection node_1
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
SELECT * FROM t1;
--connection node_2
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
SELECT * FROM t1;
DROP TABLE t1;
DROP TABLE t2;
--connection node_1a
SET DEBUG_SYNC = "RESET";
--connection node_1b
SET DEBUG_SYNC = "RESET";
--connection node_1
--disconnect node_1a
--disconnect node_1b
--disconnect node_1c

View File

@@ -2,20 +2,24 @@
--source include/have_innodb.inc
#
# This tests simple autocommit replication of MyISAM tables. No updates arrive on the slave.
# This tests simple autocommit replication of MyISAM tables.
#
SET GLOBAL wsrep_replicate_myisam=ON;
# Without a PK
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2), (3);
# This is TOI
INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1);
INSERT INTO t2 VALUES (2), (3);
# This is TOI
INSERT INTO t2 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
# Error
@@ -32,14 +36,26 @@ UPDATE t2 SET f1 = 9 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 9;
DELETE FROM t2 WHERE f1 = 9;
SELECT * FROM t1 ORDER BY f1;
SELECT * FROM t2 ORDER BY f1;
--connection node_2
SELECT * FROM t1 ORDER BY f1;
SELECT * FROM t2 ORDER BY f1;
# TRUNCATE
TRUNCATE TABLE t1;
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
SELECT * FROM t1 ORDER BY f1;
SELECT * FROM t2 ORDER BY f1;
--connection node_2
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 0 FROM t2;
SELECT * FROM t1 ORDER BY f1;
SELECT * FROM t2 ORDER BY f1;
--connection node_1
SET GLOBAL wsrep_replicate_myisam=OFF;
DROP TABLE t1;
DROP TABLE t2;

View File

@@ -0,0 +1,16 @@
--source include/galera_cluster.inc
--source include/have_sequence.inc
SET GLOBAL wsrep_ignore_apply_errors=0;
SET SESSION AUTOCOMMIT=0;
SET SESSION max_error_count=0;
--error ER_NOT_SUPPORTED_YET
CREATE TABLE t0 (id GEOMETRY,parent_id GEOMETRY)ENGINE=SEQUENCE;
--connection node_2
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE t0;
--connection node_1
SET GLOBAL wsrep_ignore_apply_errors=DEFAULT;

View File

@@ -16,21 +16,27 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=2';
--connection node_2
# Isolate node_2 from the group and wait until wsrep_ready becomes OFF.
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
--source include/wait_condition.inc
# Verify that graceful shutdown succeeds.
--source include/shutdown_mysqld.inc
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
--source include/wait_condition.inc
SHOW STATUS LIKE 'wsrep_cluster_status';
# Verify that graceful shutdown succeeds.
--source include/shutdown_mysqld.inc
--source include/start_mysqld.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
# Restore original settings.
SET GLOBAL wsrep_provider_options = 'pc.weight = 1';
--source include/auto_increment_offset_restore.inc

View File

@@ -0,0 +1,186 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/have_sequence.inc
--source include/have_aria.inc
--echo # Case 1 CREATE SEQUENCE with no NOCACHE
--error ER_NOT_SUPPORTED_YET
CREATE SEQUENCE s ENGINE=InnoDB;
CREATE SEQUENCE s NOCACHE ENGINE=InnoDB;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
START TRANSACTION;
REPLACE INTO s VALUES (1,1,9223372036854775806,1,1,1000,0,0);
OPTIMIZE TABLE t1;
SELECT * FROM t1;
SELECT * FROM s;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 's'
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1 FROM test.s;
--source include/wait_condition.inc
SELECT * FROM t1;
SELECT * FROM s;
--connection node_1
DROP TABLE t1;
DROP SEQUENCE s;
--echo # Case 2 REPLACE INTO ... SELECT with error
CREATE TABLE t (id INT KEY,a YEAR,INDEX (id,a)) engine=innodb;
--error ER_WRONG_VALUE_COUNT_ON_ROW
REPLACE INTO t (id,a)SELECT /*!99997 */ 1;
REPLACE INTO t (id,a)SELECT /*!99997 */ 1,2;
SELECT * FROM t;
CREATE TABLE t2 (id INT KEY,a YEAR,INDEX (id,a)) engine=myisam;
--error ER_WRONG_VALUE_COUNT_ON_ROW
REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1;
REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1,2;
SELECT * FROM t2;
CREATE TABLE t3 (id INT KEY,a YEAR,INDEX (id,a)) engine=aria;
--error ER_WRONG_VALUE_COUNT_ON_ROW
REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1;
REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1,2;
SELECT * FROM t3;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't3'
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1 FROM test.t3;
--source include/wait_condition.inc
SELECT * FROM t;
SELECT * FROM t2;
SELECT * FROM t3;
--connection node_1
DROP TABLE t,t2,t3;
--echo # Bigger REPLACE ... AS SELECT test
SET GLOBAL wsrep_replicate_myisam=ON;
CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
REPLACE INTO t4 SELECT * FROM t1;
REPLACE INTO t5 SELECT * FROM t2;
REPLACE INTO t6 SELECT * FROM t3;
REPLACE INTO t7 SELECT * FROM t2;
REPLACE INTO t8 SELECT * FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 8 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't_'
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1000 FROM test.t6;
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
--connection node_1
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
--echo # Bigger INSERT INTO ... SELECT test
CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
INSERT INTO t4 SELECT * FROM t1;
INSERT INTO t5 SELECT * FROM t2;
INSERT INTO t6 SELECT * FROM t3;
INSERT INTO t7 SELECT * FROM t2;
INSERT INTO t8 SELECT * FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 8 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't_'
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1000 FROM test.t6;
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
SELECT COUNT(*) AS EXPECT_1000 FROM t2;
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
--connection node_1
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
#
# View
#
CREATE TABLE t1(pk int not null primary key) engine=innodb;
INSERT INTO t1 values (1),(2),(3),(4);
CREATE VIEW view_t1 AS SELECT * FROM t1;
INSERT INTO view_t1 VALUES (5);
SELECT * FROM t1;
DROP TABLE t1;
DROP VIEW view_t1;
CREATE TABLE t1(pk int not null primary key) engine=myisam;
INSERT INTO t1 values (1),(2),(3),(4);
CREATE VIEW view_t1 AS SELECT * FROM t1;
INSERT INTO view_t1 VALUES (5);
SELECT * FROM t1;
DROP TABLE t1;
DROP VIEW view_t1;
CREATE TABLE t1(pk int not null primary key) engine=aria;
INSERT INTO t1 values (1),(2),(3),(4);
CREATE VIEW view_t1 AS SELECT * FROM t1;
INSERT INTO view_t1 VALUES (5);
SELECT * FROM t1;
DROP TABLE t1;
DROP VIEW view_t1;
SET GLOBAL wsrep_replicate_myisam=OFF;

View File

@@ -1,34 +1,15 @@
--source include/galera_cluster.inc
--let $node_1 = node_1
--let $node_2 = node_2
--source include/auto_increment_offset_save.inc
--connection node_1
#
# Below should not cause nodes to be inconsistent (they could if we
# allow TOI as some error are ignored on applier
#
--error ER_NOT_SUPPORTED_YET
CREATE TABLE t ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 1 AS i;
--connection node_2
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE t;
SELECT * from t;
DROP TABLE IF EXISTS t;
COMMIT;
#
# Restart node_2, force SST because database is inconsistent compared to node_1
#
--connection node_2
SET SESSION wsrep_sync_wait=0;
--source include/kill_galera.inc
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
--echo Starting server ...
let $restart_noprint=2;
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
--connection node_2
call mtr.add_suppression("WSREP: Event .*Write_rows_v1 apply failed:.*");
call mtr.add_suppression("SREP: Failed to apply write set: gtid:.*");
--source include/auto_increment_offset_restore.inc

View File

@@ -9,6 +9,7 @@ INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
connection node_2;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
connection node_3;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
@@ -33,14 +34,16 @@ SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=ist_sender_send_after_get_buffers';
INSERT INTO t1 VALUES (51), (52), (53), (54), (55);
connection node_2;
connection node_1;
connection node_3;
connection node_1;
connection node_2;
SELECT COUNT(*) = 30 FROM t1;
COUNT(*) = 30
1
SELECT COUNT(*) = 3 FROM t2;
COUNT(*) = 3
1
SELECT COUNT(*) AS EXPECT_30 FROM t1;
EXPECT_30
30
SELECT COUNT(*) AS EXPECT_3 FROM t2;
EXPECT_3
3
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
LENGTH(f1) = 512 * 1024
1
@@ -48,12 +51,12 @@ LENGTH(f1) = 512 * 1024
1
CALL mtr.add_suppression("WSREP: Unsupported protocol downgrade: incremental data collection disabled");
connection node_3;
SELECT COUNT(*) = 30 FROM t1;
COUNT(*) = 30
1
SELECT COUNT(*) = 3 FROM t2;
COUNT(*) = 3
1
SELECT COUNT(*) AS EXPECT_30 FROM t1;
EXPECT_30
30
SELECT COUNT(*) AS EXPECT_3 FROM t2;
EXPECT_3
3
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
LENGTH(f1) = 512 * 1024
1

View File

@@ -1,6 +1,9 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_3;
connection node_1;
CREATE TABLE t1 (pk INT PRIMARY KEY, node INT) ENGINE=innodb;
INSERT INTO t1 VALUES (1, 1);
connection node_2;
@@ -89,3 +92,7 @@ connection node_2;
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
connection node_3;
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
disconnect node_1a;
disconnect node_3;
disconnect node_2;
disconnect node_1;

View File

@@ -2,10 +2,22 @@
[mysqld.1]
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.ignore_sb=true;gcache.size=1M'
auto_increment_increment=1
auto_increment_offset=1
# this will force server restarts before this test
loose-galera-ist-gcache-rollover=1
wsrep-debug=1
[mysqld.2]
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.ignore_sb=true;gcache.size=1M'
auto_increment_increment=2
auto_increment_offset=2
loose-galera-ist-gcache-rollover=2
wsrep-debug=1
[mysqld.3]
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.ignore_sb=true;gcache.size=1M'
auto_increment_increment=3
auto_increment_offset=3
loose-galera-ist-gcache-rollover=3
wsrep-debug=1

View File

@@ -12,6 +12,7 @@
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
--source include/force_restart.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
@@ -24,6 +25,9 @@
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep%'; show processlist
--source include/wait_condition_with_debug.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
@@ -32,12 +36,15 @@ INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
--let $wsrep_cluster_address_orig2 = `select @@wsrep_cluster_address`
--source suite/galera/include/galera_stop_replication.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
--connection node_3
--let $wsrep_cluster_address_orig3 = `select @@wsrep_cluster_address`
--source suite/galera/include/galera_stop_replication.inc
--connection node_1
--source include/wait_until_connected_again.inc
INSERT INTO t1 VALUES (11), (12), (13), (14), (15);
# Wait until nodes #2 and #3 have left
@@ -88,29 +95,39 @@ INSERT INTO t1 VALUES (51), (52), (53), (54), (55);
--connection node_2
--source include/wait_until_connected_again.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 OR VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
--connection node_3
--source include/wait_until_connected_again.inc
sleep 5;
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
# Final checks
--connection node_2
SELECT COUNT(*) = 30 FROM t1;
SELECT COUNT(*) = 3 FROM t2;
--let $wait_condition = SELECT COUNT(*) = 30 FROM t1
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_30 FROM t1;
SELECT COUNT(*) AS EXPECT_3 FROM t2;
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
CALL mtr.add_suppression("WSREP: Unsupported protocol downgrade: incremental data collection disabled");
# Final checks
--connection node_3
SELECT COUNT(*) = 30 FROM t1;
SELECT COUNT(*) = 3 FROM t2;
--let $wait_condition = SELECT COUNT(*) = 30 FROM t1
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_30 FROM t1;
SELECT COUNT(*) AS EXPECT_3 FROM t2;
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
CALL mtr.add_suppression("WSREP: Unsupported protocol downgrade: incremental data collection disabled");
DROP TABLE t1, t2;
# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc
--let $galera_cluster_size=3
--source ../galera/include/auto_increment_offset_restore.inc
--source include/galera_end.inc

View File

@@ -15,6 +15,12 @@
--let $galera_server_number = 3
--source include/galera_connect.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--let $node_3=node_3
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
@@ -271,3 +277,10 @@ call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State T
--connection node_3
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
--disconnect node_1a
# Restore original auto_increment_offset values.
--let $galera_cluster_size=3
--source ../galera/include/auto_increment_offset_restore.inc
--source include/galera_end.inc

View File

@@ -7,11 +7,11 @@ connection node_3;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
SELECT COUNT(*) AS EXPECT_0 FROM t1;
EXPECT_0
0
connection node_1;
CREATE TABLE t2 (f1 INTEGER);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
LOCK TABLE t2 WRITE;
connection node_1;
@@ -37,12 +37,12 @@ count_match
count_match
1
connection node_1;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_2;
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_1;
DROP TABLE t1;

View File

@@ -15,18 +15,23 @@
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
# Block node #2's applier before table t1's inserts have come into play
--connection node_2
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM t1;
--connection node_1
CREATE TABLE t2 (f1 INTEGER);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
--source include/wait_condition.inc
LOCK TABLE t2 WRITE;
--connection node_1
@@ -77,10 +82,10 @@ if ($mysql_errno == 1213) {
--enable_query_log
--connection node_1
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_2
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_1
DROP TABLE t1;

View File

@@ -60,7 +60,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -521,7 +520,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -993,7 +991,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1466,7 +1463,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1933,7 +1929,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2406,7 +2401,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2884,7 +2878,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3360,7 +3353,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3826,7 +3818,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4287,7 +4278,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4759,7 +4749,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5232,7 +5221,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5699,7 +5687,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6172,7 +6159,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6650,7 +6636,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7126,7 +7111,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15108,7 +15092,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15569,7 +15552,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16041,7 +16023,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16514,7 +16495,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16981,7 +16961,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17454,7 +17433,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17932,7 +17910,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18408,7 +18385,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template

View File

@@ -60,7 +60,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -530,7 +529,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1017,7 +1015,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1511,7 +1508,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -1995,7 +1991,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2489,7 +2484,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -2988,7 +2982,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3485,7 +3478,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -3974,7 +3966,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4444,7 +4435,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -4931,7 +4921,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5425,7 +5414,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -5909,7 +5897,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6403,7 +6390,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -6902,7 +6888,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -7399,7 +7384,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -15700,7 +15684,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16170,7 +16153,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -16657,7 +16639,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17151,7 +17132,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -17635,7 +17615,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18129,7 +18108,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -18628,7 +18606,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
@@ -19125,7 +19102,6 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template

View File

@@ -1020,7 +1020,6 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;

View File

@@ -1020,7 +1020,6 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;

View File

@@ -1020,7 +1020,6 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
MySQL_Test_DB.t1 analyze status Engine-independent statistics collected
MySQL_Test_DB.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;

View File

@@ -987,7 +987,6 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;

View File

@@ -987,7 +987,6 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;

View File

@@ -987,7 +987,6 @@ a b
2001 Second in MAX
ALTER TABLE t1 ANALYZE PARTITION MAX;
Table Op Msg_type Msg_text
mysql_test_db.t1 analyze status Engine-independent statistics collected
mysql_test_db.t1 analyze status OK
# Truncate without FLUSH
ALTER TABLE t1 TRUNCATE PARTITION MAX;

View File

@@ -55,7 +55,6 @@ PARTITION pmax VALUES LESS THAN (MAXVALUE));
INSERT INTO t1 VALUES (1), (10), (100), (1000);
ALTER TABLE t1 ANALYZE PARTITION p0;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ALTER TABLE t1 OPTIMIZE PARTITION p0;
Table Op Msg_type Msg_text