mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.6' into 10.11
This commit is contained in:
@@ -98,7 +98,7 @@ reset master;
|
||||
--echo # crash_purge_before_update_index
|
||||
flush logs;
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
SET SESSION debug_dbug="+d,crash_purge_before_update_index";
|
||||
--source include/wait_for_binlog_checkpoint.inc
|
||||
--error 2013
|
||||
@@ -119,7 +119,7 @@ SELECT @index;
|
||||
--echo # crash_purge_non_critical_after_update_index
|
||||
flush logs;
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
SET SESSION debug_dbug="+d,crash_purge_non_critical_after_update_index";
|
||||
--source include/wait_for_binlog_checkpoint.inc
|
||||
--error 2013
|
||||
@@ -143,7 +143,7 @@ SELECT @index;
|
||||
--echo # crash_purge_critical_after_update_index
|
||||
flush logs;
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
SET SESSION debug_dbug="+d,crash_purge_critical_after_update_index";
|
||||
--source include/wait_for_binlog_checkpoint.inc
|
||||
--error 2013
|
||||
@@ -167,7 +167,7 @@ file_exists $MYSQLD_DATADIR/master-bin.000008;
|
||||
SELECT @index;
|
||||
|
||||
--echo # crash_create_non_critical_before_update_index
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
SET SESSION debug_dbug="+d,crash_create_non_critical_before_update_index";
|
||||
--error 2013
|
||||
flush logs;
|
||||
@@ -185,7 +185,7 @@ file_exists $MYSQLD_DATADIR/master-bin.000009;
|
||||
SELECT @index;
|
||||
|
||||
--echo # crash_create_critical_before_update_index
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
SET SESSION debug_dbug="+d,crash_create_critical_before_update_index";
|
||||
--error 2013
|
||||
flush logs;
|
||||
@@ -205,7 +205,7 @@ file_exists $MYSQLD_DATADIR/master-bin.000011;
|
||||
SELECT @index;
|
||||
|
||||
--echo # crash_create_after_update_index
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
SET SESSION debug_dbug="+d,crash_create_after_update_index";
|
||||
--error 2013
|
||||
flush logs;
|
||||
|
@@ -26,10 +26,10 @@
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=innodb;
|
||||
|
||||
--echo # Restart the server so mysqld reads the gtid_slave_pos using innodb
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
|
@@ -68,10 +68,10 @@ while ($loop_times) {
|
||||
|
||||
# try to change the log-bin configs and restart
|
||||
--echo # ======= now try to change the log-bin config for mysqld =======
|
||||
--let $restart_parameters="--log-bin=new_log_bin"
|
||||
--let $restart_parameters=--log-bin=new_log_bin
|
||||
--echo #begin to restart mysqld
|
||||
--source include/restart_mysqld.inc
|
||||
--let $restart_parameters= ""
|
||||
--let $restart_parameters=
|
||||
|
||||
--source include/show_binary_logs.inc
|
||||
let $loop_times= 10;
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
--connection $_cur_con
|
||||
--enable_reconnect
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
|
||||
shutdown_server;
|
||||
|
||||
@@ -31,5 +31,5 @@ if ($rpl_server_parameters)
|
||||
{
|
||||
--let $_rpl_start_server_command= restart:$rpl_server_parameters
|
||||
}
|
||||
--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
--write_line "$_rpl_start_server_command" $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
@@ -206,10 +206,12 @@ RETURN x;
|
||||
END
|
||||
||
|
||||
SET sql_log_bin=1;
|
||||
include/stop_slave_io.inc
|
||||
connection server_1;
|
||||
INSERT INTO t3 VALUES (49,0);
|
||||
connection server_2;
|
||||
START SLAVE SQL_THREAD;
|
||||
CHANGE MASTER TO master_use_gtid=no;
|
||||
include/start_slave.inc
|
||||
SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
|
||||
a b
|
||||
41 41
|
||||
@@ -239,10 +241,6 @@ SET GLOBAL slave_parallel_threads=0;
|
||||
SET GLOBAL slave_parallel_threads=10;
|
||||
include/start_slave.inc
|
||||
*** 3. Same as (2), but not using gtid mode ***
|
||||
connection server_2;
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO master_use_gtid=no;
|
||||
include/start_slave.inc
|
||||
connection server_1;
|
||||
connection con_temp3;
|
||||
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
|
||||
|
@@ -33,37 +33,37 @@ ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN(PO
|
||||
# MDEV-20009 Add CAST(expr AS pluggable_type)
|
||||
#
|
||||
SELECT CAST(1 AS GEOMETRY);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS geometry)'
|
||||
SELECT CAST(1 AS GEOMETRYCOLLECTION);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS geometrycollection)'
|
||||
SELECT CAST(1 AS POINT);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS point)'
|
||||
SELECT CAST(1 AS LINESTRING);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS linestring)'
|
||||
SELECT CAST(1 AS POLYGON);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS polygon)'
|
||||
SELECT CAST(1 AS MULTIPOINT);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS multipoint)'
|
||||
SELECT CAST(1 AS MULTILINESTRING);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS multilinestring)'
|
||||
SELECT CAST(1 AS MULTIPOLYGON);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS multipolygon)'
|
||||
SELECT CONVERT(1, GEOMETRY);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS geometry)'
|
||||
SELECT CONVERT(1, GEOMETRYCOLLECTION);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS geometrycollection)'
|
||||
SELECT CONVERT(1, POINT);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS point)'
|
||||
SELECT CONVERT(1, LINESTRING);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS linestring)'
|
||||
SELECT CONVERT(1, POLYGON);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS polygon)'
|
||||
SELECT CONVERT(1, MULTIPOINT);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS multipoint)'
|
||||
SELECT CONVERT(1, MULTILINESTRING);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS multilinestring)'
|
||||
SELECT CONVERT(1, MULTIPOLYGON);
|
||||
ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
|
||||
ERROR HY000: Operator does not exist: 'CAST(expr AS multipolygon)'
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@@ -16,7 +16,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau
|
||||
--let $MYSQLD_DATADIR = `SELECT @@datadir`
|
||||
--let SEARCH_RANGE = 10000000
|
||||
--let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
@@ -25,7 +25,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau
|
||||
4;770A8A65DA156D24EE2A093277530143
|
||||
EOF
|
||||
|
||||
--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
@@ -47,7 +47,7 @@ UNLOCK TABLES;
|
||||
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
@@ -62,7 +62,7 @@ ib_discard_tablespaces("test", "t1");
|
||||
ib_restore_tablespaces("test", "t1");
|
||||
EOF
|
||||
|
||||
--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--source include/restart_mysqld.inc
|
||||
@@ -80,7 +80,7 @@ SELECT * FROM t1;
|
||||
-- let SEARCH_FILE=$t1_IBD
|
||||
-- source include/search_pattern_in_file.inc
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
--remove_file $MYSQLTEST_VARDIR/keys1.txt
|
||||
@@ -89,7 +89,7 @@ SELECT * FROM t1;
|
||||
4;770A8A65DA156D24EE2A093277530143
|
||||
EOF
|
||||
|
||||
--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
DROP TABLE t1;
|
||||
|
@@ -21,7 +21,7 @@ CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null,
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
|
||||
CREATE TABLE t2 (f1 int not null)engine=innodb;
|
||||
let $restart_parameters="--debug=d,ib_log_checkpoint_avoid";
|
||||
let $restart_parameters=--debug=d,ib_log_checkpoint_avoid;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
# Stop the purge
|
||||
|
@@ -22,7 +22,7 @@ galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the gal
|
||||
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()
|
||||
galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed
|
||||
mdev-31285 : MDEV-25089 Assertion `error.len > 0' failed in galera::ReplicatorSMM::handle_apply_error()
|
||||
galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes
|
||||
MW-402 : temporarily disabled at the request of Codership
|
||||
galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch
|
||||
galera_create_table_as_select : MDEV-33952 fails sporadically
|
||||
|
@@ -8,7 +8,7 @@ if (!$kill_signal)
|
||||
# Write file to make mysql-test-run.pl expect the crash, but don't start it
|
||||
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
|
||||
--exec echo "wait" > $_expect_file_name
|
||||
--write_line wait $_expect_file_name
|
||||
|
||||
# Kill the connected server
|
||||
--disable_reconnect
|
||||
|
@@ -1,18 +0,0 @@
|
||||
# This is the first half of include/restart_mysqld.inc.
|
||||
if ($rpl_inited)
|
||||
{
|
||||
if (!$allow_rpl_inited)
|
||||
{
|
||||
--die ERROR IN TEST: When using the replication test framework (master-slave.inc, rpl_init.inc etc), use rpl_restart_server.inc instead of restart_mysqld.inc. If you know what you are doing and you really have to use restart_mysqld.inc, set allow_rpl_inited=1 before you source restart_mysqld.inc
|
||||
}
|
||||
}
|
||||
|
||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start it
|
||||
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
|
||||
--exec echo "wait" > $_expect_file_name
|
||||
|
||||
# Send shutdown to the connected server
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
@@ -4,12 +4,12 @@
|
||||
|
||||
if ($galera_wsrep_start_position != '') {
|
||||
--echo Using --wsrep-start-position when starting mysqld ...
|
||||
--exec echo "restart:$start_mysqld_params --wsrep-start-position=$galera_wsrep_start_position" > $_expect_file_name
|
||||
--write_line "restart:$start_mysqld_params --wsrep-start-position=$galera_wsrep_start_position" $_expect_file_name
|
||||
--let $galera_wsrep_start_position = 0
|
||||
}
|
||||
|
||||
if ($galera_wsrep_start_position == '') {
|
||||
--exec echo "restart:$start_mysqld_params" > $_expect_file_name
|
||||
--write_line "restart:$start_mysqld_params" $_expect_file_name
|
||||
}
|
||||
|
||||
--source include/galera_wait_ready.inc
|
||||
|
@@ -17,8 +17,11 @@ SELECT COUNT(*) AS EXPECT_6 FROM t1;
|
||||
EXPECT_6
|
||||
6
|
||||
connection node_1;
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ENGINE=Aria;
|
||||
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
|
||||
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
|
||||
Warnings:
|
||||
Warning 1235 wsrep_load_data_splitting for other than InnoDB tables
|
||||
SELECT COUNT(*) AS EXPECT_12 FROM t1;
|
||||
EXPECT_12
|
||||
12
|
||||
@@ -27,6 +30,16 @@ SELECT COUNT(*) AS EXPECT_12 FROM t1;
|
||||
EXPECT_12
|
||||
12
|
||||
connection node_1;
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
|
||||
SELECT COUNT(*) AS EXPECT_18 FROM t1;
|
||||
EXPECT_18
|
||||
18
|
||||
connection node_2;
|
||||
SELECT COUNT(*) AS EXPECT_18 FROM t1;
|
||||
EXPECT_18
|
||||
18
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL wsrep_load_data_splitting=OFF;
|
||||
Warnings:
|
||||
|
6
mysql-test/suite/galera/r/MDEV-26499.result
Normal file
6
mysql-test/suite/galera/r/MDEV-26499.result
Normal file
@@ -0,0 +1,6 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
SET GLOBAL debug_dbug="+d,simulate_slow_client_at_shutdown";
|
@@ -37,7 +37,7 @@ mysqld-bin.000002 # Gtid # # BEGIN GTID #-#-#
|
||||
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE `ts1` (
|
||||
`f1` int(11) NOT NULL
|
||||
)
|
||||
mysqld-bin.000002 # Xid # # COMMIT /* XID */
|
||||
mysqld-bin.000002 # Query # # COMMIT
|
||||
connection node_2;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
|
41
mysql-test/suite/galera/r/MDEV-33828.result
Normal file
41
mysql-test/suite/galera/r/MDEV-33828.result
Normal file
@@ -0,0 +1,41 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SELECT @@autocommit;
|
||||
@@autocommit
|
||||
1
|
||||
SET LOCAL enforce_storage_engine=InnoDB;
|
||||
CREATE TABLE t1(id int not null primary key auto_increment, name varchar(64)) ENGINE=InnoDB;
|
||||
INSERT INTO t1(name) VALUES ('name1'),('name3'),('name6'),('name2');
|
||||
CREATE PROCEDURE sel_proc()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
SELECT * FROM t1;
|
||||
END|
|
||||
CREATE PROCEDURE ins_proc()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
INSERT INTO t1 VALUES ('name_proc');
|
||||
END|
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SELECT @@autocommit;
|
||||
@@autocommit
|
||||
0
|
||||
START TRANSACTION;
|
||||
insert into t1(name) values('name10');
|
||||
select param_list, returns, db, type from mysql.proc where name='sel_proc';
|
||||
param_list returns db type
|
||||
test PROCEDURE
|
||||
call ins_proc();
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SELECT * FROM t1;
|
||||
id name
|
||||
1 name1
|
||||
3 name3
|
||||
5 name6
|
||||
7 name2
|
||||
9 name10
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE sel_proc;
|
||||
DROP PROCEDURE ins_proc;
|
52
mysql-test/suite/galera/r/galera_table_with_hyphen.result
Normal file
52
mysql-test/suite/galera/r/galera_table_with_hyphen.result
Normal file
@@ -0,0 +1,52 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
set wsrep_sync_wait=0;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_slave_threads=2;
|
||||
CREATE TABLE `par-ent` ( id INT AUTO_INCREMENT PRIMARY KEY, j INT) ENGINE=InnoDB;
|
||||
CREATE TABLE `child` (id INT AUTO_INCREMENT PRIMARY KEY, parent_id INT, j INT, FOREIGN KEY (parent_id) REFERENCES `par-ent`(id)) ENGINE=InnoDB;
|
||||
INSERT INTO `par-ent` VALUES (23,0);
|
||||
connection node_2;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG='+d,wsrep_ha_write_row';
|
||||
connection node_2;
|
||||
INSERT INTO `child` VALUES (21,23,0),(22,23,0),(23,23,0);
|
||||
connection node_1a;
|
||||
SET DEBUG_SYNC='now WAIT_FOR wsrep_ha_write_row_reached';
|
||||
connection node_2;
|
||||
UPDATE `par-ent` SET j=2 WHERE id=23;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG='-d,wsrep_ha_write_row';
|
||||
SET DEBUG_SYNC='now SIGNAL wsrep_ha_write_row_continue';
|
||||
SET GLOBAL DEBUG_DBUG="RESET";
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL wsrep_slave_threads=DEFAULT;
|
||||
connection node_2;
|
||||
drop table `child`;
|
||||
drop table `par-ent`;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_slave_threads=2;
|
||||
CREATE TABLE `p-arent-` ( id INT AUTO_INCREMENT PRIMARY KEY, j INT) ENGINE=InnoDB;
|
||||
CREATE TABLE `c-hild` (id INT AUTO_INCREMENT PRIMARY KEY, parent_id INT, j INT, FOREIGN KEY (parent_id) REFERENCES `p-arent-`(id)) ENGINE=InnoDB;
|
||||
INSERT INTO `p-arent-` VALUES (23,0);
|
||||
connection node_2;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG='+d,wsrep_ha_write_row';
|
||||
connection node_2;
|
||||
INSERT INTO `c-hild` VALUES (21,23,0),(22,23,0),(23,23,0);
|
||||
connection node_1a;
|
||||
SET DEBUG_SYNC='now WAIT_FOR wsrep_ha_write_row_reached';
|
||||
connection node_2;
|
||||
UPDATE `p-arent-` SET j=2 WHERE id=23;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG_DBUG='-d,wsrep_ha_write_row';
|
||||
SET DEBUG_SYNC='now SIGNAL wsrep_ha_write_row_continue';
|
||||
SET GLOBAL DEBUG_DBUG="RESET";
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL wsrep_slave_threads=DEFAULT;
|
||||
connection node_2;
|
||||
drop table `c-hild`;
|
||||
drop table `p-arent-`;
|
@@ -78,7 +78,6 @@ INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
|
||||
REPLACE INTO t4 SELECT * FROM t1;
|
||||
REPLACE INTO t5 SELECT * FROM t2;
|
||||
REPLACE INTO t6 SELECT * FROM t3;
|
||||
ERROR HY000: Transactional commit not supported by involved engine(s)
|
||||
REPLACE INTO t7 SELECT * FROM t2;
|
||||
REPLACE INTO t8 SELECT * FROM t3;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
|
||||
@@ -96,9 +95,9 @@ EXPECT_1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
EXPECT_0
|
||||
0
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
EXPECT_1000
|
||||
1000
|
||||
@@ -121,9 +120,9 @@ EXPECT_1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
EXPECT_0
|
||||
0
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
EXPECT_1000
|
||||
1000
|
||||
@@ -147,7 +146,6 @@ INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
|
||||
INSERT INTO t4 SELECT * FROM t1;
|
||||
INSERT INTO t5 SELECT * FROM t2;
|
||||
INSERT INTO t6 SELECT * FROM t3;
|
||||
ERROR HY000: Transactional commit not supported by involved engine(s)
|
||||
INSERT INTO t7 SELECT * FROM t2;
|
||||
INSERT INTO t8 SELECT * FROM t3;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t1;
|
||||
@@ -165,9 +163,9 @@ EXPECT_1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
EXPECT_0
|
||||
0
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
EXPECT_1000
|
||||
1000
|
||||
@@ -190,9 +188,9 @@ EXPECT_1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
EXPECT_0
|
||||
0
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
EXPECT_1000
|
||||
1000
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
EXPECT_1000
|
||||
1000
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package My::Suite::Galera;
|
||||
|
||||
use warnings;
|
||||
use lib 'suite';
|
||||
use wsrep::common;
|
||||
|
||||
@@ -63,6 +64,7 @@ push @::global_suppressions,
|
||||
qr(WSREP: Failed to remove page file .*),
|
||||
qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*),
|
||||
qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|,
|
||||
qr|WSREP: Send action \{.* STATE_REQUEST} returned -107 \(Transport endpoint is not connected\)|,
|
||||
qr|WSREP: Trying to continue unpaused monitor|,
|
||||
qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|,
|
||||
qr|WSREP: Failed to report last committed|,
|
||||
|
@@ -12,16 +12,23 @@ SELECT COUNT(*) AS EXPECT_6 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_6 FROM t1;
|
||||
|
||||
--connection node_1
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ENGINE=Aria;
|
||||
SET GLOBAL wsrep_mode=REPLICATE_ARIA;
|
||||
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
|
||||
SELECT COUNT(*) AS EXPECT_12 FROM t1;
|
||||
|
||||
--connection node_2
|
||||
SELECT COUNT(*) AS EXPECT_12 FROM t1;
|
||||
|
||||
--connection node_1
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
|
||||
SELECT COUNT(*) AS EXPECT_18 FROM t1;
|
||||
|
||||
--connection node_2
|
||||
SELECT COUNT(*) AS EXPECT_18 FROM t1;
|
||||
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL wsrep_load_data_splitting=OFF;
|
||||
SET GLOBAL wsrep_mode=DEFAULT;
|
||||
|
||||
|
||||
|
20
mysql-test/suite/galera/t/MDEV-26499.test
Normal file
20
mysql-test/suite/galera/t/MDEV-26499.test
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# MDEV-26499
|
||||
#
|
||||
# This test reproduces some failure on mysql_shutdown() call
|
||||
# which manifests sporadically in some galera MTR tests during
|
||||
# restart of a node.
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_2
|
||||
SET GLOBAL debug_dbug="+d,simulate_slow_client_at_shutdown";
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--source include/auto_increment_offset_restore.inc
|
4
mysql-test/suite/galera/t/MDEV-33828.cnf
Normal file
4
mysql-test/suite/galera/t/MDEV-33828.cnf
Normal file
@@ -0,0 +1,4 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
log-bin
|
45
mysql-test/suite/galera/t/MDEV-33828.test
Normal file
45
mysql-test/suite/galera/t/MDEV-33828.test
Normal file
@@ -0,0 +1,45 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_aria.inc
|
||||
|
||||
SET AUTOCOMMIT=ON;
|
||||
SELECT @@autocommit;
|
||||
|
||||
SET LOCAL enforce_storage_engine=InnoDB;
|
||||
|
||||
CREATE TABLE t1(id int not null primary key auto_increment, name varchar(64)) ENGINE=InnoDB;
|
||||
INSERT INTO t1(name) VALUES ('name1'),('name3'),('name6'),('name2');
|
||||
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE sel_proc()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
SELECT * FROM t1;
|
||||
END|
|
||||
|
||||
CREATE PROCEDURE ins_proc()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
INSERT INTO t1 VALUES ('name_proc');
|
||||
END|
|
||||
DELIMITER ;|
|
||||
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SELECT @@autocommit;
|
||||
|
||||
START TRANSACTION;
|
||||
|
||||
insert into t1(name) values('name10');
|
||||
|
||||
select param_list, returns, db, type from mysql.proc where name='sel_proc';
|
||||
|
||||
call ins_proc();
|
||||
|
||||
COMMIT;
|
||||
|
||||
SET AUTOCOMMIT=ON;
|
||||
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE sel_proc;
|
||||
DROP PROCEDURE ins_proc;
|
@@ -37,7 +37,7 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
|
||||
# Write file to make mysql-test-run.pl expect the crash, but don't start it
|
||||
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
|
||||
--exec echo "wait" > $_expect_file_name
|
||||
--write_line wait $_expect_file_name
|
||||
|
||||
--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
|
||||
|
||||
|
@@ -27,8 +27,8 @@ INSERT INTO t1 VALUES (1);
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
--let $NODE_2_PIDFILE = `SELECT @@pid_file`
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
--exec kill -9 `cat $NODE_1_PIDFILE` `cat $NODE_2_PIDFILE`
|
||||
|
||||
# Perform --wsrep-recover and preserve the positions into variables by placing them in $MYSQL_TMP_DIR/galera_wsrep_start_position.inc and then --source'ing it
|
||||
@@ -66,8 +66,8 @@ if ($galera_wsrep_start_position2 == '') {
|
||||
|
||||
# Instruct MTR to perform the actual restart using --wsrep-start-position . Proper --wsrep_cluster_address is used as my.cnf only contains 'gcomm://' for node #1
|
||||
|
||||
--exec echo "restart: --wsrep-start-position=$galera_wsrep_start_position1 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--exec echo "restart: --wsrep-start-position=$galera_wsrep_start_position2 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
--write_line "restart: --wsrep-start-position=$galera_wsrep_start_position1 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart: --wsrep-start-position=$galera_wsrep_start_position2 --wsrep_cluster_address=gcomm://127.0.0.1:$NODE_GALERAPORT_1,127.0.0.1:$NODE_GALERAPORT_2" $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
|
||||
--sleep 5
|
||||
--connection node_1
|
||||
|
@@ -62,7 +62,7 @@ SELECT * FROM t1;
|
||||
--let $start_mysqld_params=--galera-unknown-option
|
||||
|
||||
--echo Starting server ...
|
||||
--exec echo "try:$start_mysqld_params" > $_expect_file_name
|
||||
--write_line "try:$start_mysqld_params" $_expect_file_name
|
||||
|
||||
# Sleep to ensure that server exited...
|
||||
|
||||
@@ -107,7 +107,7 @@ SELECT * FROM t1;
|
||||
--let $start_mysqld_params=--galera-unknown-option
|
||||
|
||||
--echo Starting server ...
|
||||
--exec echo "try:$start_mysqld_params" > $_expect_file_name
|
||||
--write_line "try:$start_mysqld_params" $_expect_file_name
|
||||
|
||||
# Sleep to ensure that server exited...
|
||||
|
||||
|
48
mysql-test/suite/galera/t/galera_table_with_hyphen.inc
Normal file
48
mysql-test/suite/galera/t/galera_table_with_hyphen.inc
Normal file
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# parameters:
|
||||
# $fk_child - child table name
|
||||
# $fk_parent - parent table name
|
||||
#
|
||||
--connection node_1
|
||||
SET GLOBAL wsrep_slave_threads=2;
|
||||
|
||||
--eval CREATE TABLE `$fk_parent` ( id INT AUTO_INCREMENT PRIMARY KEY, j INT) ENGINE=InnoDB
|
||||
|
||||
--eval CREATE TABLE `$fk_child` (id INT AUTO_INCREMENT PRIMARY KEY, parent_id INT, j INT, FOREIGN KEY (parent_id) REFERENCES `$fk_parent`(id)) ENGINE=InnoDB
|
||||
|
||||
--eval INSERT INTO `$fk_parent` VALUES (23,0)
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM `$fk_parent`;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_1a
|
||||
SET GLOBAL DEBUG_DBUG='+d,wsrep_ha_write_row';
|
||||
|
||||
--connection node_2
|
||||
--eval INSERT INTO `$fk_child` VALUES (21,23,0),(22,23,0),(23,23,0)
|
||||
|
||||
--connection node_1a
|
||||
SET DEBUG_SYNC='now WAIT_FOR wsrep_ha_write_row_reached';
|
||||
|
||||
--let $wsrep_received_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_received'`
|
||||
|
||||
--connection node_2
|
||||
--eval UPDATE `$fk_parent` SET j=2 WHERE id=23
|
||||
|
||||
--connection node_1a
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_received_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_received'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SET GLOBAL DEBUG_DBUG='-d,wsrep_ha_write_row';
|
||||
SET DEBUG_SYNC='now SIGNAL wsrep_ha_write_row_continue';
|
||||
|
||||
SET GLOBAL DEBUG_DBUG="RESET";
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
||||
SET GLOBAL wsrep_slave_threads=DEFAULT;
|
||||
|
||||
--connection node_2
|
||||
--eval drop table `$fk_child`
|
||||
--eval drop table `$fk_parent`
|
||||
|
34
mysql-test/suite/galera/t/galera_table_with_hyphen.test
Normal file
34
mysql-test/suite/galera/t/galera_table_with_hyphen.test
Normal file
@@ -0,0 +1,34 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
#
|
||||
# Testing how tables and databases with special characters
|
||||
# are treated in certification
|
||||
#
|
||||
# The test creates two tables having foreign key constraint
|
||||
# reference and executes two transactions which modify
|
||||
# same rows. The same test is executed with different names
|
||||
# containin special characters to see if the certification
|
||||
# can detect the conflicts
|
||||
#
|
||||
# Actual test is in include file galera_table_with_hyphen.inc
|
||||
# It create the test tables from parameters $fk_child and
|
||||
# $fk_parent
|
||||
#
|
||||
--connection node_1
|
||||
set wsrep_sync_wait=0;
|
||||
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
|
||||
--let $fk_child = child
|
||||
--let $fk_parent = par-ent
|
||||
|
||||
--source galera_table_with_hyphen.inc
|
||||
|
||||
--let $fk_child = c-hild
|
||||
--let $fk_parent = p-arent-
|
||||
|
||||
--source galera_table_with_hyphen.inc
|
@@ -79,8 +79,6 @@ INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
|
||||
|
||||
REPLACE INTO t4 SELECT * FROM t1;
|
||||
REPLACE INTO t5 SELECT * FROM t2;
|
||||
# For some reason Aria storage engine does register_ha
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
REPLACE INTO t6 SELECT * FROM t3;
|
||||
REPLACE INTO t7 SELECT * FROM t2;
|
||||
REPLACE INTO t8 SELECT * FROM t3;
|
||||
@@ -90,7 +88,7 @@ SELECT COUNT(*) AS EXPECT_1000 FROM t2;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
|
||||
|
||||
@@ -105,7 +103,7 @@ SELECT COUNT(*) AS EXPECT_1000 FROM t2;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
|
||||
|
||||
@@ -129,8 +127,6 @@ INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
|
||||
|
||||
INSERT INTO t4 SELECT * FROM t1;
|
||||
INSERT INTO t5 SELECT * FROM t2;
|
||||
# For some reason Aria storage engine does register_ha
|
||||
--error ER_ERROR_DURING_COMMIT
|
||||
INSERT INTO t6 SELECT * FROM t3;
|
||||
INSERT INTO t7 SELECT * FROM t2;
|
||||
INSERT INTO t8 SELECT * FROM t3;
|
||||
@@ -140,7 +136,7 @@ SELECT COUNT(*) AS EXPECT_1000 FROM t2;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
|
||||
|
||||
@@ -155,7 +151,7 @@ SELECT COUNT(*) AS EXPECT_1000 FROM t2;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t3;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t4;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t5;
|
||||
SELECT COUNT(*) AS EXPECT_0 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t6;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t7;
|
||||
SELECT COUNT(*) AS EXPECT_1000 FROM t8;
|
||||
|
||||
|
@@ -36,7 +36,7 @@ SET DEBUG_SYNC = "now WAIT_FOR sync_point_reached";
|
||||
# Restart without waiting. The UPDATE should block FTWRL on node_1,
|
||||
# so the SST cannot be completed and node_2 cannot join before
|
||||
# UPDATE connection is signalled to continue.
|
||||
--exec echo "restart:$start_mysqld_params" > $_expect_file_name
|
||||
--write_line "restart:$start_mysqld_params" $_expect_file_name
|
||||
# If the bug is present, FTWRL times out on node_1 in couple of
|
||||
# seconds and node_2 fails to join.
|
||||
--sleep 10
|
||||
|
@@ -1,4 +1,5 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/force_restart.inc # ARCHIVE plugin must be uninstalled
|
||||
|
||||
if (!$HA_ARCHIVE_SO) {
|
||||
skip Needs Archive loadable plugin;
|
||||
|
@@ -19,3 +19,5 @@ galera_ipv6_mariabackup_section : temporarily disabled at the request of Codersh
|
||||
# Opensuse/suse/rocky9/rocky84/rhel9/rhel8-ppc64le .. - all same IPv6 isn't configured right or skipping or galera
|
||||
galera_ipv6_rsync : Can't connect to server on '::1' (115)
|
||||
galera_ipv6_rsync_section : Can't connect to server on '::1' (115)
|
||||
MDEV-29171 : MDEV-33842 galera_3nodes.MDEV-29171 fails on shutdown_server
|
||||
GCF-354 : MDEV-25614 Galera test failure on GCF-354
|
||||
|
@@ -21,7 +21,7 @@ SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal";
|
||||
|
||||
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
|
||||
--exec echo "wait" > $_expect_file_name
|
||||
--write_line wait $_expect_file_name
|
||||
|
||||
CREATE TABLE t1 (f1 VARCHAR(30) not null primary key) ENGINE=InnoDB;
|
||||
|
||||
|
33
mysql-test/suite/galera_sr/r/galera_sr_bf_abort_idle.result
Normal file
33
mysql-test/suite/galera_sr/r/galera_sr_bf_abort_idle.result
Normal file
@@ -0,0 +1,33 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER);
|
||||
INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
|
||||
SET SESSION wsrep_trx_fragment_size=10;
|
||||
SET SESSION wsrep_trx_fragment_unit='rows';
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = f2 + 10;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (10,2);
|
||||
connection node_1a;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (9,1);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1(f1 INTEGER PRIMARY KEY, f2 INTEGER);
|
||||
INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
|
||||
SET SESSION wsrep_trx_fragment_size=5;
|
||||
SET SESSION wsrep_trx_fragment_unit='rows';
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = f2 + 10;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (10,2);
|
||||
connection node_1a;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (9,1);
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
DROP TABLE t1;
|
@@ -43,8 +43,9 @@ SET SESSION wsrep_sync_wait = 0;
|
||||
SET debug_sync = "now SIGNAL write_row_continue";
|
||||
|
||||
# Let's give the INSERT some time, to make sure it does rollback
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = "INSERT INTO t1 VALUES (1)" AND STATE = "Freeing items";
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = "INSERT INTO t1 VALUES (1)" AND (STATE = "Freeing items" OR STATE = 'Rollback');
|
||||
--let $wait_condition_on_error_output = SELECT INFO, STATE FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
--source include/wait_condition_with_debug.inc
|
||||
|
||||
# Resume the DDL in streaming_rollback
|
||||
SET SESSION debug_sync = "now SIGNAL wsrep_streaming_rollback_continue";
|
||||
|
68
mysql-test/suite/galera_sr/t/galera_sr_bf_abort_idle.test
Normal file
68
mysql-test/suite/galera_sr/t/galera_sr_bf_abort_idle.test
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# Test BF abort for idle SR transactions
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
|
||||
#
|
||||
# Case 1: BF abort idle SR transaction that has not yet replicated any fragments
|
||||
#
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER);
|
||||
INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
|
||||
|
||||
--let $bf_count = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.global_status WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
|
||||
|
||||
SET SESSION wsrep_trx_fragment_size=10;
|
||||
SET SESSION wsrep_trx_fragment_unit='rows';
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = f2 + 10;
|
||||
|
||||
--connection node_2
|
||||
INSERT INTO t1 VALUES (10,2);
|
||||
|
||||
# Wait for SR transaction to be BF aborted
|
||||
--connection node_1a
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = $bf_count + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
||||
--connection node_1
|
||||
--error ER_LOCK_DEADLOCK
|
||||
INSERT INTO t1 VALUES (9,1);
|
||||
ROLLBACK;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
#
|
||||
# Case 2: BF abort idle SR transaction that has already replicated a fragment
|
||||
#
|
||||
--connection node_1
|
||||
CREATE TABLE t1(f1 INTEGER PRIMARY KEY, f2 INTEGER);
|
||||
INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
|
||||
|
||||
--let $bf_count = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.global_status WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
|
||||
|
||||
|
||||
SET SESSION wsrep_trx_fragment_size=5;
|
||||
SET SESSION wsrep_trx_fragment_unit='rows';
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET f2 = f2 + 10;
|
||||
|
||||
--connection node_2
|
||||
INSERT INTO t1 VALUES (10,2);
|
||||
|
||||
# Wait for SR transaction to be BF aborted
|
||||
--connection node_1a
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = $bf_count + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_1
|
||||
--error ER_LOCK_DEADLOCK
|
||||
INSERT INTO t1 VALUES (9,1);
|
||||
ROLLBACK;
|
||||
|
||||
DROP TABLE t1;
|
@@ -1,5 +1,5 @@
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:29:25.129637040 +0530
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
|
||||
@@ -3,18 +3,12 @@
|
||||
# SPACE IN 5.7 THAN IN 5.6
|
||||
#
|
||||
@@ -14,7 +14,7 @@
|
||||
-# bytes: 65536
|
||||
+# bytes: 131072
|
||||
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
|
||||
-# bytes: 4194304
|
||||
-# bytes: 2097152
|
||||
-DROP TABLE t1;
|
||||
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
|
||||
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:31:39.288769153 +0530
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
|
||||
@@ -3,18 +3,18 @@
|
||||
# SPACE IN 5.7 THAN IN 5.6
|
||||
#
|
||||
@@ -13,7 +13,7 @@
|
||||
-# bytes: 65536
|
||||
+# bytes: 16384
|
||||
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
|
||||
# bytes: 4194304
|
||||
# bytes: 2097152
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:30:28.957174270 +0530
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
|
||||
@@ -3,18 +3,12 @@
|
||||
# SPACE IN 5.7 THAN IN 5.6
|
||||
#
|
||||
@@ -14,7 +14,7 @@
|
||||
-# bytes: 65536
|
||||
+# bytes: 262144
|
||||
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
|
||||
-# bytes: 4194304
|
||||
-# bytes: 2097152
|
||||
-DROP TABLE t1;
|
||||
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
|
||||
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:31:03.516962339 +0530
|
||||
--- mysql-test/suite/innodb/r/check_ibd_filesize.result
|
||||
+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
|
||||
@@ -3,18 +3,18 @@
|
||||
# SPACE IN 5.7 THAN IN 5.6
|
||||
#
|
||||
@@ -13,7 +13,7 @@
|
||||
-# bytes: 65536
|
||||
+# bytes: 32768
|
||||
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
|
||||
# bytes: 4194304
|
||||
# bytes: 2097152
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
|
@@ -10,7 +10,7 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
|
||||
# bytes: 65536
|
||||
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
|
||||
# bytes: 4194304
|
||||
# bytes: 2097152
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
|
||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
|
24
mysql-test/suite/innodb/r/cursor-restore-unique-null.result
Normal file
24
mysql-test/suite/innodb/r/cursor-restore-unique-null.result
Normal file
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, UNIQUE KEY `b_c` (`b`,`c`))
|
||||
ENGINE=InnoDB, STATS_PERSISTENT=0;
|
||||
INSERT INTO t SET a = 1, c = 2;
|
||||
connect con1,localhost,root;
|
||||
BEGIN;
|
||||
INSERT INTO t SET a=2, c=2;
|
||||
connection default;
|
||||
BEGIN;
|
||||
SET DEBUG_SYNC="lock_wait_start SIGNAL select_locked";
|
||||
SELECT * FROM t FORCE INDEX(b) FOR UPDATE;
|
||||
connection con1;
|
||||
SET DEBUG_SYNC="now WAIT_FOR select_locked";
|
||||
ROLLBACK;
|
||||
connection default;
|
||||
# If the bug is not fixed, and the both unique index key fields are
|
||||
# NULL, there will be two (1, NULL, 2) rows in the result,
|
||||
# because cursor will be restored to (NULL, 2, 1) position for
|
||||
# secondary key instead of "supremum".
|
||||
a b c
|
||||
1 NULL 2
|
||||
COMMIT;
|
||||
SET DEBUG_SYNC="RESET";
|
||||
disconnect con1;
|
||||
DROP TABLE t;
|
Binary file not shown.
@@ -64,6 +64,7 @@ alter table t1 discard tablespace;
|
||||
flush tables t2 for export;
|
||||
unlock tables;
|
||||
alter table t1 import tablespace;
|
||||
# restart
|
||||
select * from t1;
|
||||
z
|
||||
42
|
||||
|
@@ -82,7 +82,6 @@ SELECT * FROM t;
|
||||
a b
|
||||
10 20
|
||||
10 20
|
||||
disconnect consistent;
|
||||
connection default;
|
||||
TRUNCATE TABLE t;
|
||||
INSERT INTO t VALUES(NULL, 1), (2, 2);
|
||||
@@ -99,10 +98,39 @@ a b
|
||||
COMMIT;
|
||||
connection con_weird;
|
||||
COMMIT;
|
||||
disconnect con_weird;
|
||||
connection default;
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
10 1
|
||||
10 20
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-33802 Weird read view after ROLLBACK of other transactions
|
||||
#
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
|
||||
INSERT INTO t SET a=1;
|
||||
BEGIN;
|
||||
INSERT INTO t SET a=2;
|
||||
connection consistent;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
ERROR HY000: Record has changed since last read in table 't'
|
||||
connection con_weird;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
connection default;
|
||||
ROLLBACK;
|
||||
connection con_weird;
|
||||
a b
|
||||
1 NULL
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
a b
|
||||
1 NULL
|
||||
disconnect con_weird;
|
||||
connection consistent;
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
a b
|
||||
1 NULL
|
||||
disconnect consistent;
|
||||
connection default;
|
||||
DROP TABLE t;
|
||||
|
@@ -196,6 +196,7 @@ icp_attempts disabled
|
||||
icp_no_match disabled
|
||||
icp_out_of_range disabled
|
||||
icp_match disabled
|
||||
create temporary table orig_innodb_metrics as select name, enabled from information_schema.innodb_metrics;
|
||||
set global innodb_monitor_disable = All;
|
||||
select name from information_schema.innodb_metrics where enabled;
|
||||
name
|
||||
@@ -429,7 +430,7 @@ set global innodb_monitor_reset_all = default;
|
||||
# MONITORS
|
||||
#
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*1*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 0
|
||||
@@ -437,13 +438,13 @@ SET GLOBAL innodb_monitor_enable='module_buffer_page';
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4);
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*2*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 1
|
||||
SET GLOBAL innodb_monitor_disable='module_buffer_page';
|
||||
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*3*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 0
|
||||
@@ -453,13 +454,13 @@ ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value o
|
||||
INSERT INTO t1 VALUES (5), (6), (7), (8);
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*4*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 1
|
||||
SET GLOBAL innodb_monitor_disable='%';
|
||||
SET GLOBAL innodb_monitor_reset_all='%';
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*5*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 0
|
||||
@@ -467,7 +468,7 @@ SET GLOBAL innodb_monitor_enable='ALL';
|
||||
INSERT INTO t1 VALUES (9), (10), (11), (12);
|
||||
FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*6*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
NAME COUNT > 0
|
||||
buffer_page_written_index_leaf 1
|
||||
@@ -597,6 +598,41 @@ DROP TABLE t1;
|
||||
DROP TABLE fl2;
|
||||
DROP TABLE fl1;
|
||||
DROP TABLE fl0;
|
||||
SET GLOBAL innodb_monitor_enable=default;
|
||||
SET GLOBAL innodb_monitor_disable=default;
|
||||
SET GLOBAL innodb_monitor_reset_all=default;
|
||||
set global innodb_monitor_disable = 'adaptive\\_hash\\_p%';
|
||||
set global innodb_monitor_disable = 'adaptive\\_hash\\_r%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_n%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_s%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_g%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_s%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_u%';
|
||||
set global innodb_monitor_disable = 'buffer\\_f%';
|
||||
set global innodb_monitor_disable = 'buffer\\_page\\_%';
|
||||
set global innodb_monitor_disable = 'c%';
|
||||
set global innodb_monitor_disable = 'ddl%';
|
||||
set global innodb_monitor_disable = 'icp%';
|
||||
set global innodb_monitor_disable = 'index\\_p%';
|
||||
set global innodb_monitor_disable = 'innodb\\_di%';
|
||||
set global innodb_monitor_disable = 'innodb\\_l%';
|
||||
set global innodb_monitor_disable = 'innodb\\_m%';
|
||||
set global innodb_monitor_disable = 'lock\\_re%';
|
||||
set global innodb_monitor_disable = 'lock\\_ta%';
|
||||
set global innodb_monitor_disable = 'log%';
|
||||
set global innodb_monitor_disable = 'm%';
|
||||
set global innodb_monitor_disable = 'p%';
|
||||
set global innodb_monitor_disable = 't%';
|
||||
set global innodb_monitor_enable = 'log\\_w%';
|
||||
set global innodb_monitor_enable = 'trx_rseg_history_len';
|
||||
set global innodb_monitor_enable = 'trx_undo_slots_cached';
|
||||
set global innodb_monitor_enable=default;
|
||||
Warnings:
|
||||
Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
|
||||
set global innodb_monitor_disable=default;
|
||||
Warnings:
|
||||
Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
|
||||
set global innodb_monitor_reset_all=default;
|
||||
Warnings:
|
||||
Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
|
||||
select name, orig.enabled, new.enabled from
|
||||
orig_innodb_metrics orig join information_schema.innodb_metrics new using(name)
|
||||
where orig.enabled != new.enabled;
|
||||
name enabled enabled
|
||||
|
@@ -70,7 +70,7 @@ let $orig_table_id = `SELECT table_id
|
||||
WHERE name = 'test/t1'`;
|
||||
|
||||
# Write file to make mysql-test-run.pl expect crash
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
--error 2013
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
||||
@@ -110,7 +110,7 @@ let $orig_table_id = `SELECT table_id
|
||||
WHERE name = 'test/t2'`;
|
||||
|
||||
# Write file to make mysql-test-run.pl expect crash
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
--error 2013
|
||||
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
|
||||
@@ -150,7 +150,7 @@ let $orig_table_id = `select table_id from
|
||||
information_schema.innodb_sys_tables where name = 'test/t1'`;
|
||||
|
||||
# Write file to make mysql-test-run.pl expect crash
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
#
|
||||
--error 2013
|
||||
ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
|
||||
|
@@ -18,7 +18,7 @@ INSERT INTO t1(b) VALUES('one'), ('two'), ('three');
|
||||
|
||||
--echo #
|
||||
--echo # Create a file called MYSQLD_DATADIR/test/t1.ibd
|
||||
--exec echo "This is not t1.ibd" > $MYSQLD_DATADIR/test/t1.ibd
|
||||
--write_line "This is not t1.ibd" $MYSQLD_DATADIR/test/t1.ibd
|
||||
|
||||
--echo # Directory listing of test/*.ibd
|
||||
--echo #
|
||||
|
36
mysql-test/suite/innodb/t/cursor-restore-unique-null.test
Normal file
36
mysql-test/suite/innodb/t/cursor-restore-unique-null.test
Normal file
@@ -0,0 +1,36 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, UNIQUE KEY `b_c` (`b`,`c`))
|
||||
ENGINE=InnoDB, STATS_PERSISTENT=0;
|
||||
INSERT INTO t SET a = 1, c = 2;
|
||||
|
||||
--connect con1,localhost,root
|
||||
BEGIN;
|
||||
INSERT INTO t SET a=2, c=2;
|
||||
|
||||
--connection default
|
||||
BEGIN;
|
||||
SET DEBUG_SYNC="lock_wait_start SIGNAL select_locked";
|
||||
--send SELECT * FROM t FORCE INDEX(b) FOR UPDATE
|
||||
|
||||
--connection con1
|
||||
SET DEBUG_SYNC="now WAIT_FOR select_locked";
|
||||
ROLLBACK;
|
||||
|
||||
--connection default
|
||||
--echo # If the bug is not fixed, and the both unique index key fields are
|
||||
--echo # NULL, there will be two (1, NULL, 2) rows in the result,
|
||||
--echo # because cursor will be restored to (NULL, 2, 1) position for
|
||||
--echo # secondary key instead of "supremum".
|
||||
--reap
|
||||
COMMIT;
|
||||
|
||||
SET DEBUG_SYNC="RESET";
|
||||
|
||||
--disconnect con1
|
||||
DROP TABLE t;
|
||||
--source include/wait_until_count_sessions.inc
|
@@ -45,7 +45,7 @@ commit work;
|
||||
# Slow shutdown and restart to make sure ibuf merge is finished
|
||||
SET GLOBAL innodb_fast_shutdown = 0;
|
||||
let $shutdown_timeout=;
|
||||
let $restart_parameters="--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0";
|
||||
let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
|
||||
--source include/restart_mysqld.inc
|
||||
--source ../include/no_checkpoint_start.inc
|
||||
begin;
|
||||
@@ -95,7 +95,7 @@ select f1, f2 from t1;
|
||||
--echo # Test Begin: Test if recovery works if 1st page of
|
||||
--echo # system tablespace is corrupted and 2nd page as corrupted.
|
||||
|
||||
let $restart_parameters="--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0";
|
||||
let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
|
||||
--source include/restart_mysqld.inc
|
||||
--source ../include/no_checkpoint_start.inc
|
||||
begin;
|
||||
|
@@ -51,7 +51,7 @@ while ($numtests)
|
||||
START TRANSACTION;
|
||||
insert into t1 select * from t2;
|
||||
# Write file to make mysql-test-run.pl expect crash
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
eval call setcrash($numtests);
|
||||
|
||||
|
@@ -51,7 +51,7 @@ while ($numtests)
|
||||
START TRANSACTION;
|
||||
insert into t1 select * from t2;
|
||||
# Write file to make mysql-test-run.pl expect crash
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
eval call setcrash($numtests);
|
||||
|
||||
|
@@ -35,7 +35,7 @@ let datadir= `select @@datadir`;
|
||||
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
|
||||
SET debug_dbug='+d,innodb_alter_commit_crash_before_commit';
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
--error 2013
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
|
||||
|
@@ -23,14 +23,14 @@ alter table t1 add primary key (pk);
|
||||
|
||||
--echo # Stop the server, replace the frm with the old one and restart the server
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--remove_file $datadir/test/t1.frm
|
||||
--copy_file $MYSQLTEST_VARDIR/tmp/t1.frm $datadir/test/t1.frm
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
|
@@ -43,7 +43,7 @@ INSERT INTO t1 VALUES(1),(2),(3);
|
||||
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
|
||||
|
||||
--exec echo wait > $_expect_file_name
|
||||
--write_line wait $_expect_file_name
|
||||
SET SESSION debug_dbug="+d,ib_discard_before_commit_crash";
|
||||
--error 2013
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
@@ -57,7 +57,7 @@ SET GLOBAL innodb_file_per_table = 1;
|
||||
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
|
||||
INSERT INTO t1 VALUES(1),(2),(3);
|
||||
|
||||
--exec echo wait > $_expect_file_name
|
||||
--write_line wait $_expect_file_name
|
||||
SET SESSION debug_dbug="+d,ib_discard_after_commit_crash";
|
||||
--error 2013
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
@@ -101,7 +101,7 @@ EOF
|
||||
--error ER_TABLESPACE_DISCARDED
|
||||
SELECT * FROM t1;
|
||||
|
||||
--exec echo wait > $_expect_file_name
|
||||
--write_line wait $_expect_file_name
|
||||
SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
|
||||
--error 2013
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
|
@@ -58,7 +58,7 @@ SELECT * FROM bug_60196;
|
||||
--echo # Restart server.
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
@@ -132,7 +132,7 @@ SELECT * FROM Bug_60309;
|
||||
--echo # Restart server.
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
@@ -35,7 +35,7 @@ SELECT @@GLOBAL.innodb_force_recovery<2 "have background defragmentation";
|
||||
# Wait for defrag_pool to be processed.
|
||||
|
||||
let $wait_timeout=30;
|
||||
let $wait_condition = SELECT COUNT(*)>0 FROM mysql.innodb_index_stats;
|
||||
let $wait_condition = SELECT COUNT(*)>5 FROM mysql.innodb_index_stats;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--sorted_result
|
||||
|
@@ -256,3 +256,16 @@ select * from t1;
|
||||
check table t1;
|
||||
|
||||
drop database best;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33214 Table is getting rebuild with
|
||||
--echo # ALTER TABLE ADD COLUMN
|
||||
--echo #
|
||||
use test;
|
||||
CREATE TABLE t1(f1 INT, f2 VARCHAR(10)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
INSERT INTO t1 VALUES(1,'abc'),(2,'def');
|
||||
ALTER TABLE t1 ADD (f3 VARCHAR(5000), f4 VARCHAR(20)), ALGORITHM=instant;
|
||||
ALTER TABLE t1 ADD f5 TEXT, ALGORITHM=INSTANT;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
@@ -83,6 +83,7 @@ flush tables t2 for export;
|
||||
unlock tables;
|
||||
|
||||
alter table t1 import tablespace;
|
||||
--source include/restart_mysqld.inc
|
||||
select * from t1;
|
||||
--remove_file $MYSQLD_DATADIR/test/t1.ibd
|
||||
|
||||
|
@@ -79,7 +79,6 @@ COMMIT;
|
||||
--connection consistent
|
||||
--reap
|
||||
SELECT * FROM t;
|
||||
--disconnect consistent
|
||||
|
||||
--connection default
|
||||
TRUNCATE TABLE t;
|
||||
@@ -103,8 +102,48 @@ COMMIT;
|
||||
--connection con_weird
|
||||
--reap
|
||||
COMMIT;
|
||||
--disconnect con_weird
|
||||
|
||||
--connection default
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33802 Weird read view after ROLLBACK of other transactions
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
|
||||
INSERT INTO t SET a=1;
|
||||
|
||||
BEGIN; INSERT INTO t SET a=2;
|
||||
|
||||
--connection consistent
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
--disable_ps2_protocol
|
||||
--error ER_CHECKREAD
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--connection con_weird
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
send
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
|
||||
--connection default
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = 'Sending data'
|
||||
and info LIKE 'SELECT * FROM t %';
|
||||
--source include/wait_condition.inc
|
||||
ROLLBACK;
|
||||
|
||||
--connection con_weird
|
||||
--reap
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
--disconnect con_weird
|
||||
|
||||
--connection consistent
|
||||
SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
|
||||
--disconnect consistent
|
||||
|
||||
--connection default
|
||||
DROP TABLE t;
|
||||
|
@@ -206,7 +206,7 @@ print FILE "\0" x 16384;
|
||||
close(FILE);
|
||||
EOF
|
||||
|
||||
--exec echo "" > $MYSQLD_DATADIR/test/u2.ibd
|
||||
--write_line "" $MYSQLD_DATADIR/test/u2.ibd
|
||||
|
||||
--copy_file $MYSQLD_DATADIR/test/u6.ibd $MYSQLD_DATADIR/test/u4.ibd
|
||||
|
||||
|
@@ -5,11 +5,11 @@
|
||||
# sys_vars.innodb_monitor_enable_basic
|
||||
|
||||
--source include/have_innodb.inc
|
||||
# Test turn on/off the monitor counter with "all" option
|
||||
# By default, they will be off.
|
||||
select name, if(enabled,'enabled','disabled') status
|
||||
from information_schema.innodb_metrics;
|
||||
|
||||
create temporary table orig_innodb_metrics as select name, enabled from information_schema.innodb_metrics;
|
||||
|
||||
set global innodb_monitor_disable = All;
|
||||
select name from information_schema.innodb_metrics where enabled;
|
||||
|
||||
@@ -315,18 +315,22 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
|
||||
let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`;
|
||||
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*1*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_enable='module_buffer_page';
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
|
||||
let $wait_condition= select count > 0 from information_schema.innodb_metrics where name like 'buffer_page_written_index_leaf';
|
||||
source include/wait_condition.inc;
|
||||
|
||||
SELECT /*2*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_disable='module_buffer_page';
|
||||
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*3*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_enable='%';
|
||||
@@ -334,18 +338,22 @@ SET GLOBAL innodb_monitor_enable='%';
|
||||
SET GLOBAL innodb_monitor_reset_all= '%', innodb_compression_algorithm= foo;
|
||||
INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
|
||||
let $wait_condition= select count > 0 from information_schema.innodb_metrics where name like 'buffer_page_written_index_leaf';
|
||||
source include/wait_condition.inc;
|
||||
|
||||
SELECT /*4*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_disable='%';
|
||||
SET GLOBAL innodb_monitor_reset_all='%';
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*5*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
SET GLOBAL innodb_monitor_enable='ALL';
|
||||
INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
SELECT /*6*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
|
||||
LIKE 'buffer_page_written_index_leaf';
|
||||
|
||||
DROP TABLE t1;
|
||||
@@ -462,8 +470,36 @@ DROP TABLE fl2;
|
||||
DROP TABLE fl1;
|
||||
DROP TABLE fl0;
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_monitor_enable=default;
|
||||
SET GLOBAL innodb_monitor_disable=default;
|
||||
SET GLOBAL innodb_monitor_reset_all=default;
|
||||
--enable_warnings
|
||||
set global innodb_monitor_disable = 'adaptive\\_hash\\_p%';
|
||||
set global innodb_monitor_disable = 'adaptive\\_hash\\_r%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_n%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_s%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_g%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_s%';
|
||||
set global innodb_monitor_disable = 'buffer\\_LRU\\_u%';
|
||||
set global innodb_monitor_disable = 'buffer\\_f%';
|
||||
set global innodb_monitor_disable = 'buffer\\_page\\_%';
|
||||
set global innodb_monitor_disable = 'c%';
|
||||
set global innodb_monitor_disable = 'ddl%';
|
||||
set global innodb_monitor_disable = 'icp%';
|
||||
set global innodb_monitor_disable = 'index\\_p%';
|
||||
set global innodb_monitor_disable = 'innodb\\_di%';
|
||||
set global innodb_monitor_disable = 'innodb\\_l%';
|
||||
set global innodb_monitor_disable = 'innodb\\_m%';
|
||||
set global innodb_monitor_disable = 'lock\\_re%';
|
||||
set global innodb_monitor_disable = 'lock\\_ta%';
|
||||
set global innodb_monitor_disable = 'log%';
|
||||
set global innodb_monitor_disable = 'm%';
|
||||
set global innodb_monitor_disable = 'p%';
|
||||
set global innodb_monitor_disable = 't%';
|
||||
set global innodb_monitor_enable = 'log\\_w%';
|
||||
set global innodb_monitor_enable = 'trx_rseg_history_len';
|
||||
set global innodb_monitor_enable = 'trx_undo_slots_cached';
|
||||
|
||||
set global innodb_monitor_enable=default;
|
||||
set global innodb_monitor_disable=default;
|
||||
set global innodb_monitor_reset_all=default;
|
||||
|
||||
select name, orig.enabled, new.enabled from
|
||||
orig_innodb_metrics orig join information_schema.innodb_metrics new using(name)
|
||||
where orig.enabled != new.enabled;
|
||||
|
@@ -135,7 +135,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
# We cannot use include/restart_mysqld.inc in this particular test,
|
||||
# because SHOW STATUS would fail due to unwritable (nonexistent) tmpdir.
|
||||
--source include/shutdown_mysqld.inc
|
||||
--exec echo "restart: --tmpdir=/dev/null/$MYSQL_TMP_DIR --skip-innodb-fast-shutdown" > $_expect_file_name
|
||||
--write_line "restart: --tmpdir=/dev/null/$MYSQL_TMP_DIR --skip-innodb-fast-shutdown" $_expect_file_name
|
||||
--enable_reconnect
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
|
@@ -12,7 +12,7 @@ insert into t1 values (1, 1);
|
||||
# Slow shutdown and restart to make sure ibuf merge is finished
|
||||
SET GLOBAL innodb_fast_shutdown = 0;
|
||||
let $shutdown_timeout=;
|
||||
let $restart_parameters="--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0";
|
||||
let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--source ../include/no_checkpoint_start.inc
|
||||
|
@@ -13,7 +13,7 @@ call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operation
|
||||
|
||||
# Re-create the undo log tablespaces after slow shutdown
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
let $restart_parameters="--innodb_undo_tablespaces=2";
|
||||
let $restart_parameters=--innodb_undo_tablespaces=2;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SET GLOBAL innodb_undo_log_truncate = 0;
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
# Re-create the undo log tablespaces after slow shutdown
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
let $restart_parameters="--innodb_undo_tablespaces=2";
|
||||
let $restart_parameters=--innodb_undo_tablespaces=2;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SET GLOBAL innodb_undo_log_truncate = 1;
|
||||
|
@@ -115,7 +115,7 @@ CREATE TABLE t1 (
|
||||
|
||||
INSERT INTO t1(title) VALUES('database');
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
SET debug_dbug = '+d,fts_instrument_sync_debug,fts_write_node_crash';
|
||||
|
||||
|
@@ -463,7 +463,7 @@ rollback;
|
||||
|
||||
# Test partial update rollback after recovered.
|
||||
# Crash the server in partial update.
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
set session debug="+d,row_mysql_crash_if_error";
|
||||
--error 2013
|
||||
update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
|
||||
|
@@ -412,13 +412,13 @@ SHOW CREATE TABLE t77_restart;
|
||||
--echo # Moving tablespace 't4_restart' from MYSQL_DATA_DIR to MYSQL_TMP_DIR/new_dir
|
||||
--copy_file $MYSQL_DATA_DIR/test/t4_restart.ibd $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
|
||||
--remove_file $MYSQL_DATA_DIR/test/t4_restart.ibd
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd > $MYSQL_DATA_DIR/test/t4_restart.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd $MYSQL_DATA_DIR/test/t4_restart.isl
|
||||
|
||||
--echo # Moving tablespace 't55_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
|
||||
--copy_file $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
|
||||
--remove_file $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
|
||||
--remove_file $MYSQL_DATA_DIR/test/t55_restart.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd > $MYSQL_DATA_DIR/test/t55_restart.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd $MYSQL_DATA_DIR/test/t55_restart.isl
|
||||
|
||||
--echo # Moving tablespace 't66_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
|
||||
--copy_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p0.ibd $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd
|
||||
@@ -430,9 +430,9 @@ SHOW CREATE TABLE t77_restart;
|
||||
--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
|
||||
--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
|
||||
--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
|
||||
|
||||
--echo # Moving tablespace 't77_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
|
||||
--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p0#SP#s0.ibd $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd
|
||||
@@ -447,10 +447,10 @@ SHOW CREATE TABLE t77_restart;
|
||||
--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
|
||||
--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
|
||||
--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
|
||||
--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
|
||||
--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
|
||||
|
||||
--echo ---- MYSQL_DATA_DIR/test
|
||||
--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
|
||||
|
@@ -75,7 +75,7 @@ SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Execute the statement that causes the crash
|
||||
--error 2013
|
||||
@@ -96,7 +96,7 @@ SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
# Don't start up the server right away.
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Execute the statement that causes the crash
|
||||
--error 2013
|
||||
@@ -113,7 +113,7 @@ EOF
|
||||
|
||||
--echo # Restart and reconnect to the server
|
||||
--enable_reconnect
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--disable_reconnect
|
||||
|
||||
|
@@ -3,6 +3,8 @@
|
||||
|
||||
--source include/have_maria.inc
|
||||
--source include/default_charset.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
# Cleanup
|
||||
--disable_warnings
|
||||
@@ -13,7 +15,7 @@ DROP PROCEDURE IF EXISTS proc_insert_many;
|
||||
# --------
|
||||
|
||||
# Configure encryption
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
@@ -21,7 +23,7 @@ DROP PROCEDURE IF EXISTS proc_insert_many;
|
||||
1;76025E3ADC78D74819927DB02AAA4C35
|
||||
EOF
|
||||
|
||||
--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
@@ -73,7 +75,7 @@ CALL proc_insert_many();
|
||||
UNLOCK TABLES;
|
||||
|
||||
# Crash and restart the server while it's still flushing index
|
||||
--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/key.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
SET debug_dbug="d,crash_shutdown";
|
||||
--error 2013
|
||||
shutdown;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
#
|
||||
|
||||
# Write file to make mysql-test-run.pl expect crash and restart
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
create table t1 (a int primary key, b int, c int, unique key(b), key(c)) engine=aria transactional=1;
|
||||
insert into t1 values (1000,1000,1000);
|
||||
|
@@ -29,10 +29,10 @@ CREATE TABLE t1 (a INT KEY,b INT,KEY(b)) ENGINE=Aria;
|
||||
|
||||
--echo # Restart with encryption enabled
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
@@ -43,10 +43,10 @@ LOAD INDEX INTO CACHE t1;
|
||||
|
||||
# Restart without encryption. Above table should be unreadable
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
--exec echo "restart:--aria-encrypt-tables=0" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--aria-encrypt-tables=0" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
|
@@ -9,7 +9,7 @@ call mtr.add_suppression("System key id 1 is missing");
|
||||
call mtr.add_suppression("Unknown key id 1");
|
||||
call mtr.add_suppression("Initialization of encryption failed.*");
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
@@ -17,14 +17,14 @@ call mtr.add_suppression("Initialization of encryption failed.*");
|
||||
1;770A8A65DA156D24EE2A093277530142
|
||||
EOF
|
||||
|
||||
--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=Aria;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
@@ -32,7 +32,7 @@ INSERT INTO t1 VALUES (1);
|
||||
2;770A8A65DA156D24EE2A093277530143
|
||||
EOF
|
||||
|
||||
--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
@@ -43,11 +43,11 @@ repair table t1;
|
||||
--error HA_ERR_NO_ENCRYPTION
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--exec echo "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line "restart:--aria-encrypt-tables=1 --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
|
@@ -174,6 +174,105 @@ a
|
||||
10
|
||||
11
|
||||
12
|
||||
*** MDEV-33475: --gtid-ignore-duplicate can double-apply event in case of parallel replication retry
|
||||
connection server_2;
|
||||
STOP SLAVE "c2b";
|
||||
SET default_master_connection = "c2b";
|
||||
include/wait_for_slave_to_stop.inc
|
||||
STOP SLAVE "a2b";
|
||||
SET default_master_connection = "a2b";
|
||||
include/wait_for_slave_to_stop.inc
|
||||
connection server_1;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (0, 0);
|
||||
INSERT INTO t2 VALUES (1, 0);
|
||||
INSERT INTO t2 VALUES (2, 0);
|
||||
INSERT INTO t2 VALUES (3, 0);
|
||||
INSERT INTO t2 VALUES (4, 0);
|
||||
INSERT INTO t2 VALUES (5, 0);
|
||||
INSERT INTO t2 VALUES (6, 0);
|
||||
INSERT INTO t2 VALUES (7, 0);
|
||||
INSERT INTO t2 VALUES (8, 0);
|
||||
INSERT INTO t2 VALUES (9, 0);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (0+10, 100);
|
||||
UPDATE t2 SET b=0 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (0+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (1+10, 100);
|
||||
UPDATE t2 SET b=1 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (1+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (2+10, 100);
|
||||
UPDATE t2 SET b=2 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (2+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (3+10, 100);
|
||||
UPDATE t2 SET b=3 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (3+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (4+10, 100);
|
||||
UPDATE t2 SET b=4 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (4+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (5+10, 100);
|
||||
UPDATE t2 SET b=5 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (5+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (6+10, 100);
|
||||
UPDATE t2 SET b=6 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (6+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (7+10, 100);
|
||||
UPDATE t2 SET b=7 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (7+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (8+10, 100);
|
||||
UPDATE t2 SET b=8 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (8+20, 200);
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
INSERT INTO t2 VALUES (9+10, 100);
|
||||
UPDATE t2 SET b=9 WHERE a<10;
|
||||
INSERT INTO t2 VALUES (9+20, 200);
|
||||
COMMIT;
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
COUNT(*) SUM(a) SUM(b)
|
||||
30 435 3090
|
||||
include/save_master_gtid.inc
|
||||
connection server_2;
|
||||
SET @old_mode= @@GLOBAL.slave_parallel_mode;
|
||||
SET GLOBAL slave_parallel_mode=aggressive;
|
||||
SET default_master_connection = "a2b";
|
||||
START SLAVE;
|
||||
include/wait_for_slave_to_start.inc
|
||||
SET default_master_connection = "c2b";
|
||||
START SLAVE;
|
||||
include/wait_for_slave_to_start.inc
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
COUNT(*) SUM(a) SUM(b)
|
||||
30 435 3090
|
||||
connection server_3;
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
COUNT(*) SUM(a) SUM(b)
|
||||
30 435 3090
|
||||
connection server_4;
|
||||
include/sync_with_master_gtid.inc
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
COUNT(*) SUM(a) SUM(b)
|
||||
30 435 3090
|
||||
*** Test also with not using parallel replication.
|
||||
connection server_1;
|
||||
SET default_master_connection = "b2a";
|
||||
@@ -474,6 +573,7 @@ Warnings:
|
||||
Note 1938 SLAVE 'a2b' stopped
|
||||
Note 1938 SLAVE 'c2b' stopped
|
||||
SET GLOBAL slave_parallel_threads= @old_parallel;
|
||||
SET GLOBAL slave_parallel_mode= @old_mode;
|
||||
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
|
||||
connection server_3;
|
||||
SET GLOBAL gtid_domain_id=0;
|
||||
@@ -491,22 +591,22 @@ Note 1938 SLAVE 'a2d' stopped
|
||||
SET GLOBAL slave_parallel_threads= @old_parallel;
|
||||
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
|
||||
connection server_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
include/reset_master_slave.inc
|
||||
disconnect server_1;
|
||||
connection server_2;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
include/reset_master_slave.inc
|
||||
disconnect server_2;
|
||||
connection server_3;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
include/reset_master_slave.inc
|
||||
disconnect server_3;
|
||||
connection server_4;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
include/reset_master_slave.inc
|
||||
disconnect server_4;
|
||||
|
@@ -173,6 +173,65 @@ SET default_master_connection = "a2b";
|
||||
SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
|
||||
|
||||
|
||||
--echo *** MDEV-33475: --gtid-ignore-duplicate can double-apply event in case of parallel replication retry
|
||||
|
||||
# Create a bunch of transactions that will cause conflicts and retries.
|
||||
# The bug was that the retry code was not handling the --gtid-ignore-duplicates
|
||||
# option, so events could be doubly-applied.
|
||||
|
||||
--connection server_2
|
||||
STOP SLAVE "c2b";
|
||||
SET default_master_connection = "c2b";
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
STOP SLAVE "a2b";
|
||||
SET default_master_connection = "a2b";
|
||||
--source include/wait_for_slave_to_stop.inc
|
||||
|
||||
--connection server_1
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
--let $i= 0
|
||||
while ($i < 10) {
|
||||
eval INSERT INTO t2 VALUES ($i, 0);
|
||||
inc $i;
|
||||
}
|
||||
COMMIT;
|
||||
|
||||
--let $i= 0
|
||||
while ($i < 10) {
|
||||
BEGIN;
|
||||
eval INSERT INTO t2 VALUES ($i+10, 100);
|
||||
eval UPDATE t2 SET b=$i WHERE a<10;
|
||||
eval INSERT INTO t2 VALUES ($i+20, 200);
|
||||
COMMIT;
|
||||
inc $i;
|
||||
}
|
||||
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--connection server_2
|
||||
SET @old_mode= @@GLOBAL.slave_parallel_mode;
|
||||
SET GLOBAL slave_parallel_mode=aggressive;
|
||||
SET default_master_connection = "a2b";
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
SET default_master_connection = "c2b";
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
|
||||
--connection server_3
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
|
||||
--connection server_4
|
||||
--source include/sync_with_master_gtid.inc
|
||||
SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
|
||||
|
||||
|
||||
--echo *** Test also with not using parallel replication.
|
||||
|
||||
--connection server_1
|
||||
@@ -414,6 +473,7 @@ SET GLOBAL gtid_domain_id=0;
|
||||
--sorted_result
|
||||
STOP ALL SLAVES;
|
||||
SET GLOBAL slave_parallel_threads= @old_parallel;
|
||||
SET GLOBAL slave_parallel_mode= @old_mode;
|
||||
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
|
||||
|
||||
--connection server_3
|
||||
@@ -431,25 +491,25 @@ SET GLOBAL slave_parallel_threads= @old_parallel;
|
||||
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
|
||||
|
||||
--connection server_1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
--source include/reset_master_slave.inc
|
||||
--disconnect server_1
|
||||
|
||||
--connection server_2
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
--source include/reset_master_slave.inc
|
||||
--disconnect server_2
|
||||
|
||||
--connection server_3
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
--source include/reset_master_slave.inc
|
||||
--disconnect server_3
|
||||
|
||||
--connection server_4
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1, t2;
|
||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
|
||||
--source include/reset_master_slave.inc
|
||||
--disconnect server_4
|
||||
|
@@ -11,7 +11,7 @@
|
||||
SHOW CREATE TABLE t1;
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--disable_reconnect
|
||||
# CR_SERVER_LOST
|
||||
--error 2013
|
||||
@@ -22,7 +22,7 @@ SELECT * FROM t1;
|
||||
--replace_regex /sql-exchange.*\./sql-exchange./ /sql-shadow-[0-9a-f]*-/sql-shadow-/
|
||||
--cat_file $DATADIR.files.txt
|
||||
--remove_file $DATADIR.files.txt
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--echo # State after crash recovery
|
||||
|
5
mysql-test/suite/parts/r/mdev_21007.result
Normal file
5
mysql-test/suite/parts/r/mdev_21007.result
Normal file
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE t1 (a INT) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (1), PARTITION p1 VALUES LESS THAN (MAXVALUE));
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY;
|
||||
UPDATE t1 PARTITION (p1) SET a=9 ORDER BY a LIMIT 1;
|
||||
DROP TABLE t1;
|
9
mysql-test/suite/parts/t/mdev_21007.test
Normal file
9
mysql-test/suite/parts/t/mdev_21007.test
Normal file
@@ -0,0 +1,9 @@
|
||||
--source include/have_partition.inc
|
||||
|
||||
CREATE TABLE t1 (a INT) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (1), PARTITION p1 VALUES LESS THAN (MAXVALUE));
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY;
|
||||
UPDATE t1 PARTITION (p1) SET a=9 ORDER BY a LIMIT 1;
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
@@ -274,7 +274,6 @@ execute dump_users;
|
||||
execute dump_hosts;
|
||||
|
||||
--disconnect con1
|
||||
--disconnect con5
|
||||
|
||||
--connection default
|
||||
|
||||
@@ -283,6 +282,8 @@ let $wait_condition=
|
||||
select count(*) = 0 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--disconnect con5
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from performance_schema.threads
|
||||
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
|
||||
|
@@ -32,7 +32,7 @@ SET GLOBAL event_scheduler=ON;
|
||||
|
||||
CREATE TABLE table_t(a INT);
|
||||
DELIMITER |;
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
|
||||
BEGIN
|
||||
INSERT INTO table_t VALUES(1);
|
||||
END|
|
||||
|
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -2507,8 +2507,8 @@ execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
localhost 6 6
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -2507,8 +2507,8 @@ execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
localhost 6 6
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -1903,8 +1903,8 @@ execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
localhost 6 6
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -1653,8 +1653,8 @@ user4 2 2
|
||||
execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -1343,8 +1343,8 @@ execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
localhost 6 6
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -1093,8 +1093,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -2257,8 +2257,8 @@ user4 2 2
|
||||
execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -1947,8 +1947,8 @@ execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
localhost 6 6
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -1697,8 +1697,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
execute dump_hosts;
|
||||
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
|
||||
disconnect con1;
|
||||
disconnect con5;
|
||||
connection default;
|
||||
disconnect con5;
|
||||
"================== con1/con5 disconnected =================="
|
||||
"================== Step 10 =================="
|
||||
call dump_thread();
|
||||
|
@@ -94,7 +94,7 @@ test t_60905 NULL 5 5 0 1
|
||||
DROP TABLE t_60905;
|
||||
show global variables like "performance_schema_max_thread_instances";
|
||||
Variable_name Value
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
explain select * from performance_schema.threads;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE threads ALL NULL NULL NULL NULL 256
|
||||
|
@@ -261,7 +261,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -63,7 +63,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
|
||||
performance_schema_max_table_instances 500
|
||||
performance_schema_max_table_lock_stat 500
|
||||
performance_schema_max_thread_classes 50
|
||||
performance_schema_max_thread_instances 200
|
||||
performance_schema_max_thread_instances 400
|
||||
performance_schema_session_connect_attrs_size 2048
|
||||
performance_schema_setup_actors_size 100
|
||||
performance_schema_setup_objects_size 100
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user