mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.4' into 10.5
This commit is contained in:
@ -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;
|
skip Need Linux;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
# an additional util connection and other statistics data
|
# an additional util connection and other statistics data
|
||||||
-- source include/no_view_protocol.inc
|
-- source include/no_view_protocol.inc
|
||||||
|
|
||||||
--source include/one_thread_per_connection.inc
|
|
||||||
#
|
#
|
||||||
# Test the --thread-handler=no-threads option
|
# Test the --thread-handler=no-threads option
|
||||||
#
|
#
|
||||||
|
@ -66,3 +66,5 @@ VARIABLE_VALUE like '%AES128-SHA%'
|
|||||||
1
|
1
|
||||||
disconnect ssl_con;
|
disconnect ssl_con;
|
||||||
connection default;
|
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
|
||||||
|
@ -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';
|
SELECT VARIABLE_VALUE like '%AES128-SHA%' FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher_list';
|
||||||
disconnect ssl_con;
|
disconnect ssl_con;
|
||||||
connection default;
|
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
|
||||||
|
@ -12,3 +12,5 @@ Variable_name Value
|
|||||||
Ssl_version TLSv1.2
|
Ssl_version TLSv1.2
|
||||||
@@tls_version
|
@@tls_version
|
||||||
TLSv1.1,TLSv1.2
|
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
|
||||||
|
@ -22,3 +22,8 @@
|
|||||||
# finally list available protocols
|
# finally list available protocols
|
||||||
--exec $MYSQL --host=localhost --ssl -e "select @@tls_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
|
||||||
|
|
||||||
|
@ -4,3 +4,5 @@ Variable_name Value
|
|||||||
Ssl_version TLSv1
|
Ssl_version TLSv1
|
||||||
@@tls_version
|
@@tls_version
|
||||||
TLSv1.0
|
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
|
||||||
|
@ -10,3 +10,8 @@
|
|||||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';"
|
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';"
|
||||||
--exec $MYSQL --host=localhost --ssl -e "select @@tls_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
|
||||||
|
|
||||||
|
@ -13,9 +13,6 @@
|
|||||||
galera_as_slave_ctas : MDEV-28378 timeout
|
galera_as_slave_ctas : MDEV-28378 timeout
|
||||||
galera_pc_recovery : MDEV-25199 cluster fails to start up
|
galera_pc_recovery : MDEV-25199 cluster fails to start up
|
||||||
galera_sst_encrypted : MDEV-29876 Galera test failure on galera_sst_encrypted
|
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
|
galera_var_node_address : MDEV-20485 Galera test failure
|
||||||
MDEV-26575 : MDEV-29878 Galera test failure on MDEV-26575
|
MDEV-26575 : MDEV-29878 Galera test failure on MDEV-26575
|
||||||
galera_bf_abort_shutdown : MDEV-29918 Assertion failure on galera_bf_abort_shutdown
|
galera_bf_abort_shutdown : MDEV-29918 Assertion failure on galera_bf_abort_shutdown
|
||||||
|
@ -3,8 +3,6 @@ connection node_1;
|
|||||||
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: RSU failed due to pending transactions, schema: test, query ALTER.*");
|
||||||
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
|
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;
|
connection node_1;
|
||||||
CREATE TABLE t1(
|
CREATE TABLE t1(
|
||||||
id bigint unsigned NOT NULL AUTO_INCREMENT,
|
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;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
350
|
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;
|
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';
|
SET SESSION wsrep_OSU_method='RSU';
|
||||||
SELECT @@wsrep_OSU_method;
|
|
||||||
@@wsrep_OSU_method
|
|
||||||
RSU
|
|
||||||
SET SESSION sql_log_bin = 0;
|
SET SESSION sql_log_bin = 0;
|
||||||
ALTER TABLE t1 DROP PARTITION rx2009xx;
|
ALTER TABLE t1 DROP PARTITION rx2009xx;
|
||||||
ALTER TABLE t1 DROP PARTITION rx201004;
|
ALTER TABLE t1 DROP PARTITION rx201004;
|
||||||
ALTER TABLE t1 DROP PARTITION rx201008;
|
ALTER TABLE t1 DROP PARTITION rx201008;
|
||||||
SET SESSION wsrep_OSU_METHOD='TOI';
|
SET SESSION wsrep_OSU_METHOD='TOI';
|
||||||
|
SET SESSION sql_log_bin = 1;
|
||||||
SELECT @@wsrep_OSU_method;
|
SELECT @@wsrep_OSU_method;
|
||||||
@@wsrep_OSU_method
|
@@wsrep_OSU_method
|
||||||
TOI
|
TOI
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_3;
|
disconnect node_2a;
|
||||||
connection node_4;
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
disconnect node_3;
|
|
||||||
disconnect node_4;
|
|
||||||
|
@ -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
|
|
||||||
|
|
@ -1,17 +1,15 @@
|
|||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
--source include/force_restart.inc
|
||||||
|
|
||||||
--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: RSU failed due to pending transactions, schema: test, query ALTER.*");
|
||||||
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
|
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
|
--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
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
CREATE TABLE t1(
|
CREATE TABLE t1(
|
||||||
@ -408,50 +406,37 @@ insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
|
|||||||
|
|
||||||
SELECT COUNT(*) FROM t1;
|
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
|
--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';
|
SET SESSION wsrep_OSU_method='RSU';
|
||||||
SELECT @@wsrep_OSU_method;
|
|
||||||
SET SESSION sql_log_bin = 0;
|
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;
|
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;
|
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;
|
ALTER TABLE t1 DROP PARTITION rx201008;
|
||||||
|
|
||||||
SET SESSION wsrep_OSU_METHOD='TOI';
|
SET SESSION wsrep_OSU_METHOD='TOI';
|
||||||
|
SET SESSION sql_log_bin = 1;
|
||||||
SELECT @@wsrep_OSU_method;
|
SELECT @@wsrep_OSU_method;
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
--error 0,ER_LOCK_DEADLOCK
|
--disconnect node_2a
|
||||||
reap;
|
|
||||||
|
|
||||||
--connection node_3
|
--connection node_1
|
||||||
--error 0,ER_LOCK_DEADLOCK
|
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT
|
||||||
reap;
|
|
||||||
|
|
||||||
--connection node_4
|
|
||||||
--error 0,ER_LOCK_DEADLOCK
|
|
||||||
reap;
|
reap;
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
|
|
||||||
--disconnect node_3
|
|
||||||
--disconnect node_4
|
|
||||||
|
|
||||||
|
|
||||||
|
38
mysql-test/suite/galera_sr/r/MDEV-32051.result
Normal file
38
mysql-test/suite/galera_sr/r/MDEV-32051.result
Normal file
@ -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;
|
72
mysql-test/suite/galera_sr/t/MDEV-32051.test
Normal file
72
mysql-test/suite/galera_sr/t/MDEV-32051.test
Normal file
@ -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;
|
@ -1,7 +1,7 @@
|
|||||||
|
--source include/have_udf.inc
|
||||||
if (!$DIALOG_EXAMPLES_SO) { skip requires dialog_examples.so; }
|
if (!$DIALOG_EXAMPLES_SO) { skip requires dialog_examples.so; }
|
||||||
if (!$HA_EXAMPLE_SO) { skip requires ha_examples.so; }
|
if (!$HA_EXAMPLE_SO) { skip requires ha_examples.so; }
|
||||||
if (!$LIBDAEMON_EXAMPLE_SO) { skip requires libdaemon_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 (!$EXAMPLE_KEY_MANAGEMENT_SO) { skip requires example_key_management.so; }
|
||||||
if (`SELECT VERSION() LIKE '%embedded%'`) { skip Disabled for embedded until MDEV-8664 is resolved; }
|
if (`SELECT VERSION() LIKE '%embedded%'`) { skip Disabled for embedded until MDEV-8664 is resolved; }
|
||||||
|
|
||||||
|
@ -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
|
93
mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test
Normal file
93
mysql-test/suite/rpl/t/rpl_sql_thd_start_errno_cleared.test
Normal file
@ -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
|
@ -4176,6 +4176,8 @@ static int init_common_variables()
|
|||||||
return 1;
|
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
|
#ifdef WITH_WSREP
|
||||||
/*
|
/*
|
||||||
|
34
sql/slave.cc
34
sql/slave.cc
@ -5291,6 +5291,19 @@ pthread_handler_t handle_slave_sql(void *arg)
|
|||||||
|
|
||||||
DBUG_ASSERT(rli->inited);
|
DBUG_ASSERT(rli->inited);
|
||||||
DBUG_ASSERT(rli->mi == mi);
|
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);
|
mysql_mutex_lock(&rli->run_lock);
|
||||||
DBUG_ASSERT(!rli->slave_running);
|
DBUG_ASSERT(!rli->slave_running);
|
||||||
errmsg= 0;
|
errmsg= 0;
|
||||||
@ -5367,17 +5380,16 @@ pthread_handler_t handle_slave_sql(void *arg)
|
|||||||
mysql_mutex_unlock(&rli->run_lock);
|
mysql_mutex_unlock(&rli->run_lock);
|
||||||
mysql_cond_broadcast(&rli->start_cond);
|
mysql_cond_broadcast(&rli->start_cond);
|
||||||
|
|
||||||
/*
|
#ifdef ENABLED_DEBUG_SYNC
|
||||||
Reset errors for a clean start (otherwise, if the master is idle, the SQL
|
DBUG_EXECUTE_IF("delay_sql_thread_after_release_run_lock", {
|
||||||
thread may execute no Query_log_event, so the error will remain even
|
const char act[]= "now "
|
||||||
though there's no problem anymore). Do not reset the master timestamp
|
"signal sql_thread_run_lock_released "
|
||||||
(imagine the slave has caught everything, the STOP SLAVE and START SLAVE:
|
"wait_for sql_thread_continue";
|
||||||
as we are not sure that we are going to receive a query, we want to
|
DBUG_ASSERT(debug_sync_service);
|
||||||
remember the last master timestamp (to say how many seconds behind we are
|
DBUG_ASSERT(!debug_sync_set_action(current_thd, STRING_WITH_LEN(act)));
|
||||||
now.
|
};);
|
||||||
But the master timestamp is reset by RESET SLAVE & CHANGE MASTER.
|
#endif
|
||||||
*/
|
|
||||||
rli->clear_error();
|
|
||||||
rli->parallel.reset();
|
rli->parallel.reset();
|
||||||
|
|
||||||
//tell the I/O thread to take relay_log_space_limit into account from now on
|
//tell the I/O thread to take relay_log_space_limit into account from now on
|
||||||
|
@ -3804,7 +3804,7 @@ static Sys_var_set Sys_tls_version(
|
|||||||
"TLS protocol version for secure connections.",
|
"TLS protocol version for secure connections.",
|
||||||
READ_ONLY GLOBAL_VAR(tls_version), CMD_LINE(REQUIRED_ARG),
|
READ_ONLY GLOBAL_VAR(tls_version), CMD_LINE(REQUIRED_ARG),
|
||||||
tls_version_names,
|
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(
|
static Sys_var_mybool Sys_standard_compliant_cte(
|
||||||
"standard_compliant_cte",
|
"standard_compliant_cte",
|
||||||
|
@ -21,6 +21,13 @@
|
|||||||
void wsrep_notify_status(enum wsrep::server_state::state status,
|
void wsrep_notify_status(enum wsrep::server_state::state status,
|
||||||
const wsrep::view* view)
|
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))
|
if (!wsrep_notify_cmd || 0 == strlen(wsrep_notify_cmd))
|
||||||
{
|
{
|
||||||
WSREP_INFO("wsrep_notify_cmd is not defined, skipping notification.");
|
WSREP_INFO("wsrep_notify_cmd is not defined, skipping notification.");
|
||||||
|
@ -189,7 +189,11 @@ public:
|
|||||||
|
|
||||||
void set(enum wsrep::server_state::state status)
|
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();
|
lock();
|
||||||
status_= status;
|
status_= status;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Win64="no"
|
Win64="no"
|
||||||
/>
|
/>
|
||||||
</Property>
|
</Property>
|
||||||
<?define pluginlist=auth_gssapi_client.dll;mysql_clear_password.dll;sha256_password.dll;caching_sha2_password.dll;pvio_npipe.dll;dialog.dll;pvio_shmem.dll?>
|
<?define pluginlist=auth_gssapi_client.dll;auth_named_pipe.dll;caching_sha2_password.dll;client_ed25519.dll;dialog.dll;mysql_clear_password.dll;pvio_npipe.dll;pvio_shmem.dll;sha256_password.dll?>
|
||||||
<DirectoryRef Id="MariaDBShared">
|
<DirectoryRef Id="MariaDBShared">
|
||||||
<Directory Id="D.HeidiSQL" Name="HeidiSQL">
|
<Directory Id="D.HeidiSQL" Name="HeidiSQL">
|
||||||
<Component Id="component.HeidiSQL" Guid="96ea3879-5320-4098-8f26-2f655d2f716c" Win64="no">
|
<Component Id="component.HeidiSQL" Guid="96ea3879-5320-4098-8f26-2f655d2f716c" Win64="no">
|
||||||
|
Submodule wsrep-lib updated: 173693f2ee...151d4f8591
Reference in New Issue
Block a user