diff --git a/include/my_pthread.h b/include/my_pthread.h index 380fa70e4ee12..b340d56e88f5e 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -673,10 +673,10 @@ extern void my_mutex_end(void); by GCC 12.3.0, GCC 13.2.0, or clang 16.0.6 would fail ./mtr main.1st when the stack size is 5 MiB. The minimum is more than 6 MiB for CMAKE_BUILD_TYPE=RelWithDebInfo and - more than 8 MiB for CMAKE_BUILD_TYPE=Debug. + more than 10 MiB for CMAKE_BUILD_TYPE=Debug. Let us add some safety margin. */ -# define DEFAULT_THREAD_STACK (10L<<20) +# define DEFAULT_THREAD_STACK (11L<<20) # else # define DEFAULT_THREAD_STACK (292*1024L) /* 299008 */ # endif diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result index 73c6c6ba0a83e..afdd97a9d5887 100644 --- a/mysql-test/main/type_timestamp.result +++ b/mysql-test/main/type_timestamp.result @@ -1370,7 +1370,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci drop table t1; # -# End of 10.10 tests +# End of 10.5 tests # # # MDEV-32203 Raise notes when an index cannot be used on data type mismatch @@ -1491,3 +1491,4 @@ indexed_col not_indexed_col DROP TABLE t2; DROP TABLE t1; SET note_verbosity=DEFAULT; +# End of 10.6 tests diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test index 76589f1f6bcc7..b3dfa19223d06 100644 --- a/mysql-test/main/type_timestamp.test +++ b/mysql-test/main/type_timestamp.test @@ -921,7 +921,7 @@ show create table t1; drop table t1; --echo # ---echo # End of 10.10 tests +--echo # End of 10.5 tests --echo # --echo # @@ -941,3 +941,5 @@ DELIMITER ;$$ --source unusable_keys_joins.inc DROP TABLE t1; SET note_verbosity=DEFAULT; + +--echo # End of 10.6 tests diff --git a/mysql-test/suite/encryption/r/corrupted_during_recovery.result b/mysql-test/suite/encryption/r/corrupted_during_recovery.result index 2b29bf260e163..7329999dd2794 100644 --- a/mysql-test/suite/encryption/r/corrupted_during_recovery.result +++ b/mysql-test/suite/encryption/r/corrupted_during_recovery.result @@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(2); SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' SELECT * FROM t1; -ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate. +Got one of the listed errors SELECT * FROM t2; a 2 diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test index e4a31a0b47842..1240ee1a8ff85 100644 --- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test +++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test @@ -60,7 +60,7 @@ call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and r let $restart_parameters=--innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup; --source include/restart_mysqld.inc ---error ER_TABLE_CORRUPT +--error ER_NO_SUCH_TABLE_IN_ENGINE,ER_TABLE_CORRUPT SELECT * FROM t1; SELECT * FROM t2; CHECK TABLE t2; diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 398584d3e9abe..e05e7790b3864 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -29,3 +29,4 @@ mdev-31285 : MDEV-25089 Assertion `error.len > 0' failed in galera::ReplicatorSM galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes MW-402 : temporarily disabled at the request of Codership MDEV-22232 : temporarily disabled at the request of Codership +galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch diff --git a/mysql-test/suite/galera/r/MDEV-31272.result b/mysql-test/suite/galera/r/MDEV-31272.result new file mode 100644 index 0000000000000..e8469bc75c0db --- /dev/null +++ b/mysql-test/suite/galera/r/MDEV-31272.result @@ -0,0 +1,36 @@ +connection node_2; +connection node_1; +connection node_1; +CREATE TABLE t1 (f1 int primary key, f2 int); +INSERT INTO t1 VALUES (1,0); +BEGIN; +INSERT INTO t1 VALUES (2,4),(1,1); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +COMMIT; +Writesets replicated (expect 0) +0 +connection node_1; +SELECT * FROM t1; +f1 f2 +1 0 +connection node_2; +SELECT * FROM t1; +f1 f2 +1 0 +DROP TABLE t1; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER); +INSERT INTO t1 VALUES (1,0); +INSERT INTO t1 VALUES (2,4), (1,1); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +Writesets replicated (expect 0) +0 +connection node_1; +SELECT * FROM t1; +f1 f2 +1 0 +connection node_2; +SELECT * FROM t1; +f1 f2 +1 0 +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result index 76f16791eb74d..de89168683a66 100644 --- a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result +++ b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result @@ -100,19 +100,19 @@ Killing server ... connection node_1; Killing server ... connection node_1_insert_simple; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_1_insert_multi; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_1_insert_transaction; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_1_update_simple; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_1_insert_1k; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_1_insert_1m; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_1_insert_10m; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_1; Performing --wsrep-recover ... Using --wsrep-start-position when starting mysqld ... diff --git a/mysql-test/suite/galera/t/MDEV-22232.test b/mysql-test/suite/galera/t/MDEV-22232.test index edb42ee603c7b..dbd9ed1e9c79d 100644 --- a/mysql-test/suite/galera/t/MDEV-22232.test +++ b/mysql-test/suite/galera/t/MDEV-22232.test @@ -28,7 +28,7 @@ SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf --connection node_1 SET DEBUG_SYNC = 'now WAIT_FOR may_alter'; --disable_result_log ---error ER_ERROR_ON_RENAME +--error ER_CANT_DROP_FIELD_OR_KEY ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY; --enable_result_log diff --git a/mysql-test/suite/galera/t/MDEV-31272.combinations b/mysql-test/suite/galera/t/MDEV-31272.combinations new file mode 100644 index 0000000000000..def4dda7def7c --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-31272.combinations @@ -0,0 +1,5 @@ +[binlogon] +log-bin +log-slave-updates=ON + +[binlogoff] diff --git a/mysql-test/suite/galera/t/MDEV-31272.test b/mysql-test/suite/galera/t/MDEV-31272.test new file mode 100644 index 0000000000000..d2c823788a0d8 --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-31272.test @@ -0,0 +1,58 @@ +# +# MDEV-31272: Statement rollback causes empty writeset replication +# + +--source include/galera_cluster.inc + +# +# Case 1: Multi statement transaction +# +--connection node_1 +CREATE TABLE t1 (f1 int primary key, f2 int); +INSERT INTO t1 VALUES (1,0); + +--let $replicated_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +BEGIN; +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (2,4),(1,1); +COMMIT; + +--let $replicated_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +--disable_query_log +--eval SELECT $replicated_new - $replicated_old AS 'Writesets replicated (expect 0)'; +--enable_query_log + +--connection node_1 +SELECT * FROM t1; +--connection node_2 +SELECT * FROM t1; + +DROP TABLE t1; + + +# +# Case 2: autocommit statement +# +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER); +INSERT INTO t1 VALUES (1,0); + +--let $replicated_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (2,4), (1,1); + +--let $replicated_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_replicated'` + +--disable_query_log +--eval SELECT $replicated_new - $replicated_old AS 'Writesets replicated (expect 0)'; +--enable_query_log + +--connection node_1 +SELECT * FROM t1; +--connection node_2 +SELECT * FROM t1; + +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test index e3921264f3d8e..b2c38b635f144 100644 --- a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test +++ b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test @@ -142,31 +142,31 @@ SET SESSION wsrep_sync_wait = 0; --source include/kill_galera.inc --connection node_1_insert_simple ---error 2013 +--error 2013, 2026 --reap --connection node_1_insert_multi ---error 2013 +--error 2013, 2026 --reap --connection node_1_insert_transaction ---error 2013 +--error 2013, 2026 --reap --connection node_1_update_simple ---error 2013 +--error 2013, 2026 --reap --connection node_1_insert_1k ---error 2013 +--error 2013, 2026 --reap --connection node_1_insert_1m ---error 2013 +--error 2013, 2026 --reap --connection node_1_insert_10m ---error 2013 +--error 2013, 2026 --reap --connection node_1 diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def index ac7ce8c8ee64f..728500f45fc03 100644 --- a/mysql-test/suite/galera_3nodes/disabled.def +++ b/mysql-test/suite/galera_3nodes/disabled.def @@ -12,9 +12,6 @@ galera_2_cluster : MDEV-32631 galera_2_cluster: before_rollback(): Assertion `0' failed galera_gtid_2_cluster : MDEV-32633 galera_gtid_2_cluster: Assertion `thd->wsrep_next_trx_id() != (0x7fffffffffffffffLL * 2ULL + 1)' -galera_ipv6_mariabackup : MDEV-24097 -galera_ipv6_mariabackup_section : MDEV-24097, MDEV-22195 -galera_vote_rejoin_mysqldump : MDEV-24481: galera_3nodes.galera_vote_rejoin_mysqldump MTR failed: mysql_shutdown failed galera_ssl_reload : MDEV-32778 galera_ssl_reload failed with warning message galera_ipv6_mariabackup : temporarily disabled at the request of Codership galera_pc_bootstrap : temporarily disabled at the request of Codership diff --git a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result index e49a1714a3edf..6faafacd61bd4 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result +++ b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result @@ -39,6 +39,9 @@ SELECT VARIABLE_VALUE AS expect_Disconnected FROM INFORMATION_SCHEMA.GLOBAL_STAT expect_Disconnected Disconnected SET SESSION wsrep_on=ON; +SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +expect_3 +3 SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; expect_Primary Primary @@ -49,17 +52,11 @@ t1 CREATE TABLE `t1` ( `f1` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci connection node_2; -SET SESSION wsrep_on=OFF; -SET SESSION wsrep_on=ON; -# restart SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f1` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci -SELECT COUNT(*) AS expect_0 FROM t1; -expect_0 -0 CALL mtr.add_suppression("is inconsistent with group"); connection node_3; SHOW CREATE TABLE t1; @@ -71,13 +68,16 @@ DROP TABLE t1; CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that column/key exists'"); connection node_1; connection node_1; -CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); +CALL mtr.add_suppression("Slave SQL: Error 'The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); DROP USER sst; connection node_2; -CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); +CALL mtr.add_suppression("Slave SQL: Error 'The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found"); CALL mtr.add_suppression("Can't open and lock time zone table"); 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"); CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +connection node_2; +# restart +connection node_1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test index 70d58cb25f4d1..6c7b255bdc3f5 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test +++ b/mysql-test/suite/galera_3nodes/t/galera_vote_rejoin_mysqldump.test @@ -59,6 +59,7 @@ SET SESSION wsrep_on=ON; --let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --source include/wait_condition.inc +SELECT VARIABLE_VALUE AS expect_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; # Confirm that the table is now identical throughout @@ -67,18 +68,7 @@ SELECT VARIABLE_VALUE AS expect_Primary FROM INFORMATION_SCHEMA.GLOBAL_STATUS WH SHOW CREATE TABLE t1; --connection node_2 -SET SESSION wsrep_on=OFF; ---let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; ---source include/wait_condition.inc ---source include/galera_wait_ready.inc -SET SESSION wsrep_on=ON; - -# restart node so we don't fail on WSREP_START_POSITION internal check ---source include/restart_mysqld.inc ---source include/wait_until_connected_again.inc - SHOW CREATE TABLE t1; -SELECT COUNT(*) AS expect_0 FROM t1; CALL mtr.add_suppression("is inconsistent with group"); --connection node_3 @@ -89,5 +79,14 @@ CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that col --connection node_1 --source suite/galera/include/galera_sst_restore.inc +--connection node_2 +# restart node so we don't fail on WSREP_START_POSITION internal check +--source include/restart_mysqld.inc +--source include/wait_until_connected_again.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 + # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result index 726f70145f159..9043c66840d9e 100644 --- a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result @@ -12,7 +12,7 @@ SET SESSION wsrep_trx_fragment_size=1; START TRANSACTION; INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); COMMIT; -ERROR HY000: Lost connection to server during query +Got one of the listed errors # restart connection node_1; SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test index ab8b62b969a91..5da080a6c2c2b 100644 --- a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test +++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test @@ -26,7 +26,7 @@ SET SESSION wsrep_trx_fragment_size=1; START TRANSACTION; INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); ---error 2013 +--error 2013,2026 COMMIT; --source include/start_mysqld.inc diff --git a/mysql-test/suite/galera_sr/r/MDEV-27615.result b/mysql-test/suite/galera_sr/r/MDEV-27615.result index e3bfd0ed5396d..8965cc8e99eae 100644 --- a/mysql-test/suite/galera_sr/r/MDEV-27615.result +++ b/mysql-test/suite/galera_sr/r/MDEV-27615.result @@ -15,7 +15,7 @@ SET DEBUG_SYNC='now WAIT_FOR before_fragment'; SET GLOBAL wsrep_cluster_address = ''; SET DEBUG_SYNC = 'now SIGNAL continue'; connection node_2; -ERROR HY000: Lost connection to server during query +Got one of the listed errors connection node_2a; SELECT * FROM mysql.wsrep_streaming_log; node_uuid trx_id seqno flags frag diff --git a/mysql-test/suite/galera_sr/t/MDEV-27615.test b/mysql-test/suite/galera_sr/t/MDEV-27615.test index 121a85fb20c2d..8cc425aa7e182 100644 --- a/mysql-test/suite/galera_sr/t/MDEV-27615.test +++ b/mysql-test/suite/galera_sr/t/MDEV-27615.test @@ -43,7 +43,8 @@ SET DEBUG_SYNC = 'now SIGNAL continue'; # Disconnect causes connection to node_2 to be closed # --connection node_2 ---error 2013 # CR_SERVER_LOST +# CR_SERVER_LOST, CR_SSL_CONNECTION_ERROR +--error 2013,2026 --reap diff --git a/mysql-test/suite/galera_sr/t/MDEV-28971.test b/mysql-test/suite/galera_sr/t/MDEV-28971.test index 81238f94b4ab1..d3dbf03b4df36 100644 --- a/mysql-test/suite/galera_sr/t/MDEV-28971.test +++ b/mysql-test/suite/galera_sr/t/MDEV-28971.test @@ -15,6 +15,6 @@ INSERT INTO t1 VALUES ('AAF'); SELECT SETVAL (SEQ, 100); ALTER TABLE t1 ADD CONSTRAINT constraint_1 UNIQUE (a); INSERT INTO t1 VALUES(); ---error ER_KEY_COLUMN_DOES_NOT_EXITS +--error ER_KEY_COLUMN_DOES_NOT_EXIST ALTER TABLE t1 ADD KEY(b (50)); DROP TABLE t1,SEQ; diff --git a/mysql-test/suite/wsrep/disabled.def b/mysql-test/suite/wsrep/disabled.def index 991109d72b8d4..f41452116809d 100644 --- a/mysql-test/suite/wsrep/disabled.def +++ b/mysql-test/suite/wsrep/disabled.def @@ -11,7 +11,3 @@ ############################################################################## -mdev_6832: wsrep_provider is read-only for security reasons -MDEV-23092: wsrep_provider is read-only for security reasons -wsrep_variables_no_provider: wsrep_provider is read-only for security reasons -MDEV-22443: it is no longer allowed enable wsrep_on if wsrep_provider is 'none' diff --git a/mysql-test/suite/wsrep/r/MDEV-22443.result b/mysql-test/suite/wsrep/r/MDEV-22443.result deleted file mode 100644 index ea07cbec5a015..0000000000000 --- a/mysql-test/suite/wsrep/r/MDEV-22443.result +++ /dev/null @@ -1,3 +0,0 @@ -SET SESSION wsrep_sync_wait=15; -SET SESSION wsrep_on=1; -START TRANSACTION READ WRITE; diff --git a/mysql-test/suite/wsrep/r/MDEV-23092.result b/mysql-test/suite/wsrep/r/MDEV-23092.result deleted file mode 100644 index d88aacf7d5c52..0000000000000 --- a/mysql-test/suite/wsrep/r/MDEV-23092.result +++ /dev/null @@ -1,13 +0,0 @@ -SET COLLATION_CONNECTION='utf16le_bin'; -SET GLOBAL wsrep_provider='/invalid/path/libgalera_smm.so'; -ERROR 42000: Variable 'wsrep_provider' can't be set to the value of '/' -SET GLOBAL wsrep_cluster_address='OFF'; -SET GLOBAL wsrep_slave_threads=10; -SELECT 1; -1 -1 -SET GLOBAL wsrep_cluster_address='gcomm://'; -SET GLOBAL wsrep_slave_threads=DEFAULT; -CALL mtr.add_suppression("wsrep_load()"); -CALL mtr.add_suppression("Failed to create a new provider"); -CALL mtr.add_suppression("Failed to load provider"); diff --git a/mysql-test/suite/wsrep/r/mdev_6832.result b/mysql-test/suite/wsrep/r/mdev_6832.result deleted file mode 100644 index 43894a6ec4941..0000000000000 --- a/mysql-test/suite/wsrep/r/mdev_6832.result +++ /dev/null @@ -1,11 +0,0 @@ -# -# MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS -# -SHOW STATUS LIKE 'wsrep_ready'; -Variable_name Value -wsrep_ready ON -SHOW STATUS LIKE 'wsrep_ready'; -Variable_name Value -wsrep_ready OFF -SET @@global.wsrep_cluster_address='gcomm://'; -# End of test. diff --git a/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result b/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result deleted file mode 100644 index ad35dc8dbcdbb..0000000000000 --- a/mysql-test/suite/wsrep/r/wsrep_variables_no_provider.result +++ /dev/null @@ -1,44 +0,0 @@ -SELECT @@wsrep_on; -@@wsrep_on -1 -SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads; -SET @wsrep_debug_saved = @@global.wsrep_debug; -SET @wsrep_provider_options_saved= @@global.wsrep_provider_options; -SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address; -SET GLOBAL wsrep_provider=none; -SET SESSION wsrep_trx_fragment_size=DEFAULT; -ERROR HY000: Incorrect arguments to SET -SELECT @@session.wsrep_trx_fragment_size; -@@session.wsrep_trx_fragment_size -0 -SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; -ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100' -SHOW WARNINGS; -Level Code Message -Warning 1231 Cannot set 'wsrep_start_position' because wsrep is switched off or provider is not loaded -Error 1231 Variable 'wsrep_start_position' can't be set to the value of '12345678-1234-1234-1234-123456789012:100' -SELECT @@global.wsrep_start_position; -@@global.wsrep_start_position -00000000-0000-0000-0000-000000000000:-1 -SET GLOBAL wsrep_debug=1; -Warnings: -Warning 1231 Setting 'wsrep_debug' has no effect because wsrep is switched off -SELECT @@global.wsrep_debug; -@@global.wsrep_debug -NONE -SET GLOBAL wsrep_slave_threads=5; -SELECT @@global.wsrep_slave_threads; -@@global.wsrep_slave_threads -5 -SET GLOBAL wsrep_desync=1; -ERROR HY000: WSREP (galera) not started -SELECT @@global.wsrep_desync; -@@global.wsrep_desync -0 -SET SESSION wsrep_trx_fragment_unit='rows'; -ERROR HY000: Incorrect arguments to SET -SELECT @@session.wsrep_trx_fragment_unit; -@@session.wsrep_trx_fragment_unit -rows -SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved; -SET @@global.wsrep_debug = @wsrep_debug_saved; diff --git a/mysql-test/suite/wsrep/t/MDEV-22443.cnf b/mysql-test/suite/wsrep/t/MDEV-22443.cnf deleted file mode 100644 index 851f2999a83f5..0000000000000 --- a/mysql-test/suite/wsrep/t/MDEV-22443.cnf +++ /dev/null @@ -1,8 +0,0 @@ -!include ../my.cnf - -[mysqld.1] -wsrep-on=OFF -binlog-format=ROW -wsrep-provider=none -wsrep-cluster-address='gcomm://' -innodb_autoinc_lock_mode=2 diff --git a/mysql-test/suite/wsrep/t/MDEV-22443.test b/mysql-test/suite/wsrep/t/MDEV-22443.test deleted file mode 100644 index 674cb5ae2d8b2..0000000000000 --- a/mysql-test/suite/wsrep/t/MDEV-22443.test +++ /dev/null @@ -1,12 +0,0 @@ -# -# MDEV-22443: terminate called after throwing an instance of -# 'wsrep::runtime_error' in std::terminate on START TRANSACTION -# - ---source include/have_innodb.inc ---source include/have_wsrep.inc ---source include/have_binlog_format_row.inc - -SET SESSION wsrep_sync_wait=15; -SET SESSION wsrep_on=1; -START TRANSACTION READ WRITE; diff --git a/mysql-test/suite/wsrep/t/MDEV-23092.cnf b/mysql-test/suite/wsrep/t/MDEV-23092.cnf deleted file mode 100644 index 851f2999a83f5..0000000000000 --- a/mysql-test/suite/wsrep/t/MDEV-23092.cnf +++ /dev/null @@ -1,8 +0,0 @@ -!include ../my.cnf - -[mysqld.1] -wsrep-on=OFF -binlog-format=ROW -wsrep-provider=none -wsrep-cluster-address='gcomm://' -innodb_autoinc_lock_mode=2 diff --git a/mysql-test/suite/wsrep/t/MDEV-23092.test b/mysql-test/suite/wsrep/t/MDEV-23092.test deleted file mode 100644 index 92a6e3920139b..0000000000000 --- a/mysql-test/suite/wsrep/t/MDEV-23092.test +++ /dev/null @@ -1,22 +0,0 @@ -# -# MDEV-23092: SIGABRT in wsrep::server_state::provider when setting -# invalid wsrep_provider (on optimized builds) -# - ---source include/have_innodb.inc ---source include/have_wsrep.inc ---source include/have_binlog_format_row.inc - -SET COLLATION_CONNECTION='utf16le_bin'; ---error 1231 -SET GLOBAL wsrep_provider='/invalid/path/libgalera_smm.so'; -SET GLOBAL wsrep_cluster_address='OFF'; -SET GLOBAL wsrep_slave_threads=10; -SELECT 1; - -SET GLOBAL wsrep_cluster_address='gcomm://'; -SET GLOBAL wsrep_slave_threads=DEFAULT; - -CALL mtr.add_suppression("wsrep_load()"); -CALL mtr.add_suppression("Failed to create a new provider"); -CALL mtr.add_suppression("Failed to load provider"); diff --git a/mysql-test/suite/wsrep/t/mdev_6832.cnf b/mysql-test/suite/wsrep/t/mdev_6832.cnf deleted file mode 100644 index 0bf01f81fc557..0000000000000 --- a/mysql-test/suite/wsrep/t/mdev_6832.cnf +++ /dev/null @@ -1,7 +0,0 @@ -!include ../my.cnf - -[mysqld.1] -wsrep-on=ON -wsrep-provider=@ENV.WSREP_PROVIDER -wsrep-cluster-address=gcomm:// - diff --git a/mysql-test/suite/wsrep/t/mdev_6832.test b/mysql-test/suite/wsrep/t/mdev_6832.test deleted file mode 100644 index d5303ce3fcf2d..0000000000000 --- a/mysql-test/suite/wsrep/t/mdev_6832.test +++ /dev/null @@ -1,17 +0,0 @@ ---source include/have_innodb.inc ---source include/have_wsrep_provider.inc ---source include/have_binlog_format_row.inc - ---echo # ---echo # MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS ---echo # - -SHOW STATUS LIKE 'wsrep_ready'; ---disable_query_log -eval SET @@global.wsrep_provider='$WSREP_PROVIDER'; ---enable_query_log -SHOW STATUS LIKE 'wsrep_ready'; -SET @@global.wsrep_cluster_address='gcomm://'; ---let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; ---source include/wait_condition.inc ---echo # End of test. diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf deleted file mode 100644 index b73146d26e7d6..0000000000000 --- a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.cnf +++ /dev/null @@ -1,12 +0,0 @@ -# Use default setting for mysqld processes -!include include/default_mysqld.cnf - -[mysqld.1] -wsrep-on=ON -binlog-format=ROW -wsrep-provider=@ENV.WSREP_PROVIDER -wsrep-cluster-address='gcomm://' -#galera_port=@OPT.port -#ist_port=@OPT.port -#sst_port=@OPT.port - diff --git a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test b/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test deleted file mode 100644 index b44c9c5ebc874..0000000000000 --- a/mysql-test/suite/wsrep/t/wsrep_variables_no_provider.test +++ /dev/null @@ -1,38 +0,0 @@ ---source include/have_wsrep.inc ---source include/have_innodb.inc - -SELECT @@wsrep_on; - -SET @wsrep_slave_threads_global_saved = @@global.wsrep_slave_threads; -SET @wsrep_debug_saved = @@global.wsrep_debug; -SET @wsrep_provider_options_saved= @@global.wsrep_provider_options; -SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address; - -SET GLOBAL wsrep_provider=none; - ---error ER_WRONG_ARGUMENTS -SET SESSION wsrep_trx_fragment_size=DEFAULT; -SELECT @@session.wsrep_trx_fragment_size; ---error ER_WRONG_VALUE_FOR_VAR -SET GLOBAL wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; -SHOW WARNINGS; -SELECT @@global.wsrep_start_position; -SET GLOBAL wsrep_debug=1; -SELECT @@global.wsrep_debug; -SET GLOBAL wsrep_slave_threads=5; -SELECT @@global.wsrep_slave_threads; ---error ER_WRONG_ARGUMENTS -SET GLOBAL wsrep_desync=1; -SELECT @@global.wsrep_desync; ---error ER_WRONG_ARGUMENTS -SET SESSION wsrep_trx_fragment_unit='rows'; -SELECT @@session.wsrep_trx_fragment_unit; - ---disable_query_log -eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER'; -SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved; -SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved; ---source include/galera_wait_ready.inc -SET @@global.wsrep_slave_threads = @wsrep_slave_threads_global_saved; -SET @@global.wsrep_debug = @wsrep_debug_saved; ---enable_query_log diff --git a/sql/log.cc b/sql/log.cc index a67c919f90dc1..fe067739ebedb 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -12129,6 +12129,15 @@ IO_CACHE *wsrep_get_cache(THD * thd, bool is_transactional) return NULL; } +bool wsrep_is_binlog_cache_empty(THD *thd) +{ + binlog_cache_mngr *cache_mngr= + (binlog_cache_mngr *) thd_get_ha_data(thd, binlog_hton); + if (cache_mngr) + return cache_mngr->trx_cache.empty() && cache_mngr->stmt_cache.empty(); + return true; +} + void wsrep_thd_binlog_trx_reset(THD * thd) { DBUG_ENTER("wsrep_thd_binlog_trx_reset"); diff --git a/sql/log.h b/sql/log.h index abe1356c3ddf3..ae813f7588dfa 100644 --- a/sql/log.h +++ b/sql/log.h @@ -1254,6 +1254,7 @@ static inline TC_LOG *get_tc_log_implementation() #ifdef WITH_WSREP IO_CACHE* wsrep_get_cache(THD *, bool); +bool wsrep_is_binlog_cache_empty(THD *); void wsrep_thd_binlog_trx_reset(THD * thd); void wsrep_thd_binlog_stmt_rollback(THD * thd); #endif /* WITH_WSREP */ diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h index a963a2b18ce6b..25e71638efd74 100644 --- a/sql/wsrep_trans_observer.h +++ b/sql/wsrep_trans_observer.h @@ -91,7 +91,13 @@ static inline bool wsrep_is_real(THD* thd, bool all) */ static inline bool wsrep_has_changes(THD* thd) { - return (thd->wsrep_trx().is_empty() == false); + // Transaction has changes to replicate if it + // has appended one or more certification keys, + // and has actual changes to replicate in binlog + // cache. Except for streaming replication, + // where commit message may have no payload. + return !thd->wsrep_trx().is_empty() && + (!wsrep_is_binlog_cache_empty(thd) || thd->wsrep_trx().is_streaming()); } /* diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index dfa995dc16e86..bd29af780921d 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -847,8 +847,11 @@ class mem_pressure { uint64_t u= 1; m_abort= true; - if (write(m_event_fd, &u, sizeof(uint64_t)) != sizeof(uint64_t)) - sql_print_warning("InnoDB: Failed to write memory pressure quit message"); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" + /* return result ignored, cannot do anything with it */ + write(m_event_fd, &u, sizeof(uint64_t)); +#pragma GCC diagnostic pop } void join() @@ -893,11 +896,7 @@ void mem_pressure::pressure_routine(mem_pressure *m) if (errno == EINTR) continue; else - { - sql_print_warning("InnoDB: memory pressure poll error %s", - strerror(errno)); break; - } } if (!m->m_abort) break; diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_32986.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_32986.result new file mode 100644 index 0000000000000..bdc580d421ac4 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_32986.result @@ -0,0 +1,23 @@ +# +# MDEV-32907 +# +for master_1 +for child2 +for child3 +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +create table t2 (c varchar(16)); +create table t1 (c varchar(16)) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +insert into t1 values ('TestSpiderRegex'); +select c from t1 where c regexp '(Test|Spider|Regex)'; +c +TestSpiderRegex +drop table t1, t2; +drop server srv; +for master_1 +for child2 +for child3 +# +# end of test mdev_32907 +# diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_32986.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_32986.test new file mode 100644 index 0000000000000..94081d24ad809 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_32986.test @@ -0,0 +1,28 @@ +--echo # +--echo # MDEV-32907 +--echo # +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +create table t2 (c varchar(16)); +create table t1 (c varchar(16)) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; + +insert into t1 values ('TestSpiderRegex'); +select c from t1 where c regexp '(Test|Spider|Regex)'; +drop table t1, t2; +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log +--echo # +--echo # end of test mdev_32907 +--echo # diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 8b02e75317dda..1ffaaa9cce6c2 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -5839,12 +5839,17 @@ int spider_db_mbase_util::print_item_func( item_count -= 2; break; } - } else if (func_name_length == 6 && - !strncasecmp("istrue", func_name, func_name_length) - ) { - last_str = SPIDER_SQL_IS_TRUE_STR; - last_str_length = SPIDER_SQL_IS_TRUE_LEN; - break; + } else if (func_name_length == 6) + { + if (!strncasecmp("istrue", func_name, func_name_length)) + { + last_str= SPIDER_SQL_IS_TRUE_STR; + last_str_length= SPIDER_SQL_IS_TRUE_LEN; + break; + } + else if (!strncasecmp("regexp", func_name, func_name_length)) + /* Keep the infix expression */ + break; } else if (func_name_length == 7) { if (!strncasecmp("isfalse", func_name, func_name_length))