Skip to content

Commit

Permalink
Galera MTR Tests: stability fixes
Browse files Browse the repository at this point in the history
Conflicts:
	mysql-test/include/mtr_check.sql
	mysql-test/suite/galera/r/galera_log_bin.result
	mysql-test/suite/galera/t/galera_log_bin.test
  • Loading branch information
philip-galera authored and Nirbhay Choubey committed Feb 22, 2016
1 parent 2f870f5 commit 7ce84cf
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 20 deletions.
5 changes: 5 additions & 0 deletions mysql-test/include/mtr_check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ BEGIN
-- except those that was created during bootstrap
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA;

-- and the mtr_wsrep_notify schema which is populated by the std_data/wsrep_notify.sh script
-- and the suite/galera/t/galera_var_notify_cmd.test
-- and the wsrep_schema schema that may be created by Galera
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema');

-- The test database should not contain any tables
SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema='test';
Expand Down
37 changes: 19 additions & 18 deletions mysql-test/suite/galera/r/galera_log_bin.result
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000002 353 Gtid 1 391 GTID 0-1-1
mysqld-bin.000002 391 Query 1 504 use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000002 504 Gtid 1 542 BEGIN GTID 0-1-2
mysqld-bin.000002 542 Table_map 1 583 table_id: 100 (test.t1)
mysqld-bin.000002 583 Write_rows_v1 1 617 table_id: 100 flags: STMT_END_F
mysqld-bin.000002 617 Xid 1 644 COMMIT /* xid=2 */
mysqld-bin.000002 542 Table_map 1 583 table_id: # (test.t1)
mysqld-bin.000002 583 Write_rows_v1 1 617 table_id: # flags: STMT_END_F
mysqld-bin.000002 617 Xid 1 644 COMMIT /* xid=# */
mysqld-bin.000002 644 Gtid 1 682 GTID 0-1-3
mysqld-bin.000002 682 Query 1 783 use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000002 783 Gtid 1 821 BEGIN GTID 0-1-4
mysqld-bin.000002 821 Table_map 1 862 table_id: 101 (test.t2)
mysqld-bin.000002 862 Write_rows_v1 1 896 table_id: 101 flags: STMT_END_F
mysqld-bin.000002 896 Xid 1 923 COMMIT /* xid=4 */
mysqld-bin.000002 821 Table_map 1 862 table_id: # (test.t2)
mysqld-bin.000002 862 Write_rows_v1 1 896 table_id: # flags: STMT_END_F
mysqld-bin.000002 896 Xid 1 923 COMMIT /* xid=# */
mysqld-bin.000002 923 Gtid 1 961 BEGIN GTID 0-1-5
mysqld-bin.000002 961 Table_map 1 1002 table_id: 101 (test.t2)
mysqld-bin.000002 1002 Write_rows_v1 1 1036 table_id: 101 flags: STMT_END_F
mysqld-bin.000002 1036 Xid 1 1063 COMMIT /* xid=5 */
mysqld-bin.000002 961 Table_map 1 1002 table_id: # (test.t2)
mysqld-bin.000002 1002 Write_rows_v1 1 1036 table_id: # flags: STMT_END_F
mysqld-bin.000002 1036 Xid 1 1063 COMMIT /* xid=# */
mysqld-bin.000002 1063 Gtid 1 1101 GTID 0-1-6
mysqld-bin.000002 1101 Query 1 1200 use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
Expand All @@ -39,20 +39,21 @@ Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000003 313 Gtid 1 351 GTID 0-1-1
mysqld-bin.000003 351 Query 1 464 use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000003 464 Gtid 1 502 BEGIN GTID 0-1-2
mysqld-bin.000003 502 Table_map 1 543 table_id: 82 (test.t1)
mysqld-bin.000003 543 Write_rows_v1 1 577 table_id: 82 flags: STMT_END_F
mysqld-bin.000003 577 Xid 1 604 COMMIT /* xid=2 */
mysqld-bin.000003 502 Table_map 1 543 table_id: # (test.t1)
mysqld-bin.000003 543 Write_rows_v1 1 577 table_id: # flags: STMT_END_F
mysqld-bin.000003 577 Xid 1 604 COMMIT /* xid=# */
mysqld-bin.000003 604 Gtid 1 642 GTID 0-1-3
mysqld-bin.000003 642 Query 1 743 use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000003 743 Gtid 1 781 BEGIN GTID 0-1-4
mysqld-bin.000003 781 Table_map 1 822 table_id: 83 (test.t2)
mysqld-bin.000003 822 Write_rows_v1 1 856 table_id: 83 flags: STMT_END_F
mysqld-bin.000003 856 Xid 1 883 COMMIT /* xid=4 */
mysqld-bin.000003 781 Table_map 1 822 table_id: # (test.t2)
mysqld-bin.000003 822 Write_rows_v1 1 856 table_id: # flags: STMT_END_F
mysqld-bin.000003 856 Xid 1 883 COMMIT /* xid=# */
mysqld-bin.000003 883 Gtid 1 921 BEGIN GTID 0-1-5
mysqld-bin.000003 921 Table_map 1 962 table_id: 83 (test.t2)
mysqld-bin.000003 962 Write_rows_v1 1 996 table_id: 83 flags: STMT_END_F
mysqld-bin.000003 996 Xid 1 1023 COMMIT /* xid=5 */
mysqld-bin.000003 921 Table_map 1 962 table_id: # (test.t2)
mysqld-bin.000003 962 Write_rows_v1 1 996 table_id: # flags: STMT_END_F
mysqld-bin.000003 996 Xid 1 1023 COMMIT /* xid=# */
mysqld-bin.000003 1023 Gtid 1 1061 GTID 0-1-6
mysqld-bin.000003 1061 Query 1 1160 use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
DROP TABLE t1;
DROP TABLE t2;
RESET MASTER;
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@ CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
DROP USER sslsst;
SET GLOBAL general_log = ON;
SET GLOBAL slow_query_log = ON;
7 changes: 5 additions & 2 deletions mysql-test/suite/galera/t/galera_log_bin.test
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ SELECT COUNT(*) = 2 FROM t2;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;

FLUSH LOGS;
# Use pos 120 in order to skip the header that contains the MySQL version number.
# Otherwise, version number changes will cause the test to break

--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;

--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';

--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,19;

DROP TABLE t1;
DROP TABLE t2;

--connection node_1
RESET MASTER;
7 changes: 7 additions & 0 deletions mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ SET GLOBAL wsrep_sst_auth = 'sslsst:';

--source suite/galera/include/galera_sst_restore.inc
DROP USER sslsst;

--connection node_2
# We have to manually restore global_log and slow_query_log due to mysql-wsrep#108
# Otherwise MTR's check_testcases complains

SET GLOBAL general_log = ON;
SET GLOBAL slow_query_log = ON;

0 comments on commit 7ce84cf

Please sign in to comment.