mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.11 -> 11.4
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
galera_as_slave_ctas : MDEV-28378 timeout
|
||||
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
|
||||
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
|
||||
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
||||
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
||||
|
22
mysql-test/suite/galera/r/MDEV-35446.result
Normal file
22
mysql-test/suite/galera/r/MDEV-35446.result
Normal file
@@ -0,0 +1,22 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect bf_trx, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect victim_trx, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connect node_2_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection victim_trx;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (2), (1);
|
||||
connection node_2_ctrl;
|
||||
SET GLOBAL debug_dbug = '+d,sync.wsrep_apply_cb';
|
||||
connection bf_trx;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
connection node_2_ctrl;
|
||||
SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
SET GLOBAL debug_dbug = '';
|
||||
connection victim_trx;
|
||||
SET DEBUG_SYNC = "wsrep_at_dispatch_end_before_result SIGNAL signal.wsrep_apply_cb WAIT_FOR bf_abort";
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
@@ -0,0 +1,22 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect master, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connect node_1_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
START SLAVE;
|
||||
connection master;
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_1;
|
||||
SET GLOBAL debug_dbug = '+d,rpl_parallel_simulate_temp_err_xid,sync.wsrep_retry_event_group';
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_1_ctrl;
|
||||
SET debug_sync = 'now WAIT_FOR sync.wsrep_retry_event_group_reached';
|
||||
SET GLOBAL debug_dbug = '';
|
||||
SET debug_sync = 'now SIGNAL signal.wsrep_retry_event_group';
|
||||
connection node_1;
|
||||
SET debug_sync = 'RESET';
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
STOP SLAVE;
|
@@ -3,6 +3,7 @@ connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_1;
|
||||
SET DEBUG_SYNC = 'wsrep_create_table_as_select WAIT_FOR continue';
|
||||
CREATE table t1 as SELECT SLEEP(0.1);;
|
||||
@@ -17,14 +18,30 @@ connection node_1b;
|
||||
SET SESSION debug_sync = 'now WAIT_FOR sync.wsrep_apply_cb_reached';
|
||||
# Signal first CTAS to continue and wait until CTAS has executed
|
||||
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||
connection node_2b;
|
||||
# Wait first CTAS to replicate
|
||||
SELECT * FROM t1;
|
||||
SLEEP(0.2)
|
||||
0
|
||||
connection node_1b;
|
||||
SET GLOBAL debug_dbug= '';
|
||||
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
|
||||
connection node_2a;
|
||||
connection node_1b;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
SLEEP(0.2)
|
||||
0
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
SLEEP(0.2)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
disconnect node_1a;
|
||||
disconnect node_1b;
|
||||
disconnect node_2a;
|
||||
disconnect node_2b;
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
# End of test
|
||||
|
@@ -35,3 +35,10 @@ SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL
|
||||
VARIABLE_VALUE LIKE '%gmcast.segment = 3%'
|
||||
1
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
call mtr.add_suppression("WSREP: read_completion_condition.*");
|
||||
call mtr.add_suppression("WSREP: read_handler.*");
|
||||
disconnect node_3;
|
||||
disconnect node_4;
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
|
4
mysql-test/suite/galera/t/MDEV-35446.cnf
Normal file
4
mysql-test/suite/galera/t/MDEV-35446.cnf
Normal file
@@ -0,0 +1,4 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqltest]
|
||||
ps-protocol
|
57
mysql-test/suite/galera/t/MDEV-35446.test
Normal file
57
mysql-test/suite/galera/t/MDEV-35446.test
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# MDEV-35446
|
||||
#
|
||||
# Test BF abort of a transaction under PS protocol, after
|
||||
# a statement is prepared (and the diagnostics area is
|
||||
# disabled).
|
||||
#
|
||||
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
#
|
||||
# Setup: bf_trx executes in node_1 and will BF abort victim_trx.
|
||||
#
|
||||
--connect bf_trx, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connect victim_trx, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
--connect node_2_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
||||
--connection victim_trx
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (2), (1);
|
||||
|
||||
--connection node_2_ctrl
|
||||
SET GLOBAL debug_dbug = '+d,sync.wsrep_apply_cb';
|
||||
|
||||
--connection bf_trx
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
|
||||
--connection node_2_ctrl
|
||||
SET DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
SET GLOBAL debug_dbug = '';
|
||||
|
||||
#
|
||||
# COMMIT the victim_trx and expect a deadlock error.
|
||||
# Here we park the client in a sync point at the end of prepare
|
||||
# command (COM_STMT_PREPARE), where the diagnostics area of the
|
||||
# client has already been disabled. The client signals the
|
||||
# applier to continue and will be BF aborted.
|
||||
# If bug is present, the transaction is aborted, but the COMMIT
|
||||
# statement succeeds (instead of returning deadlock error).
|
||||
#
|
||||
--connection victim_trx
|
||||
|
||||
--disable_ps_protocol
|
||||
SET DEBUG_SYNC = "wsrep_at_dispatch_end_before_result SIGNAL signal.wsrep_apply_cb WAIT_FOR bf_abort";
|
||||
--enable_ps_protocol
|
||||
|
||||
--error ER_LOCK_DEADLOCK
|
||||
COMMIT;
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
10
mysql-test/suite/galera/t/galera_as_slave_parallel_retry.cnf
Normal file
10
mysql-test/suite/galera/t/galera_as_slave_parallel_retry.cnf
Normal file
@@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes_as_slave.cnf
|
||||
|
||||
[mysqld]
|
||||
log-bin=mysqld-bin
|
||||
log-slave-updates
|
||||
binlog-format=ROW
|
||||
|
||||
[mysqld.1]
|
||||
slave-parallel-threads=2
|
||||
slave-parallel-mode=optimistic
|
@@ -0,0 +1,52 @@
|
||||
# MDEV-35465 Async replication stops working on Galera async replica node
|
||||
# when parallel replication is enabled
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
# Node 3 is not a Galera node, use it as a master
|
||||
--connect master, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connect node_1_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
|
||||
--connection node_1
|
||||
--disable_query_log
|
||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
|
||||
--enable_query_log
|
||||
START SLAVE;
|
||||
|
||||
--connection master
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
#
|
||||
--let debug_dbug_orig = `SELECT @@GLOBAL.debug_dbug`
|
||||
SET GLOBAL debug_dbug = '+d,rpl_parallel_simulate_temp_err_xid,sync.wsrep_retry_event_group';
|
||||
|
||||
--connection master
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_1_ctrl
|
||||
SET debug_sync = 'now WAIT_FOR sync.wsrep_retry_event_group_reached';
|
||||
--eval SET GLOBAL debug_dbug = '$debug_dbug_orig'
|
||||
SET debug_sync = 'now SIGNAL signal.wsrep_retry_event_group';
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
||||
--connection node_1
|
||||
SET debug_sync = 'RESET';
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
STOP SLAVE;
|
@@ -0,0 +1,4 @@
|
||||
[binlogoff]
|
||||
|
||||
[binlogon]
|
||||
log-bin
|
@@ -9,6 +9,7 @@
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
|
||||
--connection node_1
|
||||
#
|
||||
@@ -48,6 +49,14 @@ SET SESSION debug_sync = 'now WAIT_FOR sync.wsrep_apply_cb_reached';
|
||||
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Creating table CREATE table t1 as SELECT SLEEP(0.1)'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_2b
|
||||
--echo # Wait first CTAS to replicate
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
|
||||
--source include/wait_condition.inc
|
||||
SELECT * FROM t1;
|
||||
|
||||
--connection node_1b
|
||||
#
|
||||
# Release second CTAS and cleanup
|
||||
#
|
||||
@@ -74,12 +83,18 @@ SET DEBUG_SYNC= 'RESET';
|
||||
#
|
||||
--connection node_2
|
||||
--reap
|
||||
SELECT * FROM t1;
|
||||
|
||||
--connection node_1
|
||||
--error 0,ER_TABLE_EXISTS_ERROR,ER_QUERY_INTERRUPTED
|
||||
--error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--disconnect node_1a
|
||||
--disconnect node_1b
|
||||
--disconnect node_2a
|
||||
--disconnect node_2b
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
||||
|
@@ -40,3 +40,12 @@ SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options';
|
||||
DROP TABLE t1;
|
||||
|
||||
--connection node_1
|
||||
call mtr.add_suppression("WSREP: read_completion_condition.*");
|
||||
call mtr.add_suppression("WSREP: read_handler.*");
|
||||
|
||||
--disconnect node_3
|
||||
--disconnect node_4
|
||||
|
||||
--source include/galera_end.inc
|
||||
|
@@ -1,3 +1,6 @@
|
||||
#
|
||||
# MDEV-35507 and MDEV-35522
|
||||
#
|
||||
install plugin ed25519 soname 'auth_ed25519';
|
||||
install plugin server_audit soname 'server_audit';
|
||||
set global server_audit_file_path='server_audit.log';
|
||||
@@ -6,17 +9,25 @@ set global server_audit_logging=on;
|
||||
# unsafe to log passwords (pwd-123)
|
||||
CREATE USER u1 IDENTIFIED BY 'pwd_123';
|
||||
create user u2 IDENTIFIED VIA ed25519 USING PASSWORD('pwd_123');
|
||||
CREATE OR REPLACE USER u1 IDENTIFIED BY 'pwd_123';
|
||||
SET PASSWORD FOR u1 = PASSWORD('pwd_123');
|
||||
ALTER USER u1 IDENTIFIED BY 'pwd_123';
|
||||
ALTER USER if exists u1 IDENTIFIED BY 'pwd_123';
|
||||
SET STATEMENT max_statement_time=10 FOR ALTER USER u1 IDENTIFIED BY 'pwd_123';
|
||||
alter user u2 identified VIA ed25519 USING password('pwd_123');
|
||||
GRANT ALL ON test TO u1 IDENTIFIED BY "pwd_123";
|
||||
GRANT ALL ON test TO u1 identified VIA ed25519 as password('pwd_123') or ed25519 using password('pwd_123');
|
||||
CREATE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
|
||||
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
|
||||
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
|
||||
# pattern should not be found
|
||||
NOT FOUND /pwd_123/ in server_audit.log
|
||||
# pattern should not be found
|
||||
# cleaunup
|
||||
DROP SERVER s1;
|
||||
DROP USER u1;
|
||||
DROP USER u2;
|
||||
set global server_audit_logging=off;
|
||||
UNINSTALL PLUGIN ed25519;
|
||||
UNINSTALL PLUGIN server_audit;
|
||||
# end of 10.5 tests
|
||||
|
@@ -13,6 +13,10 @@ if (!$AUTH_ED25519_SO) {
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let SEARCH_FILE= $MYSQLD_DATADIR/server_audit.log;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35507 and MDEV-35522
|
||||
--echo #
|
||||
|
||||
install plugin ed25519 soname 'auth_ed25519';
|
||||
install plugin server_audit soname 'server_audit';
|
||||
|
||||
@@ -25,17 +29,24 @@ set global server_audit_logging=on;
|
||||
|
||||
CREATE USER u1 IDENTIFIED BY 'pwd_123';
|
||||
create user u2 IDENTIFIED VIA ed25519 USING PASSWORD('pwd_123');
|
||||
CREATE OR REPLACE USER u1 IDENTIFIED BY 'pwd_123';
|
||||
SET PASSWORD FOR u1 = PASSWORD('pwd_123');
|
||||
ALTER USER u1 IDENTIFIED BY 'pwd_123';
|
||||
ALTER USER if exists u1 IDENTIFIED BY 'pwd_123';
|
||||
SET STATEMENT max_statement_time=10 FOR ALTER USER u1 IDENTIFIED BY 'pwd_123';
|
||||
alter user u2 identified VIA ed25519 USING password('pwd_123');
|
||||
GRANT ALL ON test TO u1 IDENTIFIED BY "pwd_123";
|
||||
GRANT ALL ON test TO u1 identified VIA ed25519 as password('pwd_123') or ed25519 using password('pwd_123');
|
||||
CREATE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
|
||||
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
|
||||
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123");
|
||||
--let SEARCH_PATTERN=pwd_123
|
||||
--echo # pattern should not be found
|
||||
--source include/search_pattern_in_file.inc
|
||||
--echo # pattern should not be found
|
||||
|
||||
--echo # cleaunup
|
||||
DROP SERVER s1;
|
||||
DROP USER u1;
|
||||
DROP USER u2;
|
||||
set global server_audit_logging=off;
|
||||
@@ -44,3 +55,5 @@ set global server_audit_logging=off;
|
||||
UNINSTALL PLUGIN ed25519;
|
||||
UNINSTALL PLUGIN server_audit;
|
||||
--enable_warnings
|
||||
|
||||
--echo # end of 10.5 tests
|
||||
|
@@ -95,6 +95,33 @@ SELECT * FROM test.regular_tbl ORDER BY fkid LIMIT 2;
|
||||
--replace_column 2 date-time 3 USER 4 UUID
|
||||
SELECT * FROM test.regular_tbl ORDER BY fkid DESC LIMIT 2;
|
||||
|
||||
|
||||
--echo *** MDEV-5798: Wrong errorcode for missing partition after TRUNCATE PARTITION
|
||||
--connection master
|
||||
eval CREATE TABLE t1 (a INT)
|
||||
ENGINE=$engine_type
|
||||
PARTITION BY LIST(a) (
|
||||
PARTITION p0 VALUES IN (9, NULL),
|
||||
PARTITION p1 VALUES IN (8, 2, 7),
|
||||
PARTITION p2 VALUES IN (6, 4, 5),
|
||||
PARTITION p3 VALUES IN (3, 1, 0)
|
||||
);
|
||||
ALTER TABLE t1 DROP PARTITION p0;
|
||||
|
||||
# This failed statement leaves ALTER_PARTITION_TRUNCATE set in
|
||||
# thd->lex->alter_info.partition_flags
|
||||
--error ER_NO_SUCH_TABLE
|
||||
ALTER TABLE non_existent TRUNCATE PARTITION p1,p2;
|
||||
|
||||
# The bug was that the code would wrongly look at the (now stale) value of
|
||||
# thd->lex->alter_info.partition_flags and give the wrong error code
|
||||
# ER_WRONG_PARTITION_NAME.
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
INSERT INTO t1 PARTITION (p1,p2,p3) VALUES (0),(9);
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
|
||||
###### CLEAN UP SECTION ##############
|
||||
|
||||
connection master;
|
||||
@@ -102,3 +129,4 @@ DROP PROCEDURE test.proc_norm;
|
||||
DROP PROCEDURE test.proc_byrange;
|
||||
DROP TABLE test.regular_tbl;
|
||||
DROP TABLE test.byrange_tbl;
|
||||
DROP TABLE test.t1;
|
||||
|
@@ -61,6 +61,34 @@ ROLLBACK;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
SET @old_mode= @@SESSION.binlog_format;
|
||||
SET SESSION binlog_format= row;
|
||||
SET SESSION gtid_domain_id= 200;
|
||||
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (200);
|
||||
INSERT INTO t1 SELECT * FROM t2;
|
||||
COMMIT;
|
||||
SET SESSION gtid_domain_id= 201;
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
DELETE FROM t1 WHERE a=200;
|
||||
SET SESSION gtid_domain_id= 202;
|
||||
DROP TEMPORARY TABLE t2;
|
||||
SET SESSION binlog_format= mixed;
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
SET SESSION gtid_domain_id= 204;
|
||||
ERROR HY000: Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction
|
||||
SET SESSION binlog_format=statement;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
SET SESSION gtid_domain_id= 205;
|
||||
ERROR HY000: Cannot modify @@session.gtid_domain_id or @@session.gtid_seq_no inside a transaction
|
||||
DROP TEMPORARY TABLE t2;
|
||||
SET SESSION gtid_domain_id= @old_domain;
|
||||
SET SESSION binlog_format= @old_mode;
|
||||
*** Test requesting an explicit GTID position that conflicts with newer GTIDs of our own in the binlog. ***
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
@@ -84,16 +112,16 @@ ERROR 25000: You are not allowed to execute this command in a transaction
|
||||
ROLLBACK;
|
||||
SET GLOBAL gtid_strict_mode= 1;
|
||||
SET GLOBAL gtid_slave_pos = "0-1-1";
|
||||
ERROR HY000: Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
ERROR HY000: Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-18. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
SET GLOBAL gtid_slave_pos = "";
|
||||
ERROR HY000: Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
ERROR HY000: Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-18. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
SET GLOBAL gtid_strict_mode= 0;
|
||||
SET GLOBAL gtid_slave_pos = "0-1-1";
|
||||
Warnings:
|
||||
Warning 1947 Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
Warning 1947 Specified GTID 0-1-1 conflicts with the binary log which contains a more recent GTID 0-2-18. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
SET GLOBAL gtid_slave_pos = "";
|
||||
Warnings:
|
||||
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-12. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-18. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
|
||||
RESET MASTER;
|
||||
SET GLOBAL gtid_slave_pos = "0-1-1";
|
||||
START SLAVE;
|
||||
|
@@ -140,8 +140,26 @@ SELECT * FROM test.regular_tbl ORDER BY fkid DESC LIMIT 2;
|
||||
id dt user uuidf fkid filler
|
||||
1 date-time USER UUID 300 Partitioned table! Going to test replication for MySQL
|
||||
2 date-time USER UUID 299 Partitioned table! Going to test replication for MySQL
|
||||
*** MDEV-5798: Wrong errorcode for missing partition after TRUNCATE PARTITION
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE='Archive'
|
||||
PARTITION BY LIST(a) (
|
||||
PARTITION p0 VALUES IN (9, NULL),
|
||||
PARTITION p1 VALUES IN (8, 2, 7),
|
||||
PARTITION p2 VALUES IN (6, 4, 5),
|
||||
PARTITION p3 VALUES IN (3, 1, 0)
|
||||
);
|
||||
ALTER TABLE t1 DROP PARTITION p0;
|
||||
ALTER TABLE non_existent TRUNCATE PARTITION p1,p2;
|
||||
ERROR 42S02: Table 'test.non_existent' doesn't exist
|
||||
INSERT INTO t1 PARTITION (p1,p2,p3) VALUES (0),(9);
|
||||
ERROR HY000: Table has no partition for value 9
|
||||
connection slave;
|
||||
connection master;
|
||||
DROP PROCEDURE test.proc_norm;
|
||||
DROP PROCEDURE test.proc_byrange;
|
||||
DROP TABLE test.regular_tbl;
|
||||
DROP TABLE test.byrange_tbl;
|
||||
DROP TABLE test.t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -142,9 +142,26 @@ SELECT * FROM test.regular_tbl ORDER BY fkid DESC LIMIT 2;
|
||||
id dt user uuidf fkid filler
|
||||
1 date-time USER UUID 300 Partitioned table! Going to test replication for MySQL
|
||||
2 date-time USER UUID 299 Partitioned table! Going to test replication for MySQL
|
||||
*** MDEV-5798: Wrong errorcode for missing partition after TRUNCATE PARTITION
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE='InnoDB'
|
||||
PARTITION BY LIST(a) (
|
||||
PARTITION p0 VALUES IN (9, NULL),
|
||||
PARTITION p1 VALUES IN (8, 2, 7),
|
||||
PARTITION p2 VALUES IN (6, 4, 5),
|
||||
PARTITION p3 VALUES IN (3, 1, 0)
|
||||
);
|
||||
ALTER TABLE t1 DROP PARTITION p0;
|
||||
ALTER TABLE non_existent TRUNCATE PARTITION p1,p2;
|
||||
ERROR 42S02: Table 'test.non_existent' doesn't exist
|
||||
INSERT INTO t1 PARTITION (p1,p2,p3) VALUES (0),(9);
|
||||
ERROR HY000: Table has no partition for value 9
|
||||
connection slave;
|
||||
connection master;
|
||||
DROP PROCEDURE test.proc_norm;
|
||||
DROP PROCEDURE test.proc_byrange;
|
||||
DROP TABLE test.regular_tbl;
|
||||
DROP TABLE test.byrange_tbl;
|
||||
DROP TABLE test.t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -142,9 +142,26 @@ SELECT * FROM test.regular_tbl ORDER BY fkid DESC LIMIT 2;
|
||||
id dt user uuidf fkid filler
|
||||
1 date-time USER UUID 300 Partitioned table! Going to test replication for MySQL
|
||||
2 date-time USER UUID 299 Partitioned table! Going to test replication for MySQL
|
||||
*** MDEV-5798: Wrong errorcode for missing partition after TRUNCATE PARTITION
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE='Memory'
|
||||
PARTITION BY LIST(a) (
|
||||
PARTITION p0 VALUES IN (9, NULL),
|
||||
PARTITION p1 VALUES IN (8, 2, 7),
|
||||
PARTITION p2 VALUES IN (6, 4, 5),
|
||||
PARTITION p3 VALUES IN (3, 1, 0)
|
||||
);
|
||||
ALTER TABLE t1 DROP PARTITION p0;
|
||||
ALTER TABLE non_existent TRUNCATE PARTITION p1,p2;
|
||||
ERROR 42S02: Table 'test.non_existent' doesn't exist
|
||||
INSERT INTO t1 PARTITION (p1,p2,p3) VALUES (0),(9);
|
||||
ERROR HY000: Table has no partition for value 9
|
||||
connection slave;
|
||||
connection master;
|
||||
DROP PROCEDURE test.proc_norm;
|
||||
DROP PROCEDURE test.proc_byrange;
|
||||
DROP TABLE test.regular_tbl;
|
||||
DROP TABLE test.byrange_tbl;
|
||||
DROP TABLE test.t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -142,9 +142,26 @@ SELECT * FROM test.regular_tbl ORDER BY fkid DESC LIMIT 2;
|
||||
id dt user uuidf fkid filler
|
||||
1 date-time USER UUID 300 Partitioned table! Going to test replication for MySQL
|
||||
2 date-time USER UUID 299 Partitioned table! Going to test replication for MySQL
|
||||
*** MDEV-5798: Wrong errorcode for missing partition after TRUNCATE PARTITION
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE='MyISAM'
|
||||
PARTITION BY LIST(a) (
|
||||
PARTITION p0 VALUES IN (9, NULL),
|
||||
PARTITION p1 VALUES IN (8, 2, 7),
|
||||
PARTITION p2 VALUES IN (6, 4, 5),
|
||||
PARTITION p3 VALUES IN (3, 1, 0)
|
||||
);
|
||||
ALTER TABLE t1 DROP PARTITION p0;
|
||||
ALTER TABLE non_existent TRUNCATE PARTITION p1,p2;
|
||||
ERROR 42S02: Table 'test.non_existent' doesn't exist
|
||||
INSERT INTO t1 PARTITION (p1,p2,p3) VALUES (0),(9);
|
||||
ERROR HY000: Table has no partition for value 9
|
||||
connection slave;
|
||||
connection master;
|
||||
DROP PROCEDURE test.proc_norm;
|
||||
DROP PROCEDURE test.proc_byrange;
|
||||
DROP TABLE test.regular_tbl;
|
||||
DROP TABLE test.byrange_tbl;
|
||||
DROP TABLE test.t1;
|
||||
include/rpl_end.inc
|
||||
|
@@ -69,6 +69,46 @@ SELECT * FROM t1 ORDER BY a;
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
# MDEV-34049: Parallel access to temptable in different domain_id in parallel replication
|
||||
#
|
||||
# Temporary tables must be prevented from being accessed from multiple threads
|
||||
# at the same time in parallel replication. Withon one domain_id, this is done
|
||||
# by running wait_for_prior_commit() before accessing a temporary table. To
|
||||
# prevent the same temporary table from being accessed in parallel from two
|
||||
# domains in out-of-order parallel replication, an error must be raised on
|
||||
# attempt to change the gtid_domain_id while temporary tables are in use in
|
||||
# a session and binlogged. In row-based binlogging, temporary tables are not
|
||||
# binlogged, so gtid_domain_id can be freely changed.
|
||||
SET @old_mode= @@SESSION.binlog_format;
|
||||
SET SESSION binlog_format= row;
|
||||
SET SESSION gtid_domain_id= 200;
|
||||
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (200);
|
||||
INSERT INTO t1 SELECT * FROM t2;
|
||||
COMMIT;
|
||||
SET SESSION gtid_domain_id= 201;
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
DELETE FROM t1 WHERE a=200;
|
||||
SET SESSION gtid_domain_id= 202;
|
||||
DROP TEMPORARY TABLE t2;
|
||||
|
||||
SET SESSION binlog_format= mixed;
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (1);
|
||||
SET SESSION gtid_domain_id= 0;
|
||||
--error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_GTID_DOMAIN_ID_SEQ_NO
|
||||
SET SESSION gtid_domain_id= 204;
|
||||
SET SESSION binlog_format=statement;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
--error ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_GTID_DOMAIN_ID_SEQ_NO
|
||||
SET SESSION gtid_domain_id= 205;
|
||||
DROP TEMPORARY TABLE t2;
|
||||
SET SESSION gtid_domain_id= @old_domain;
|
||||
SET SESSION binlog_format= @old_mode;
|
||||
|
||||
|
||||
--echo *** Test requesting an explicit GTID position that conflicts with newer GTIDs of our own in the binlog. ***
|
||||
--connection slave
|
||||
|
@@ -1,8 +0,0 @@
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
|
||||
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
|
||||
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
|
||||
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
|
||||
Warnings:
|
||||
Warning 1062 Duplicate entry '1' for key 'a'
|
||||
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
|
||||
DROP TABLE t1;
|
@@ -61,3 +61,14 @@ connection con1;
|
||||
replace into t1 values (1),(2);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
|
||||
#
|
||||
create table t1 (a int, b int, c int, vc int as (c), unique(a), unique(b)) with system versioning;
|
||||
insert ignore into t1 (a,b,c) values (1,2,3);
|
||||
select a, b, c into outfile '15330.data' from t1;
|
||||
load data infile '15330.data' ignore into table t1 (a,b,c);
|
||||
Warnings:
|
||||
Warning 1062 Duplicate entry '1' for key 'a'
|
||||
load data infile '15330.data' replace into table t1 (a,b,c);
|
||||
drop table t1;
|
||||
|
@@ -1,20 +0,0 @@
|
||||
#
|
||||
# MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
|
||||
#
|
||||
--let $datadir= `select @@datadir`
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
|
||||
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--enable_prepare_warnings
|
||||
--disable_ps2_protocol
|
||||
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
|
||||
--disable_prepare_warnings
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
|
||||
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
--remove_file $datadir/test/15330.data
|
@@ -77,4 +77,32 @@ replace into t1 values (1),(2);
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
|
||||
--echo #
|
||||
if ($default_engine == MEMORY)
|
||||
{
|
||||
--disable_query_log
|
||||
set default_storage_engine= myisam;
|
||||
--enable_query_log
|
||||
}
|
||||
create table t1 (a int, b int, c int, vc int as (c), unique(a), unique(b)) with system versioning;
|
||||
insert ignore into t1 (a,b,c) values (1,2,3);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select a, b, c into outfile '15330.data' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
load data infile '15330.data' ignore into table t1 (a,b,c);
|
||||
load data infile '15330.data' replace into table t1 (a,b,c);
|
||||
--let $datadir=`select @@datadir`
|
||||
--remove_file $datadir/test/15330.data
|
||||
|
||||
# cleanup
|
||||
drop table t1;
|
||||
--disable_query_log
|
||||
eval set default_storage_engine= $default_engine;
|
||||
--enable_query_log
|
||||
|
||||
--source suite/versioning/common_finish.inc
|
||||
|
Reference in New Issue
Block a user