mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 11.6 into 11.7
This commit is contained in:
@@ -44,9 +44,11 @@ CREATE TABLE t2(c1 INT);
|
||||
let $prefix= `SELECT UUID()`;
|
||||
--echo # Create a file in the database directory
|
||||
--replace_result $prefix FAKE_FILE
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval SELECT 'hello' INTO OUTFILE 'fake_file.$prefix';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo
|
||||
--echo # 'DROP DATABASE' will fail if there is any other file in the the
|
||||
|
28
mysql-test/suite/binlog/r/binlog_mdev25611.result
Normal file
28
mysql-test/suite/binlog/r/binlog_mdev25611.result
Normal file
@@ -0,0 +1,28 @@
|
||||
*** MDEV-25611: RESET MASTER hangs waiting for InnoDB to flush its log
|
||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
||||
SET GLOBAL debug_dbug="+d,ib_log_checkpoint_avoid";
|
||||
SET @old_flush= @@GLOBAL.innodb_flush_log_at_trx_commit;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit= 0;
|
||||
SET @old_flush_timeout= @@GLOBAL.innoDB_flush_log_at_timeout;
|
||||
SET GLOBAL innoDB_flush_log_at_timeout=2700;
|
||||
connection default;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
INSERT INTO t1 VALUES (2,1);
|
||||
INSERT INTO t1 VALUES (3,1);
|
||||
connect stop_purge,localhost,root,,;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
connection default;
|
||||
INSERT INTO t1 VALUES (4,2);
|
||||
DELETE FROM t1 WHERE a in (1,2,3);
|
||||
FLUSH BINARY LOGS;
|
||||
connection stop_purge;
|
||||
ROLLBACK;
|
||||
connection default;
|
||||
disconnect stop_purge;
|
||||
RESET MASTER;
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL debug_dbug= @old_dbug;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit= @old_flush;
|
||||
SET GLOBAL innoDB_flush_log_at_timeout= @old_flush_timeout;
|
@@ -0,0 +1,23 @@
|
||||
|
||||
# MDEV-27037 mysqlbinlog emits a warning when reaching EOF before stop-datetime
|
||||
|
||||
set timestamp=1000000000;
|
||||
CREATE TABLE t1(word VARCHAR(20));
|
||||
set timestamp=1000000010;
|
||||
INSERT INTO t1 VALUES ("abirvalg");
|
||||
set timestamp=1000000020;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
flush logs;
|
||||
Case: Default, must not see warning.
|
||||
# MYSQL_BINLOG --short-form MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
Case: Stop datetime before EOF, must not see warning.
|
||||
# MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:50' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
Case: Stop datetime between records, must not see warning.
|
||||
# MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:55' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
Case: Stop datetime at EOF, must not see warning.
|
||||
# MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:55' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
Case: Stop datetime after EOF, must see warning.
|
||||
# MYSQL_BINLOG --short-form --stop-datetime='2035-01-19 03:14:05' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
WARNING: Did not reach stop datetime '2035-01-19 03:14:05' before end of input
|
||||
DROP TABLE t1;
|
||||
# End of binlog_mysqlbinlog_warn_stop_datetime.test
|
@@ -15,6 +15,7 @@ connect(con3,localhost,root,,test);
|
||||
|
||||
# Get Initial status measurements
|
||||
--connection default
|
||||
--disable_cursor_protocol
|
||||
SELECT variable_value INTO @group_commits FROM information_schema.global_status
|
||||
WHERE variable_name = 'binlog_group_commits';
|
||||
SELECT variable_value INTO @group_commit_trigger_count FROM information_schema.global_status
|
||||
@@ -23,6 +24,7 @@ SELECT variable_value INTO @group_commit_trigger_timeout FROM information_schema
|
||||
WHERE variable_name = 'binlog_group_commit_trigger_timeout';
|
||||
SELECT variable_value INTO @group_commit_trigger_lock_wait FROM information_schema.global_status
|
||||
WHERE variable_name = 'binlog_group_commit_trigger_lock_wait';
|
||||
--enable_cursor_protocol
|
||||
|
||||
# Note: binlog_group_commits is counted at the start of the group and group_commit_trigger_* is
|
||||
# counted near when the groups its finalised.
|
||||
|
55
mysql-test/suite/binlog/t/binlog_mdev25611.test
Normal file
55
mysql-test/suite/binlog/t/binlog_mdev25611.test
Normal file
@@ -0,0 +1,55 @@
|
||||
source include/have_innodb.inc;
|
||||
source include/have_debug.inc;
|
||||
source include/have_log_bin.inc;
|
||||
source include/have_binlog_format_mixed.inc;
|
||||
|
||||
--echo *** MDEV-25611: RESET MASTER hangs waiting for InnoDB to flush its log
|
||||
# Error injection to minimize extra log flushing inside innodb.
|
||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
||||
SET GLOBAL debug_dbug="+d,ib_log_checkpoint_avoid";
|
||||
# Couple other settings that reduce redo log flushing, thus potentially
|
||||
# triggering the hang.
|
||||
SET @old_flush= @@GLOBAL.innodb_flush_log_at_trx_commit;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit= 0;
|
||||
SET @old_flush_timeout= @@GLOBAL.innoDB_flush_log_at_timeout;
|
||||
SET GLOBAL innoDB_flush_log_at_timeout=2700;
|
||||
|
||||
--connection default
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
INSERT INTO t1 VALUES (2,1);
|
||||
INSERT INTO t1 VALUES (3,1);
|
||||
|
||||
connect (stop_purge,localhost,root,,);
|
||||
# This blocks purge due to old data being still visible.
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
|
||||
--connection default
|
||||
INSERT INTO t1 VALUES (4,2);
|
||||
DELETE FROM t1 WHERE a in (1,2,3);
|
||||
|
||||
# Rotate the binlog and wait for everything to settle down and latest binlog
|
||||
# checkpoint to be done. The small sleep helps trigger the bug more reliably
|
||||
# before the fix.
|
||||
FLUSH BINARY LOGS;
|
||||
--sleep 0.1
|
||||
|
||||
# Now unblock the purge, and wait for some purge records to be written
|
||||
# to the redo log so the LSN is incremented but will not be synced to
|
||||
# disk until something else happens.
|
||||
--connection stop_purge
|
||||
ROLLBACK;
|
||||
--connection default
|
||||
--disconnect stop_purge
|
||||
|
||||
--sleep 0.1
|
||||
|
||||
# Now see if RESET MASTER will request and wait for a binlog checkpoint that is never reported.
|
||||
RESET MASTER;
|
||||
|
||||
# Clean up.
|
||||
--connection default
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL debug_dbug= @old_dbug;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit= @old_flush;
|
||||
SET GLOBAL innoDB_flush_log_at_timeout= @old_flush_timeout;
|
@@ -7,7 +7,9 @@ CREATE TABLE t (a TEXT);
|
||||
# events of interest are guaranteed to stay in 000001 log
|
||||
RESET MASTER;
|
||||
--eval INSERT INTO t SET a=repeat('a', 1024)
|
||||
--disable_cursor_protocol
|
||||
SELECT a into @a from t;
|
||||
--enable_cursor_protocol
|
||||
FLUSH LOGS;
|
||||
DELETE FROM t;
|
||||
|
||||
|
@@ -0,0 +1,42 @@
|
||||
--echo
|
||||
--echo # MDEV-27037 mysqlbinlog emits a warning when reaching EOF before stop-datetime
|
||||
--echo
|
||||
|
||||
--source include/have_binlog_format_statement.inc
|
||||
|
||||
--let ignored_output_file= $MYSQLTEST_VARDIR/tmp/warn_pos_test_file.out
|
||||
|
||||
set timestamp=1000000000;
|
||||
CREATE TABLE t1(word VARCHAR(20));
|
||||
set timestamp=1000000010;
|
||||
INSERT INTO t1 VALUES ("abirvalg");
|
||||
set timestamp=1000000020;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
--let MYSQLD_DATADIR= `select @@datadir;`
|
||||
flush logs;
|
||||
|
||||
--echo Case: Default, must not see warning.
|
||||
--echo # MYSQL_BINLOG --short-form MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001 --result-file=$ignored_output_file 2>&1
|
||||
|
||||
--echo Case: Stop datetime before EOF, must not see warning.
|
||||
--echo # MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:50' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
--exec $MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:50' $MYSQLD_DATADIR/master-bin.000001 --result-file=$ignored_output_file 2>&1
|
||||
|
||||
--echo Case: Stop datetime between records, must not see warning.
|
||||
--echo # MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:55' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
--exec $MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:55' $MYSQLD_DATADIR/master-bin.000001 --result-file=$ignored_output_file 2>&1
|
||||
|
||||
--echo Case: Stop datetime at EOF, must not see warning.
|
||||
--echo # MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:55' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
--exec $MYSQL_BINLOG --short-form --stop-datetime='2001-09-08 21:46:55' $MYSQLD_DATADIR/master-bin.000001 --result-file=$ignored_output_file 2>&1
|
||||
|
||||
--echo Case: Stop datetime after EOF, must see warning.
|
||||
--echo # MYSQL_BINLOG --short-form --stop-datetime='2035-01-19 03:14:05' MYSQLD_DATADIR/master-bin.000001 --result-file=ignored_output_file
|
||||
--exec $MYSQL_BINLOG --short-form --stop-datetime='2035-01-19 03:14:05' $MYSQLD_DATADIR/master-bin.000001 --result-file=$ignored_output_file 2>&1
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--remove_file $ignored_output_file
|
||||
|
||||
--echo # End of binlog_mysqlbinlog_warn_stop_datetime.test
|
Reference in New Issue
Block a user