revision-id: b9d74b760e6196a5f57ec76164f34ccfd677ba68 (mariadb-10.3.6-306-gb9d74b760e6) parent(s): 203bb87d27be66787ff1972c0261902881a8580c author: Jan Lindström committer: Jan Lindström timestamp: 2019-01-16 15:16:23 +0200 message: MDEV-17705: Review InnoDB changes on Galera 4 wsrep patch mysql-test/include/check-testcase.test Reset innodb_status_output and innodb_status_output_locks variables back to original values. This fixes test failure seen sometimes on galera.galera_many_rows. Test cleanups: modified: mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result modified: mysql-test/suite/galera/r/galera_ist_progress.result modified: mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result modified: mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff modified: mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result modified: mysql-test/suite/galera/r/galera_var_slave_threads.result modified: mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result modified: mysql-test/suite/galera/t/galera_bf_abort_group_commit.test modified: mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test modified: mysql-test/suite/galera/t/galera_sst_mysqldump.test modified: mysql-test/suite/galera/t/galera_toi_ddl_locking.test modified: mysql-test/suite/galera/t/galera_var_slave_threads.test modified: mysql-test/suite/galera/t/rpl_row_annotate.test Remove xtrabackup related tests: deleted: mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result deleted: mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result deleted: mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test deleted: mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf deleted: mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test wsrep_append_foreign_key Fix output formating row_ins_check_foreign_constraint Revert unneeded change row_search_mvcc Use else to avoid performance penalty trx_get_trx_by_xid_callback Revert incorrect merge. --- mysql-test/include/check-testcase.test | 8 +- .../r/galera_gcache_recover_full_gcache.result | 2 + .../suite/galera/r/galera_ist_progress.result | 14 - .../r/galera_parallel_autoinc_largetrx.result | 18 +- .../suite/galera/r/galera_sst_rsync,debug.rdiff | 6 +- .../suite/galera/r/galera_toi_ddl_fk_insert.result | 2 + .../suite/galera/r/galera_var_slave_threads.result | 425 ++++++++++++++++++++- .../r/galera_wsrep_provider_unset_set.result | 2 + .../galera/t/galera_bf_abort_group_commit.test | 23 +- .../galera/t/galera_parallel_autoinc_largetrx.test | 11 +- .../suite/galera/t/galera_sst_mysqldump.test | 1 - .../suite/galera/t/galera_toi_ddl_locking.test | 2 +- .../suite/galera/t/galera_var_slave_threads.test | 20 +- mysql-test/suite/galera/t/rpl_row_annotate.test | 1 - .../r/galera_innobackupex_backup.result | 11 - .../r/galera_ipv6_xtrabackup-v2.result | 15 - .../t/galera_innobackupex_backup.test | 58 --- .../galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf | 30 -- .../galera_3nodes/t/galera_ipv6_xtrabackup-v2.test | 64 ---- storage/innobase/handler/ha_innodb.cc | 8 +- storage/innobase/row/row0ins.cc | 21 +- storage/innobase/row/row0sel.cc | 2 +- storage/innobase/trx/trx0trx.cc | 7 - 23 files changed, 480 insertions(+), 271 deletions(-) diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 994b71f1ff6..39aa3d49d68 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -118,11 +118,15 @@ if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsre } --echo There is one or more active InnoDB transaction(s) when there should be none. Dumping some diagnostics. + --let $status_locks = `SELECT @@innodb_status_output_locks` + --let $status_output = `SELECT @@innodb_status_output` --enable_query_log - SET GLOBAL innodb_status_output_locks=ON; SHOW ENGINE INNODB STATUS; - SET GLOBAL innodb_status_output_locks=default; + --disable_query_log + --eval SET GLOBAL innodb_status_output_locks=$status_locks; + --eval SET GLOBAL innodb_status_output=$status_output; + --enable_query_log --vertical_results if ($before) { diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result index 157b982940b..a0d128f5fa3 100644 --- a/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result +++ b/mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; SET SESSION wsrep_sync_wait = 0; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB; connection node_2; diff --git a/mysql-test/suite/galera/r/galera_ist_progress.result b/mysql-test/suite/galera/r/galera_ist_progress.result index 4795fc1224b..9fc7febbea5 100644 --- a/mysql-test/suite/galera/r/galera_ist_progress.result +++ b/mysql-test/suite/galera/r/galera_ist_progress.result @@ -1,15 +1,6 @@ -connection node_2; -<<<<<<< HEAD -connection node_1; -connection node_2; -======= ->>>>>>> 10.3 SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; -connection node_1; -connection node_2; SET SESSION wsrep_on = OFF; SET SESSION wsrep_on = ON; -connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); @@ -21,13 +12,8 @@ INSERT INTO t1 VALUES (7); INSERT INTO t1 VALUES (8); INSERT INTO t1 VALUES (9); INSERT INTO t1 VALUES (10); -connection node_2; SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; -connection node_1; -connection node_2; -connection node_1; include/assert_grep.inc [Receiving IST: 11 writesets, seqnos] include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete] include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete] -connection node_1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result index 85f61cc2742..d2e09d7084f 100644 --- a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result +++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connection node_1; -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER) engine=InnoDB; INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; connection node_2; @@ -13,18 +13,26 @@ INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; connection node_2; INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; connection node_1; +SELECT COUNT(*) FROM t1; +COUNT(*) +30000 +SELECT COUNT(DISTINCT f1) FROM t1; +COUNT(DISTINCT f1) +30000 connection node_1a; -connection node_2; SELECT COUNT(*) FROM t1; COUNT(*) 30000 SELECT COUNT(DISTINCT f1) FROM t1; COUNT(DISTINCT f1) 30000 -SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE -USER = 'system user' AND STATE NOT LIKE 'InnoDB%'; +connection node_2; +SELECT COUNT(*) FROM t1; COUNT(*) -6 +30000 +SELECT COUNT(DISTINCT f1) FROM t1; +COUNT(DISTINCT f1) +30000 connection default; DROP TABLE t1; DROP TABLE ten; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff index 3a6638c8cdb..94dd8c2e502 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff +++ b/mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff @@ -1,6 +1,6 @@ ---- galera_sst_rsync.result 2018-12-11 13:47:33.600535840 +0100 -+++ galera_sst_rsync.reject 2018-12-11 13:52:05.780535840 +0100 -@@ -288,3 +288,111 @@ +--- galera_sst_rsync.result ++++ galera_sst_rsync,debug.reject +@@ -284,3 +284,111 @@ DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result index 0dbc89978d4..0ecc4a4619f 100644 --- a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result +++ b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE parent ( diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result index ca4b2b00bdf..108908551f6 100644 --- a/mysql-test/suite/galera/r/galera_var_slave_threads.result +++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result @@ -17,11 +17,11 @@ SELECT @@wsrep_slave_threads = 1; @@wsrep_slave_threads = 1 1 SET GLOBAL wsrep_slave_threads = 1; -SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; -COUNT(*) = 3 -1 -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; -COUNT(*) = 1 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; +COUNT(*) +3 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +COUNT(*) 1 SET GLOBAL wsrep_slave_threads = 64; connection node_1; @@ -30,17 +30,17 @@ connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; -COUNT(*) = 1 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +COUNT(*) 1 SET GLOBAL wsrep_slave_threads = 1; connection node_1; connection node_2; -SELECT COUNT(*) = 64 FROM t2; -COUNT(*) = 64 -1 -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; -COUNT(*) = 1 +SELECT COUNT(*) FROM t2; +COUNT(*) +64 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +COUNT(*) 1 SET GLOBAL wsrep_slave_threads = 5; SET GLOBAL wsrep_slave_threads = 1; @@ -56,15 +56,410 @@ SET GLOBAL wsrep_cluster_address=''; SET GLOBAL wsrep_cluster_address='gcomm://'; SET GLOBAL wsrep_slave_threads = 10; connection node_2; -SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; -COUNT(*) = @@wsrep_slave_threads + 2 -1 +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; +COUNT(*) +3 connection node_1; SET GLOBAL wsrep_slave_threads = 1; connection node_2; SET GLOBAL wsrep_slave_threads = 1; connection node_1; connection node_2; +SELECT * FROM t1; +f1 +1 +SELECT * FROM t2; +f1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +31 +33 +35 +37 +39 +41 +43 +45 +47 +49 +51 +53 +55 +57 +59 +61 +63 +65 +67 +69 +71 +73 +75 +77 +79 +81 +83 +85 +87 +89 +91 +93 +95 +97 +99 +101 +103 +105 +107 +109 +111 +113 +115 +117 +119 +121 +123 +125 +127 +129 +132 +134 +136 +138 +140 +142 +144 +146 +148 +150 +152 +154 +156 +158 +160 +162 +164 +166 +168 +170 +172 +174 +176 +178 +180 +182 +184 +186 +188 +190 +192 +194 +196 +198 +200 +202 +204 +206 +208 +210 +212 +214 +216 +218 +220 +222 +224 +226 +228 +230 +232 +234 +236 +238 +240 +242 +244 +246 +248 +250 +252 +254 +256 +258 +259 +261 +263 +265 +267 +269 +271 +273 +275 +277 +279 +281 +283 +285 +287 +289 +291 +293 +295 +297 +299 +301 +303 +305 +307 +309 +311 +313 +315 +317 +319 +321 +323 +325 +327 +329 +331 +333 +335 +337 +339 +341 +343 +345 +347 +349 +351 +353 +355 +357 +359 +361 +363 +365 +367 +369 +371 +373 +375 +377 +379 +381 +383 +385 +connection node_1; +SELECT * FROM t1; +f1 +1 +SELECT * FROM t2; +f1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +31 +33 +35 +37 +39 +41 +43 +45 +47 +49 +51 +53 +55 +57 +59 +61 +63 +65 +67 +69 +71 +73 +75 +77 +79 +81 +83 +85 +87 +89 +91 +93 +95 +97 +99 +101 +103 +105 +107 +109 +111 +113 +115 +117 +119 +121 +123 +125 +127 +129 +132 +134 +136 +138 +140 +142 +144 +146 +148 +150 +152 +154 +156 +158 +160 +162 +164 +166 +168 +170 +172 +174 +176 +178 +180 +182 +184 +186 +188 +190 +192 +194 +196 +198 +200 +202 +204 +206 +208 +210 +212 +214 +216 +218 +220 +222 +224 +226 +228 +230 +232 +234 +236 +238 +240 +242 +244 +246 +248 +250 +252 +254 +256 +258 +259 +261 +263 +265 +267 +269 +271 +273 +275 +277 +279 +281 +283 +285 +287 +289 +291 +293 +295 +297 +299 +301 +303 +305 +307 +309 +311 +313 +315 +317 +319 +321 +323 +325 +327 +329 +331 +333 +335 +337 +339 +341 +343 +345 +347 +349 +351 +353 +355 +357 +359 +361 +363 +365 +367 +369 +371 +373 +375 +377 +379 +381 +383 +385 DROP TABLE t1; DROP TABLE t2; # End of tests diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result b/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result index d56d9340474..7a645407004 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result +++ b/mysql-test/suite/galera/r/galera_wsrep_provider_unset_set.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; connection node_1; connection node_2; connection node_1; diff --git a/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test index 255298565f0..a828701cd0e 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_group_commit.test @@ -5,6 +5,7 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +--source include/galera_have_debug_sync.inc # Control connection for manipulating sync points on node 1 --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 @@ -17,19 +18,19 @@ SET SESSION wsrep_sync_wait = 0; --echo after_replicate_sync --let $galera_sr_bf_abort_sync_point = after_replicate_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo local_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo apply_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo commit_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc # SR bf abort on commit fragment --let $wsrep_trx_fragment_size = 1 @@ -38,15 +39,15 @@ SET SESSION wsrep_sync_wait = 0; --echo after_replicate_sync --let $galera_sr_bf_abort_sync_point = after_replicate_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo local_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo apply_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo commit_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync @@ -59,18 +60,18 @@ SET SESSION wsrep_sync_wait = 0; --echo after_replicate_sync --let $galera_sr_bf_abort_sync_point = after_replicate_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo local_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = local_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo apply_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = apply_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc --echo commit_monitor_master_enter_sync --let $galera_sr_bf_abort_sync_point = commit_monitor_master_enter_sync ---source suite/galera/t/galera_sr_bf_abort.inc +--source ../../suite/galera_sr/t/galera_sr_bf_abort.inc CALL mtr.add_suppression("WSREP: fragment replication failed: 1"); diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test index 644b4687cb3..203d18b85a6 100644 --- a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test +++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test @@ -12,13 +12,16 @@ --source include/galera_connect.inc --connection node_1 -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER) engine=InnoDB; INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; + --connection node_2 --let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads` SET GLOBAL wsrep_slave_threads = 4; +--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; +--source include/wait_condition.inc --connection node_1 --send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; @@ -31,16 +34,18 @@ SET GLOBAL wsrep_slave_threads = 4; --connection node_1 --reap +SELECT COUNT(*) FROM t1; +SELECT COUNT(DISTINCT f1) FROM t1; --connection node_1a --reap +SELECT COUNT(*) FROM t1; +SELECT COUNT(DISTINCT f1) FROM t1; --connection node_2 --reap SELECT COUNT(*) FROM t1; SELECT COUNT(DISTINCT f1) FROM t1; -SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE - USER = 'system user' AND STATE NOT LIKE 'InnoDB%'; --disable_query_log --eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig; diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump.test b/mysql-test/suite/galera/t/galera_sst_mysqldump.test index b72fa687411..cce4d374a6d 100644 --- a/mysql-test/suite/galera/t/galera_sst_mysqldump.test +++ b/mysql-test/suite/galera/t/galera_sst_mysqldump.test @@ -1,6 +1,5 @@ --source include/big_test.inc --source include/galera_cluster.inc ---source include/have_innodb.inc --source suite/galera/include/galera_sst_set_mysqldump.inc --let $node_1=node_1 diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_locking.test b/mysql-test/suite/galera/t/galera_toi_ddl_locking.test index 08655157fd3..22a45316306 100644 --- a/mysql-test/suite/galera/t/galera_toi_ddl_locking.test +++ b/mysql-test/suite/galera/t/galera_toi_ddl_locking.test @@ -29,7 +29,7 @@ SET SESSION wsrep_sync_wait = 0; SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC = 'alter_table_before_open_tables SIGNAL before_open_tables WAIT_FOR continue'; --send ALTER TABLE t1 ADD COLUMN f2 INTEGER; ---sleep 10 + --connection node_1a SET DEBUG_SYNC= 'now WAIT_FOR before_open_tables'; diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test index 86c223b3a6c..d0784bfd871 100644 --- a/mysql-test/suite/galera/t/galera_var_slave_threads.test +++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test @@ -26,8 +26,8 @@ SELECT @@wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1; # There is a separate wsrep_aborter thread at all times -SELECT COUNT(*) = 3 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; # # Increase the number of slave threads. The change takes effect immediately @@ -45,7 +45,7 @@ SELECT COUNT(*) = 1 FROM t1; # note, in wsrep API #26, we have 2 rollbacker threads, counted as system user's # -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; --let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; --source include/wait_condition.inc @@ -71,9 +71,9 @@ while ($count) --enable_result_log --connection node_2 -SELECT COUNT(*) = 64 FROM t2; +SELECT COUNT(*) FROM t2; -SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%'; --let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; --source include/wait_condition.inc @@ -131,7 +131,7 @@ SET GLOBAL wsrep_slave_threads = 10; --source include/start_mysqld.inc --source include/wait_until_connected_again.inc -SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'; # # @@ -177,6 +177,14 @@ while ($count) --let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; --source include/wait_condition.inc +SELECT * FROM t1; +SELECT * FROM t2; + +--connection node_1 + +SELECT * FROM t1; +SELECT * FROM t2; + DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera/t/rpl_row_annotate.test b/mysql-test/suite/galera/t/rpl_row_annotate.test index b9bae724d7f..0ec30829982 100644 --- a/mysql-test/suite/galera/t/rpl_row_annotate.test +++ b/mysql-test/suite/galera/t/rpl_row_annotate.test @@ -42,5 +42,4 @@ let $start_pos= `select @binlog_start_pos`; # Cleanup DROP TABLE t1; -#--source include/galera_end.inc --echo # End of test diff --git a/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result b/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result deleted file mode 100644 index 85000db8e77..00000000000 --- a/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE t1 (f1 INTEGER); -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -SELECT COUNT(*) = 10 FROM t1; -COUNT(*) = 10 -1 -Killing server ... -INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); -SELECT COUNT(*) = 20 FROM t1; -COUNT(*) = 20 -1 -DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result deleted file mode 100644 index 56348889cf9..00000000000 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result +++ /dev/null @@ -1,15 +0,0 @@ -SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; -VARIABLE_VALUE LIKE '%[::1]%' -1 -SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; -VARIABLE_VALUE = 3 -1 -SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; -CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); -SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; -SELECT COUNT(*) = 1 FROM t1; -COUNT(*) = 1 -1 -DROP TABLE t1; -include/assert_grep.inc [Streaming the backup to joiner at \[::1\]] diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test deleted file mode 100644 index cc3f42c7290..00000000000 --- a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test +++ /dev/null @@ -1,58 +0,0 @@ -# -# This test uses innobackupex to take a backup on node #2 and then restores that node from backup -# - ---source include/galera_cluster.inc ---source include/have_innodb.inc - ---connection node_1 -CREATE TABLE t1 (f1 INTEGER); -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - ---connection node_2 -SELECT COUNT(*) = 10 FROM t1; - ---exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup ---exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log ---exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log - ---source ../galera/include/kill_galera.inc ---sleep 1 - ---connection node_1 -INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20); - ---exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/* ---exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back $MYSQL_TMP_DIR/innobackupex_backup --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log - -# -# Convert the xtrabackup_galera_info into a grastate.dat file -# - ---perl - use strict; - my $xtrabackup_galera_info_file = $ENV{'MYSQL_TMP_DIR'}.'/innobackupex_backup/xtrabackup_galera_info'; - open(XTRABACKUP_GALERA_INFO, $xtrabackup_galera_info_file) or die "Can not open $xtrabackup_galera_info_file: $!"; - my $xtrabackup_galera_info = <XTRABACKUP_GALERA_INFO>; - my ($uuid, $seqno) = split(':', $xtrabackup_galera_info); - - my $grastate_dat_file = $ENV{'MYSQLTEST_VARDIR'}.'/mysqld.2/data/grastate.dat'; - die "grastate.dat already exists" if -e $grastate_dat_file; - - open(GRASTATE_DAT, ">$grastate_dat_file") or die "Can not write to $grastate_dat_file: $!"; - print GRASTATE_DAT "version: 2.1\n"; - print GRASTATE_DAT "uuid: $uuid\n"; - print GRASTATE_DAT "seqno: $seqno\n"; - print GRASTATE_DAT "cert_index:\n"; - exit(0); -EOF - ---source include/start_mysqld.inc ---sleep 5 - ---source include/wait_until_connected_again.inc -SELECT COUNT(*) = 20 FROM t1; - -DROP TABLE t1; - ---sleep 10 diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf deleted file mode 100644 index 5cc8fb04cdd..00000000000 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf +++ /dev/null @@ -1,30 +0,0 @@ -!include ../galera_3nodes.cnf - -[mysqld] -wsrep_sst_method=xtrabackup-v2 -wsrep_sst_auth="root:" - -[mysqld.1] -wsrep_node_name='node_1' -wsrep-cluster-address=gcomm:// -wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port' -wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' -wsrep_node_incoming_address='[::1]:@mysqld.1.port' - -[mysqld.2] -wsrep_node_name='node_2' -wsrep_sst_donor='node_1' -wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' -wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port' -wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' -wsrep_node_incoming_address='[::1]:@mysqld.2.port' - -[mysqld.3] -wsrep_node_name='node_3' -wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' -wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port' -wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port' -wsrep_node_incoming_address='[::1]:@mysqld.3.port' - -[SST] -sockopt=",pf=ip6" diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test deleted file mode 100644 index aa8635efad2..00000000000 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test +++ /dev/null @@ -1,64 +0,0 @@ ---source include/galera_cluster.inc ---source include/check_ipv6.inc - -# Confirm that initial handshake happened over ipv6 - -SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; -SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; - -# Force IST - ---connection node_2 -SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; - ---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 - -CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); - ---connection node_2 -SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; - ---let $wait_condition = SELECT VARIABLE_VALUE = 3 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 - -SELECT COUNT(*) = 1 FROM t1; - -DROP TABLE t1; - -# Confirm that key messages around SST and IST reference IPv6 - ---connection node_1 ---let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err ---let $assert_only_after = CURRENT_TEST - ---let $assert_count = 2 ---let $assert_text = Streaming the backup to joiner at \[::1\] ---let $assert_select = Streaming the backup to joiner at \[::1\] ---source include/assert_grep.inc - -# asserts below are not deterministic -# --let $assert_count = 2 -# --let $assert_text = async IST sender starting to serve tcp://\[::1\]: -# --let $assert_select = async IST sender starting to serve tcp://\[::1\]: -# --source include/assert_grep.inc -# -# --let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err -# -# --let $assert_text = IST receiver addr using tcp://\[::1\] -# --let $assert_select = IST receiver addr using tcp://\[::1\] -# --source include/assert_grep.inc -# -# --let $assert_count = 1 -# --let $assert_text = Prepared IST receiver for 4-7, listening at: tcp://\[::1\] -# --let $assert_select = Prepared IST receiver for 4-7, listening at: tcp://\[::1\] -# --source include/assert_grep.inc - - - - diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e9f2c5b0754..8eb748e7a70 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -10282,11 +10282,11 @@ wsrep_append_foreign_key( if (rcode != DB_SUCCESS) { WSREP_ERROR( - "FK key set failed: %lu (%lu %s), index: %s %s, %s", + "FK key set failed: " ULINTPF + " (" ULINTPF " " ULINTPF "%s), index: %s %s, %s", rcode, referenced, wsrep_key_type_to_str(key_type), - (index && index->name) ? index->name : - "void index", - (index) ? index->table->name.m_name : + (index) ? index->name() : "void index", + (index && index->table) ? index->table->name.m_name : "void table", wsrep_thd_query(thd)); return DB_ERROR; diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index db4dd0759d0..c38e5813a6c 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1814,8 +1814,8 @@ row_ins_check_foreign_constraint( rec, check_index, check_ref, - upd_node != NULL && - wsrep_protocol_version < 4 + (upd_node != NULL + && wsrep_protocol_version < 4) ? WSREP_SERVICE_KEY_SHARED : WSREP_SERVICE_KEY_REFERENCE); #endif /* WITH_WSREP */ @@ -1915,23 +1915,6 @@ row_ins_check_foreign_constraint( check_table->inc_fk_checks(); lock_wait_suspend_thread(thr); -#ifdef WITH_WSREP - ut_ad(!trx_mutex_own(trx)); - switch (trx->error_state) { - case DB_DEADLOCK: - if (wsrep_debug) { - ib::info() << - "WSREP: innodb trx state changed during wait " - << " trx: " << trx->id << " with error_state: " - << trx->error_state << " err: " << err; - } - err = trx->error_state; - break; - default: - break; - } - -#endif /* WITH_WSREP */ thr->lock_state = QUE_THR_LOCK_NOLOCK; diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index 80d84756724..f05d51da905 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -4467,7 +4467,7 @@ row_search_mvcc( set_also_gap_locks = FALSE; } #ifdef WITH_WSREP - if (wsrep_thd_skip_locking(trx->mysql_thd)) { + else if (wsrep_thd_skip_locking(trx->mysql_thd)) { ut_ad(sr_table_name_full_str == prebuilt->table->name.m_name); set_also_gap_locks = FALSE; diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 3873ed34bd5..d222e3f017c 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -2154,14 +2154,7 @@ static my_bool trx_get_trx_by_xid_callback(rw_trx_hash_element_t *element, if (!wsrep_is_wsrep_xid(trx->xid)) #endif /* Invalidate the XID, so that subsequent calls will not find it. */ -#ifdef WITH_WSREP - if (!wsrep_is_wsrep_xid(trx->xid)) - { -#endif /* WITH_WSREP */ trx->xid->null(); -#ifdef WITH_WSREP - } -#endif /* WITH_WSREP */ arg->trx= trx; found= 1; }