72 changed files with 1109 additions and 474 deletions
-
2libmariadb
-
14mysql-test/main/distinct.result
-
13mysql-test/main/distinct.test
-
6mysql-test/main/long_unique_bugs.result
-
7mysql-test/main/long_unique_bugs.test
-
77mysql-test/main/selectivity.result
-
85mysql-test/main/selectivity.test
-
75mysql-test/main/selectivity_innodb.result
-
6mysql-test/main/selectivity_no_engine.result
-
BINmysql-test/std_data/rpl/master-bin-seq_10.3.36.000001
-
50mysql-test/suite/perfschema/r/digest_view.result
-
4mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result
-
85mysql-test/suite/rpl/r/rpl_parallel_seq.result
-
8mysql-test/suite/rpl/t/rpl_binlog_index.test
-
2mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
-
2mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test
-
2mysql-test/suite/rpl/t/rpl_mdev12179.test
-
2mysql-test/suite/rpl/t/rpl_mdev382.test
-
131mysql-test/suite/rpl/t/rpl_parallel_seq.test
-
4mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test
-
2mysql-test/suite/rpl/t/rpl_semi_sync_event.test
-
2mysql-test/suite/rpl/t/rpl_ssl.test
-
4mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test
-
2sql/ha_sequence.cc
-
10sql/item.cc
-
10sql/item.h
-
26sql/item_cmpfunc.cc
-
6sql/item_cmpfunc.h
-
8sql/item_subselect.cc
-
7sql/rpl_parallel.cc
-
35sql/slave.cc
-
3sql/slave.h
-
2sql/sql_insert.cc
-
31sql/sql_lex.cc
-
45sql/sql_lex.h
-
61sql/sql_schema.cc
-
11sql/sql_schema.h
-
3sql/sql_select.cc
-
17sql/sql_sequence.cc
-
44sql/sql_statistics.cc
-
59sql/sql_yacc.yy
-
24sql/structs.h
-
9sql/table.cc
-
2storage/rocksdb/ut0counter.h
-
24zlib/ChangeLog
-
22zlib/LICENSE
-
4zlib/README
-
6zlib/compress.c
-
33zlib/crc32.c
-
218zlib/deflate.c
-
4zlib/deflate.h
-
2zlib/gzlib.c
-
8zlib/gzread.c
-
2zlib/gzwrite.c
-
17zlib/infback.c
-
7zlib/inflate.c
-
4zlib/inftrees.c
-
2zlib/inftrees.h
-
4zlib/make_vms.com
-
10zlib/qnx/package.qpg
-
4zlib/treebuild.xml
-
123zlib/trees.c
-
4zlib/uncompr.c
-
4zlib/win32/README-WIN32.txt
-
2zlib/win32/zlib1.rc
-
19zlib/zconf.h.cmakein
-
19zlib/zconf.h.in
-
4zlib/zlib.3
-
18zlib/zlib.h
-
4zlib/zlib2ansi
-
16zlib/zutil.c
-
1zlib/zutil.h
@ -1 +1 @@ |
|||
Subproject commit 4e2408c1cc298ada91b30683501c0c94a6621562 |
|||
Subproject commit f5a4c73df4fa30a2fd0c5fad65338f455665b334 |
@ -0,0 +1,85 @@ |
|||
include/master-slave.inc |
|||
[connection master] |
|||
connection slave; |
|||
include/stop_slave.inc |
|||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; |
|||
# MDEV-29621 the sequence engine binlog_row_image-full events |
|||
# MDL-deadlock on the parallel slave. |
|||
connection master; |
|||
CREATE SEQUENCE s1; |
|||
SET @@session.binlog_row_image=FULL; |
|||
SET @@session.debug_dbug="+d,binlog_force_commit_id"; |
|||
SET @commit_id=7; |
|||
SET @@gtid_seq_no=100; |
|||
SELECT NEXT VALUE FOR s1; |
|||
NEXT VALUE FOR s1 |
|||
1 |
|||
INSERT INTO s1 VALUES(2, 1, 10, 1, 2, 1, 1, 0); |
|||
SET @@session.debug_dbug=""; |
|||
connection slave; |
|||
SET @@global.slave_parallel_threads=2; |
|||
SET @@global.slave_parallel_mode=optimistic; |
|||
SET @@global.debug_dbug="+d,hold_worker_on_schedule"; |
|||
include/start_slave.inc |
|||
SET DEBUG_SYNC = 'now SIGNAL continue_worker'; |
|||
connection master; |
|||
DROP SEQUENCE s1; |
|||
connection slave; |
|||
include/stop_slave.inc |
|||
# Simulate buggy 10.3.36 master to prove the parallel applier |
|||
# does not deadlock now at replaying the above master load. |
|||
connection master; |
|||
include/rpl_stop_server.inc [server_number=1] |
|||
include/rpl_start_server.inc [server_number=1] |
|||
connection slave; |
|||
RESET MASTER; |
|||
SET @@global.gtid_slave_pos=""; |
|||
CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_use_gtid=slave_pos; |
|||
START SLAVE UNTIL MASTER_GTID_POS='0-1-102'; |
|||
SET DEBUG_SYNC = 'now SIGNAL continue_worker'; |
|||
# Normal stop is expected |
|||
include/wait_for_slave_to_stop.inc |
|||
# MDEV-31077 ALTER SEQUENCE may end up in optimistic parallel slave binlog out-of-order |
|||
# The test proves ALTER-SEQUENCE binlogs first before the following transaction does so. |
|||
connection slave; |
|||
include/stop_slave.inc |
|||
Warnings: |
|||
Note 1255 Slave already has been stopped |
|||
RESET MASTER; |
|||
SET @@global.gtid_slave_pos=""; |
|||
SET @@global.gtid_strict_mode=1; |
|||
connection master; |
|||
RESET MASTER; |
|||
CREATE TABLE ti (a INT) ENGINE=innodb; |
|||
CREATE SEQUENCE s2 ENGINE=innodb; |
|||
SET @@gtid_seq_no=100; |
|||
ALTER SEQUENCE s2 restart with 1; |
|||
INSERT INTO ti SET a=1; |
|||
include/save_master_gtid.inc |
|||
SELECT @@global.gtid_binlog_state "Master gtid state"; |
|||
Master gtid state |
|||
0-1-101 |
|||
connection slave; |
|||
include/start_slave.inc |
|||
SELECT @@global.gtid_binlog_state, @@global.gtid_slave_pos as "no 100,101 yet in both"; |
|||
@@global.gtid_binlog_state no 100,101 yet in both |
|||
0-1-2 0-1-2 |
|||
SET DEBUG_SYNC = 'now SIGNAL continue_worker'; |
|||
# Normal sync with master proves the fixes correct |
|||
include/sync_with_master_gtid.inc |
|||
SELECT @@global.gtid_binlog_state, @@global.gtid_slave_pos as "all through 101 have been committed"; |
|||
@@global.gtid_binlog_state all through 101 have been committed |
|||
0-1-101 0-1-101 |
|||
connection slave; |
|||
include/stop_slave.inc |
|||
SET debug_sync = RESET; |
|||
SET @@global.slave_parallel_threads= 0; |
|||
SET @@global.slave_parallel_mode= conservative; |
|||
SET @@global.debug_dbug = ""; |
|||
SET @@global.gtid_strict_mode=0; |
|||
include/start_slave.inc |
|||
connection master; |
|||
DROP SEQUENCE s2; |
|||
DROP TABLE ti; |
|||
connection slave; |
|||
include/rpl_end.inc |
@ -0,0 +1,131 @@ |
|||
--source include/have_innodb.inc |
|||
--source include/have_debug.inc |
|||
--source include/have_debug_sync.inc |
|||
--source include/have_binlog_format_row.inc |
|||
--source include/master-slave.inc |
|||
|
|||
--connection slave |
|||
--source include/stop_slave.inc |
|||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; |
|||
|
|||
--echo # MDEV-29621 the sequence engine binlog_row_image-full events |
|||
--echo # MDL-deadlock on the parallel slave. |
|||
--connection master |
|||
CREATE SEQUENCE s1; |
|||
SET @@session.binlog_row_image=FULL; |
|||
SET @@session.debug_dbug="+d,binlog_force_commit_id"; |
|||
SET @commit_id=7; |
|||
SET @@gtid_seq_no=100; |
|||
SELECT NEXT VALUE FOR s1; |
|||
INSERT INTO s1 VALUES(2, 1, 10, 1, 2, 1, 1, 0); |
|||
SET @@session.debug_dbug=""; |
|||
|
|||
--connection slave |
|||
--let $slave_parallel_threads=`select @@global.slave_parallel_threads` |
|||
--let $slave_parallel_mode=`select @@global.slave_parallel_mode` |
|||
SET @@global.slave_parallel_threads=2; |
|||
SET @@global.slave_parallel_mode=optimistic; |
|||
SET @@global.debug_dbug="+d,hold_worker_on_schedule"; |
|||
--source include/start_slave.inc |
|||
|
|||
--let $wait_condition= SELECT count(*) = 1 FROM information_schema.processlist WHERE state LIKE "Waiting for prior transaction to start commit before starting%" |
|||
--source include/wait_condition.inc |
|||
SET DEBUG_SYNC = 'now SIGNAL continue_worker'; |
|||
|
|||
--connection master |
|||
DROP SEQUENCE s1; |
|||
--sync_slave_with_master |
|||
--source include/stop_slave.inc |
|||
|
|||
--echo # Simulate buggy 10.3.36 master to prove the parallel applier |
|||
--echo # does not deadlock now at replaying the above master load. |
|||
--connection master |
|||
--let $datadir= `SELECT @@datadir` |
|||
|
|||
--let $rpl_server_number= 1 |
|||
--source include/rpl_stop_server.inc |
|||
|
|||
--remove_file $datadir/master-bin.000001 |
|||
--copy_file $MYSQL_TEST_DIR/std_data/rpl/master-bin-seq_10.3.36.000001 $datadir/master-bin.000001 |
|||
|
|||
--let $rpl_server_number= 1 |
|||
--source include/rpl_start_server.inc |
|||
|
|||
--source include/wait_until_connected_again.inc |
|||
--save_master_pos |
|||
|
|||
--connection slave |
|||
RESET MASTER; |
|||
SET @@global.gtid_slave_pos=""; |
|||
|
|||
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1 |
|||
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_use_gtid=slave_pos; |
|||
|
|||
START SLAVE UNTIL MASTER_GTID_POS='0-1-102'; |
|||
|
|||
--let $wait_condition= SELECT count(*) = 1 FROM information_schema.processlist WHERE state LIKE "Waiting for prior transaction to commit" |
|||
--source include/wait_condition.inc |
|||
SET DEBUG_SYNC = 'now SIGNAL continue_worker'; |
|||
|
|||
--echo # Normal stop is expected |
|||
--source include/wait_for_slave_to_stop.inc |
|||
|
|||
--echo # MDEV-31077 ALTER SEQUENCE may end up in optimistic parallel slave binlog out-of-order |
|||
--echo # The test proves ALTER-SEQUENCE binlogs first before the following transaction does so. |
|||
|
|||
--connection slave |
|||
--source include/stop_slave.inc |
|||
RESET MASTER; |
|||
SET @@global.gtid_slave_pos=""; |
|||
--let $slave_gtid_strict_mode=`select @@global.gtid_strict_mode` |
|||
SET @@global.gtid_strict_mode=1; |
|||
--connection master |
|||
RESET MASTER; |
|||
|
|||
# Load from master |
|||
CREATE TABLE ti (a INT) ENGINE=innodb; |
|||
CREATE SEQUENCE s2 ENGINE=innodb; |
|||
|
|||
SET @@gtid_seq_no=100; |
|||
ALTER SEQUENCE s2 restart with 1; |
|||
INSERT INTO ti SET a=1; |
|||
--source include/save_master_gtid.inc |
|||
SELECT @@global.gtid_binlog_state "Master gtid state"; |
|||
|
|||
--connection slave |
|||
--source include/start_slave.inc |
|||
|
|||
--let $wait_condition= SELECT count(*) = 1 FROM information_schema.processlist WHERE state LIKE "Waiting for prior transaction to commit" |
|||
--source include/wait_condition.inc |
|||
|
|||
SELECT @@global.gtid_binlog_state, @@global.gtid_slave_pos as "no 100,101 yet in both"; |
|||
|
|||
# DEBUG_DBUG extension point of hold_worker_on_schedule is reused |
|||
# (gets deployed) in Sql_cmd_alter_sequence::execute. |
|||
SET DEBUG_SYNC = 'now SIGNAL continue_worker'; |
|||
|
|||
--echo # Normal sync with master proves the fixes correct |
|||
--source include/sync_with_master_gtid.inc |
|||
|
|||
SELECT @@global.gtid_binlog_state, @@global.gtid_slave_pos as "all through 101 have been committed"; |
|||
|
|||
# |
|||
# MDEV-29621/MDEV-31077 clean up. |
|||
# |
|||
--connection slave |
|||
--source include/stop_slave.inc |
|||
|
|||
SET debug_sync = RESET; |
|||
--eval SET @@global.slave_parallel_threads= $slave_parallel_threads |
|||
--eval SET @@global.slave_parallel_mode= $slave_parallel_mode |
|||
SET @@global.debug_dbug = ""; |
|||
--eval SET @@global.gtid_strict_mode=$slave_gtid_strict_mode |
|||
--source include/start_slave.inc |
|||
|
|||
--connection master |
|||
DROP SEQUENCE s2; |
|||
DROP TABLE ti; |
|||
|
|||
--sync_slave_with_master |
|||
|
|||
--source include/rpl_end.inc |
@ -0,0 +1,22 @@ |
|||
Copyright notice: |
|||
|
|||
(C) 1995-2022 Jean-loup Gailly and Mark Adler |
|||
|
|||
This software is provided 'as-is', without any express or implied |
|||
warranty. In no event will the authors be held liable for any damages |
|||
arising from the use of this software. |
|||
|
|||
Permission is granted to anyone to use this software for any purpose, |
|||
including commercial applications, and to alter it and redistribute it |
|||
freely, subject to the following restrictions: |
|||
|
|||
1. The origin of this software must not be misrepresented; you must not |
|||
claim that you wrote the original software. If you use this software |
|||
in a product, an acknowledgment in the product documentation would be |
|||
appreciated but is not required. |
|||
2. Altered source versions must be plainly marked as such, and must not be |
|||
misrepresented as being the original software. |
|||
3. This notice may not be removed or altered from any source distribution. |
|||
|
|||
Jean-loup Gailly Mark Adler |
|||
jloup@gzip.org madler@alumni.caltech.edu |
Write
Preview
Loading…
Cancel
Save
Reference in new issue