diff --git a/mysql-test/include/linux.inc b/mysql-test/include/linux.inc index f24832ca476..cc126ff1d73 100644 --- a/mysql-test/include/linux.inc +++ b/mysql-test/include/linux.inc @@ -1,4 +1,4 @@ -if (`select convert(@@version_compile_os using latin1) LIKE 'Linux' = 0`) +if (`select @@version_compile_os not LIKE 'Linux%'`) { skip Need Linux; } diff --git a/mysql-test/main/no-threads-master.opt b/mysql-test/main/no-threads.opt similarity index 100% rename from mysql-test/main/no-threads-master.opt rename to mysql-test/main/no-threads.opt diff --git a/mysql-test/main/no-threads.test b/mysql-test/main/no-threads.test index c1a608a57e6..8235ff67284 100644 --- a/mysql-test/main/no-threads.test +++ b/mysql-test/main/no-threads.test @@ -2,7 +2,6 @@ # an additional util connection and other statistics data -- source include/no_view_protocol.inc ---source include/one_thread_per_connection.inc # # Test the --thread-handler=no-threads option # diff --git a/mysql-test/main/ssl_cipher.result b/mysql-test/main/ssl_cipher.result index 42f37f488e7..d549ec7d2b4 100644 --- a/mysql-test/main/ssl_cipher.result +++ b/mysql-test/main/ssl_cipher.result @@ -66,3 +66,5 @@ VARIABLE_VALUE like '%AES128-SHA%' 1 disconnect ssl_con; connection default; +call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure"); +FOUND 2 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err diff --git a/mysql-test/main/ssl_cipher.test b/mysql-test/main/ssl_cipher.test index 4671b085ce7..7150e19809e 100644 --- a/mysql-test/main/ssl_cipher.test +++ b/mysql-test/main/ssl_cipher.test @@ -101,3 +101,9 @@ SHOW STATUS LIKE 'Ssl_cipher'; SELECT VARIABLE_VALUE like '%AES128-SHA%' FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher_list'; disconnect ssl_con; connection default; + +# MDEV-31369 Disable TLS v1.0 and 1.1 for MariaDB +call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure"); +--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err +--let SEARCH_PATTERN= TLSv1.0 and TLSv1.1 are insecure +--source include/search_pattern_in_file.inc diff --git a/mysql-test/main/tls_version.result b/mysql-test/main/tls_version.result index d1b20a121fe..3d9565983e8 100644 --- a/mysql-test/main/tls_version.result +++ b/mysql-test/main/tls_version.result @@ -12,3 +12,5 @@ Variable_name Value Ssl_version TLSv1.2 @@tls_version TLSv1.1,TLSv1.2 +call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure"); +FOUND 1 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err diff --git a/mysql-test/main/tls_version.test b/mysql-test/main/tls_version.test index 875fed19821..50448f898e9 100644 --- a/mysql-test/main/tls_version.test +++ b/mysql-test/main/tls_version.test @@ -22,3 +22,8 @@ # finally list available protocols --exec $MYSQL --host=localhost --ssl -e "select @@tls_version;" +call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure"); +--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err +--let SEARCH_PATTERN= TLSv1.0 and TLSv1.1 are insecure +--source include/search_pattern_in_file.inc + diff --git a/mysql-test/main/tls_version1.result b/mysql-test/main/tls_version1.result index 8333bfec159..caabed832cb 100644 --- a/mysql-test/main/tls_version1.result +++ b/mysql-test/main/tls_version1.result @@ -4,3 +4,5 @@ Variable_name Value Ssl_version TLSv1 @@tls_version TLSv1.0 +call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure"); +FOUND 1 /TLSv1.0 and TLSv1.1 are insecure/ in mysqld.1.err diff --git a/mysql-test/main/tls_version1.test b/mysql-test/main/tls_version1.test index d38de876ba3..788284c36df 100644 --- a/mysql-test/main/tls_version1.test +++ b/mysql-test/main/tls_version1.test @@ -10,3 +10,8 @@ --exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';" --exec $MYSQL --host=localhost --ssl -e "select @@tls_version;" +call mtr.add_suppression("TLSv1.0 and TLSv1.1 are insecure"); +--let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err +--let SEARCH_PATTERN= TLSv1.0 and TLSv1.1 are insecure +--source include/search_pattern_in_file.inc + diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 179c9edccc8..104a631f8b7 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -13,9 +13,6 @@ galera_as_slave_ctas : MDEV-28378 timeout galera_pc_recovery : MDEV-25199 cluster fails to start up galera_sst_encrypted : MDEV-29876 Galera test failure on galera_sst_encrypted -galera_binlog_checksum : MDEV-29861 Galera test case hangs -galera_var_notify_ssl_ipv6 : MDEV-29861 Galera test case hangs -galera_var_notify_cmd: MDEV-29861 Galera test case hangs galera_var_node_address : MDEV-20485 Galera test failure MDEV-26575 : MDEV-29878 Galera test failure on MDEV-26575 galera_bf_abort_shutdown : MDEV-29918 Assertion failure on galera_bf_abort_shutdown diff --git a/mysql-test/suite/galera/r/galera_partition.result b/mysql-test/suite/galera/r/galera_partition.result index 0e8894794d7..7b4d6e41054 100644 --- a/mysql-test/suite/galera/r/galera_partition.result +++ b/mysql-test/suite/galera/r/galera_partition.result @@ -3,8 +3,6 @@ connection node_1; connection node_1; call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); -connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; -connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; connection node_1; CREATE TABLE t1( id bigint unsigned NOT NULL AUTO_INCREMENT, @@ -396,33 +394,24 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00'); SELECT COUNT(*) FROM t1; COUNT(*) 350 -connection node_2; -call mtr.add_suppression("WSREP: Sending JOIN failed:"); -call p1(10); -connection node_3; -call mtr.add_suppression("WSREP: Sending JOIN failed:"); -call p1(10); -connection node_4; -call mtr.add_suppression("WSREP: Sending JOIN failed:"); -call p1(10); connection node_1; +call p1(10);; +connection node_2; +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; SET SESSION wsrep_OSU_method='RSU'; -SELECT @@wsrep_OSU_method; -@@wsrep_OSU_method -RSU SET SESSION sql_log_bin = 0; ALTER TABLE t1 DROP PARTITION rx2009xx; ALTER TABLE t1 DROP PARTITION rx201004; ALTER TABLE t1 DROP PARTITION rx201008; SET SESSION wsrep_OSU_METHOD='TOI'; +SET SESSION sql_log_bin = 1; SELECT @@wsrep_OSU_method; @@wsrep_OSU_method TOI connection node_2; -connection node_3; -connection node_4; +disconnect node_2a; +connection node_1; connection node_1; DROP TABLE t1; DROP PROCEDURE p1; -disconnect node_3; -disconnect node_4; diff --git a/mysql-test/suite/galera/t/galera_partition.cnf b/mysql-test/suite/galera/t/galera_partition.cnf deleted file mode 100644 index 525eece04ab..00000000000 --- a/mysql-test/suite/galera/t/galera_partition.cnf +++ /dev/null @@ -1,22 +0,0 @@ -!include ../galera_4nodes.cnf - -[mysqld.1] -wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1' -wsrep_slave_threads=10 -wsrep_debug=1 - -[mysqld.2] -wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1' -wsrep_slave_threads=10 -wsrep_debug=1 - -[mysqld.3] -wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2' -wsrep_slave_threads=10 -wsrep_debug=1 - -[mysqld.4] -wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3' -wsrep_slave_threads=10 -wsrep_debug=1 - diff --git a/mysql-test/suite/galera/t/galera_partition.test b/mysql-test/suite/galera/t/galera_partition.test index 3de45d54000..269291311f1 100644 --- a/mysql-test/suite/galera/t/galera_partition.test +++ b/mysql-test/suite/galera/t/galera_partition.test @@ -1,17 +1,15 @@ --source include/galera_cluster.inc --source include/have_partition.inc --source include/big_test.inc +--source include/force_restart.inc --connection node_1 call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); ---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 ---connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 - --connection node_1 ---let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--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( @@ -408,50 +406,37 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00'); SELECT COUNT(*) FROM t1; ---connection node_2 -call mtr.add_suppression("WSREP: Sending JOIN failed:"); -send call p1(10); - ---connection node_3 -call mtr.add_suppression("WSREP: Sending JOIN failed:"); -send call p1(10); - ---connection node_4 -call mtr.add_suppression("WSREP: Sending JOIN failed:"); -send call p1(10); - --connection node_1 +--send call p1(10); + +--connection node_2 + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--connection node_2a SET SESSION wsrep_OSU_method='RSU'; -SELECT @@wsrep_OSU_method; SET SESSION sql_log_bin = 0; ---error 0,ER_LOCK_DEADLOCK +--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT ALTER TABLE t1 DROP PARTITION rx2009xx; ---error 0,ER_LOCK_DEADLOCK +--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT ALTER TABLE t1 DROP PARTITION rx201004; ---error 0,ER_LOCK_DEADLOCK +--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT ALTER TABLE t1 DROP PARTITION rx201008; SET SESSION wsrep_OSU_METHOD='TOI'; +SET SESSION sql_log_bin = 1; SELECT @@wsrep_OSU_method; --connection node_2 ---error 0,ER_LOCK_DEADLOCK -reap; +--disconnect node_2a ---connection node_3 ---error 0,ER_LOCK_DEADLOCK -reap; - ---connection node_4 ---error 0,ER_LOCK_DEADLOCK +--connection node_1 +--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT reap; --connection node_1 DROP TABLE t1; DROP PROCEDURE p1; ---disconnect node_3 ---disconnect node_4 diff --git a/mysql-test/suite/galera_sr/r/MDEV-32051.result b/mysql-test/suite/galera_sr/r/MDEV-32051.result new file mode 100644 index 00000000000..2328bdb57b0 --- /dev/null +++ b/mysql-test/suite/galera_sr/r/MDEV-32051.result @@ -0,0 +1,38 @@ +connection node_2; +connection node_1; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES(1); +connection node_1; +SET SESSION wsrep_trx_fragment_size=1; +SET DEBUG_SYNC='wsrep_before_certification SIGNAL before_fragment WAIT_FOR continue'; +INSERT INTO t1 VALUES (2); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; +SET SESSION wsrep_sync_wait=0; +SET DEBUG_SYNC='now WAIT_FOR before_fragment'; +SET GLOBAL wsrep_provider_options = 'dbug=d,before_replicate_sync'; +SET DEBUG_SYNC='now SIGNAL continue'; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET DEBUG_SYNC='RESET'; +connection node_2; +TRUNCATE TABLE t1; +connection node_1a; +SET GLOBAL wsrep_provider_options = 'signal=before_replicate_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +connection node_1; +SELECT * FROM t1; +f1 +2 +SELECT COUNT(*) FROM mysql.wsrep_streaming_log; +COUNT(*) +0 +connection node_2; +SELECT * FROM t1; +f1 +2 +SELECT COUNT(*) FROM mysql.wsrep_streaming_log; +COUNT(*) +0 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/MDEV-32051.test b/mysql-test/suite/galera_sr/t/MDEV-32051.test new file mode 100644 index 00000000000..bfdea3f13e7 --- /dev/null +++ b/mysql-test/suite/galera_sr/t/MDEV-32051.test @@ -0,0 +1,72 @@ +# +# MDEV-32051 : Failed to insert streaming client +# +# Test outline: +# To reproduce we need a autocommit INSERT with streaming enabled, +# and a conflicting TRUNCATE. +# The INSERT is BF aborted by TRUNCATE during replication of the commit +# fragment, so that the INSERT must be rolled back replayed. During +# replay it fails certification, finally the statement is retried and +# succeeds. If bug is present, the streaming client for the INSERT does +# not get deleted after replay, causing the warning (or assert in debug builds) +# when retrying attempts to create the same streaming client with the same id. +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source include/galera_have_debug_sync.inc + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES(1); + +# +# Issue an INSERT and block it right before certification +# of the commit fragment. This is needed to setup for +# before_replicate_sync in galera, to make sure we catch +# the commit fragment. +# +--connection node_1 +SET SESSION wsrep_trx_fragment_size=1; +SET DEBUG_SYNC='wsrep_before_certification SIGNAL before_fragment WAIT_FOR continue'; +--send INSERT INTO t1 VALUES (2) + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION wsrep_sync_wait=0; +SET DEBUG_SYNC='now WAIT_FOR before_fragment'; +--let galera_sync_point = before_replicate_sync +--source include/galera_set_sync_point.inc +SET DEBUG_SYNC='now SIGNAL continue'; +--source include/galera_wait_sync_point.inc +SET DEBUG_SYNC='RESET'; + +# +# Commit fragment of INSERT is now parked in galera side +# before replication. Issue the conflicting DDL +# +--connection node_2 +TRUNCATE TABLE t1; + +--connection node_1a +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc + +# INSERT is first aborted, but ultimately succeeds because of wsrep_autocommit_retry +# If bug is present: +# [Warning] WSREP: Failed to insert streaming client +# server_state.cpp:1152: void wsrep::server_state::start_streaming_client(wsrep::client_state*): Assertion `0' failed. +--connection node_1 +--reap + +SELECT * FROM t1; +SELECT COUNT(*) FROM mysql.wsrep_streaming_log; + +--connection node_2 + +SELECT * FROM t1; +SELECT COUNT(*) FROM mysql.wsrep_streaming_log; + + +DROP TABLE t1; diff --git a/mysql-test/suite/plugins/t/show_all_plugins.test b/mysql-test/suite/plugins/t/show_all_plugins.test index 77723d32170..171bcc93bbd 100644 --- a/mysql-test/suite/plugins/t/show_all_plugins.test +++ b/mysql-test/suite/plugins/t/show_all_plugins.test @@ -1,7 +1,7 @@ +--source include/have_udf.inc if (!$DIALOG_EXAMPLES_SO) { skip requires dialog_examples.so; } if (!$HA_EXAMPLE_SO) { skip requires ha_examples.so; } if (!$LIBDAEMON_EXAMPLE_SO) { skip requires libdaemon_examples.so; } -if (!$UDF_EXAMPLE_SO) { skip requires udf_example.so; } if (!$EXAMPLE_KEY_MANAGEMENT_SO) { skip requires example_key_management.so; } if (`SELECT VERSION() LIKE '%embedded%'`) { skip Disabled for embedded until MDEV-8664 is resolved; } diff --git a/mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result b/mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result new file mode 100644 index 00000000000..b14f7b01541 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sql_thd_start_errno_cleared.result @@ -0,0 +1,48 @@ +include/master-slave.inc +[connection master] +connection master; +create table t1 (a int primary key, b int) engine=innodb; +insert t1 values (1,1); +include/save_master_gtid.inc +connection slave; +include/sync_with_master_gtid.inc +include/stop_slave.inc +set @save_innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout; +set @save_slave_trans_retries= @@global.slave_transaction_retries; +set @@global.innodb_lock_wait_timeout= 1; +set @@global.slave_transaction_retries= 0; +connection master; +update t1 set b=b+10 where a=1; +include/save_master_gtid.inc +connection slave1; +BEGIN; +SELECT * FROM t1 WHERE a=1 FOR UPDATE; +a b +1 1 +connection slave; +include/start_slave.inc +include/wait_for_slave_sql_error.inc [errno=1205] +connection slave1; +ROLLBACK; +connection slave; +set @save_dbug = @@global.debug_dbug; +set @@global.debug_dbug= "+d,delay_sql_thread_after_release_run_lock"; +include/start_slave.inc +set debug_sync= "now wait_for sql_thread_run_lock_released"; +# Validating that the SQL thread is running.. +# ..success +# Validating that Last_SQL_Errno is cleared.. +# ..success +set debug_sync= "now signal sql_thread_continue"; +set @@global.debug_dbug= @saved_dbug; +set debug_sync= "RESET"; +# Cleanup +connection master; +drop table t1; +connection slave; +include/stop_slave.inc +set @@global.innodb_lock_wait_timeout= @save_innodb_lock_wait_timeout; +set @@global.slave_transaction_retries= @save_slave_trans_retries; +include/start_slave.inc +include/rpl_end.inc +# End of rpl_sql_thd_start_errno_cleared.test diff --git a/mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test b/mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test new file mode 100644 index 00000000000..f6dcfd91409 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test @@ -0,0 +1,93 @@ +# +# Ensure that when the slave restarts, the last error code displayed by +# SHOW SLAVE STATUS is cleared before Slave_SQL_Running is set. +# +# To ensure that, this test uses the debug_sync mechanism to pause an errored +# and restarting slave's SQL thread after it has set its running state to YES, +# and then ensures that Last_SQL_Errno is 0. The slave error is a forced innodb +# row lock timeout. +# +# +# References +# MDEV-31177: SHOW SLAVE STATUS Last_SQL_Errno Race Condition on Errored +# Slave Restart +# +source include/have_binlog_format_row.inc; +source include/have_innodb.inc; +source include/have_debug.inc; +source include/have_debug_sync.inc; +source include/master-slave.inc; + +--connection master +create table t1 (a int primary key, b int) engine=innodb; +insert t1 values (1,1); +--source include/save_master_gtid.inc + +--connection slave +--source include/sync_with_master_gtid.inc +--source include/stop_slave.inc +set @save_innodb_lock_wait_timeout= @@global.innodb_lock_wait_timeout; +set @save_slave_trans_retries= @@global.slave_transaction_retries; +set @@global.innodb_lock_wait_timeout= 1; +set @@global.slave_transaction_retries= 0; + +--connection master +update t1 set b=b+10 where a=1; +--source include/save_master_gtid.inc + +--connection slave1 +BEGIN; +--eval SELECT * FROM t1 WHERE a=1 FOR UPDATE + +--connection slave +--source include/start_slave.inc + +--let $slave_sql_errno= 1205 +--source include/wait_for_slave_sql_error.inc + +--connection slave1 +ROLLBACK; + +--connection slave +set @save_dbug = @@global.debug_dbug; +set @@global.debug_dbug= "+d,delay_sql_thread_after_release_run_lock"; +--source include/start_slave.inc +set debug_sync= "now wait_for sql_thread_run_lock_released"; + +--let $sql_running = query_get_value("SHOW SLAVE STATUS", Slave_SQL_Running, 1) +--echo # Validating that the SQL thread is running.. +if (`SELECT strcmp("$sql_running", "YES") != 0`) +{ + --echo # ..failed + --echo # Slave_SQL_Running: $sql_running + --die Slave SQL thread is not running +} +--echo # ..success + +--let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1) +--echo # Validating that Last_SQL_Errno is cleared.. +if ($last_error) +{ + --echo # ..failed + --echo # Last_SQL_Errno: $last_error + --die SHOW SLAVE STATUS shows the error from the last session on startup +} +--echo # ..success + +set debug_sync= "now signal sql_thread_continue"; + +set @@global.debug_dbug= @saved_dbug; +set debug_sync= "RESET"; + +--echo # Cleanup +--connection master +drop table t1; + +--connection slave +--source include/stop_slave.inc +set @@global.innodb_lock_wait_timeout= @save_innodb_lock_wait_timeout; +set @@global.slave_transaction_retries= @save_slave_trans_retries; +--source include/start_slave.inc + +--source include/rpl_end.inc +--echo # End of rpl_sql_thd_start_errno_cleared.test diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 375862a88ea..802da0391cb 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4176,6 +4176,8 @@ static int init_common_variables() return 1; } + if (tls_version & (VIO_TLSv1_0 + VIO_TLSv1_1)) + sql_print_warning("TLSv1.0 and TLSv1.1 are insecure and should not be used for tls_version"); #ifdef WITH_WSREP /* diff --git a/sql/slave.cc b/sql/slave.cc index 88bc4d49436..e66733c09b4 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -5291,6 +5291,19 @@ pthread_handler_t handle_slave_sql(void *arg) DBUG_ASSERT(rli->inited); DBUG_ASSERT(rli->mi == mi); + + /* + Reset errors for a clean start (otherwise, if the master is idle, the SQL + thread may execute no Query_log_event, so the error will remain even + though there's no problem anymore). Do not reset the master timestamp + (imagine the slave has caught everything, the STOP SLAVE and START SLAVE: + as we are not sure that we are going to receive a query, we want to + remember the last master timestamp (to say how many seconds behind we are + now. + But the master timestamp is reset by RESET SLAVE & CHANGE MASTER. + */ + rli->clear_error(); + mysql_mutex_lock(&rli->run_lock); DBUG_ASSERT(!rli->slave_running); errmsg= 0; @@ -5367,17 +5380,16 @@ pthread_handler_t handle_slave_sql(void *arg) mysql_mutex_unlock(&rli->run_lock); mysql_cond_broadcast(&rli->start_cond); - /* - Reset errors for a clean start (otherwise, if the master is idle, the SQL - thread may execute no Query_log_event, so the error will remain even - though there's no problem anymore). Do not reset the master timestamp - (imagine the slave has caught everything, the STOP SLAVE and START SLAVE: - as we are not sure that we are going to receive a query, we want to - remember the last master timestamp (to say how many seconds behind we are - now. - But the master timestamp is reset by RESET SLAVE & CHANGE MASTER. - */ - rli->clear_error(); +#ifdef ENABLED_DEBUG_SYNC + DBUG_EXECUTE_IF("delay_sql_thread_after_release_run_lock", { + const char act[]= "now " + "signal sql_thread_run_lock_released " + "wait_for sql_thread_continue"; + DBUG_ASSERT(debug_sync_service); + DBUG_ASSERT(!debug_sync_set_action(current_thd, STRING_WITH_LEN(act))); + };); +#endif + rli->parallel.reset(); //tell the I/O thread to take relay_log_space_limit into account from now on diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 906ca75a6a9..081c489de53 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3804,7 +3804,7 @@ static Sys_var_set Sys_tls_version( "TLS protocol version for secure connections.", READ_ONLY GLOBAL_VAR(tls_version), CMD_LINE(REQUIRED_ARG), tls_version_names, - DEFAULT(VIO_TLSv1_1 | VIO_TLSv1_2 | VIO_TLSv1_3)); + DEFAULT(VIO_TLSv1_2 | VIO_TLSv1_3)); static Sys_var_mybool Sys_standard_compliant_cte( "standard_compliant_cte", diff --git a/sql/wsrep_notify.cc b/sql/wsrep_notify.cc index 1de93d0d0e8..1c8b2b47bfe 100644 --- a/sql/wsrep_notify.cc +++ b/sql/wsrep_notify.cc @@ -21,6 +21,13 @@ void wsrep_notify_status(enum wsrep::server_state::state status, const wsrep::view* view) { + if (!view) + { + WSREP_DEBUG("wsrep_notify_status server not yet ready : wsrep_ready=%d status %d", + wsrep_ready, (int)status); + return; + } + if (!wsrep_notify_cmd || 0 == strlen(wsrep_notify_cmd)) { WSREP_INFO("wsrep_notify_cmd is not defined, skipping notification."); diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h index 743e8d1fb70..d34b15e3b09 100644 --- a/sql/wsrep_utils.h +++ b/sql/wsrep_utils.h @@ -189,7 +189,11 @@ public: void set(enum wsrep::server_state::state status) { - wsrep_notify_status(status); + if (status == wsrep::server_state::s_donor || + status == wsrep::server_state::s_synced) + wsrep_notify_status(status, &view_); + else + wsrep_notify_status(status); lock(); status_= status; diff --git a/win/packaging/heidisql.wxi.in b/win/packaging/heidisql.wxi.in index 831efb6971f..03d5b579651 100644 --- a/win/packaging/heidisql.wxi.in +++ b/win/packaging/heidisql.wxi.in @@ -8,7 +8,7 @@ Win64="no" /> - + diff --git a/wsrep-lib b/wsrep-lib index 173693f2eeb..151d4f8591d 160000 --- a/wsrep-lib +++ b/wsrep-lib @@ -1 +1 @@ -Subproject commit 173693f2eeb61054424233fe85fde4086bed36be +Subproject commit 151d4f8591d26068afda997fb0d1f66b2f7f1964