38 changed files with 637 additions and 22 deletions
-
3client/mysqlcheck.c
-
3client/mysqlslap.c
-
1client/mysqltest.cc
-
4include/sslopt-longopts.h
-
25mysql-test/main/ctype_tis620.result
-
31mysql-test/main/ctype_tis620.test
-
17mysql-test/suite/galera/r/MDEV-25389.result
-
40mysql-test/suite/galera/r/MDEV-29512.result
-
6mysql-test/suite/galera/r/galera_var_dirty_reads.result
-
24mysql-test/suite/galera/t/MDEV-25389.test
-
15mysql-test/suite/galera/t/MDEV-29512.cnf
-
91mysql-test/suite/galera/t/MDEV-29512.test
-
6mysql-test/suite/galera/t/galera_var_dirty_reads.test
-
3mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result
-
7mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test
-
1mysql-test/suite/galera_3nodes_sr/disabled.def
-
11mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
-
66mysql-test/suite/innodb/r/innodb_ctype_tis620.result
-
62mysql-test/suite/innodb/t/innodb_ctype_tis620.test
-
47mysql-test/suite/parts/r/part_ctype_tis620.result
-
52mysql-test/suite/parts/t/part_ctype_tis620.test
-
11mysql-test/suite/period/r/create.result
-
24mysql-test/suite/period/r/delete.result
-
14mysql-test/suite/period/t/create.test
-
28mysql-test/suite/period/t/delete.test
-
2sql/handler.cc
-
6sql/slave.cc
-
2sql/sql_const.h
-
4sql/sql_delete.cc
-
4sql/sql_parse.cc
-
1sql/table.cc
-
16sql/wsrep_mysqld.cc
-
1sql/wsrep_mysqld.h
-
3sql/wsrep_thd.cc
-
9sql/wsrep_var.cc
-
16strings/ctype-tis620.c
-
1unittest/strings/strings-t.c
-
2wsrep-lib
@ -0,0 +1,17 @@ |
|||
connection node_2; |
|||
connection node_1; |
|||
connection node_1; |
|||
connection node_2; |
|||
connection node_2; |
|||
call mtr.add_suppression("WSREP: Failed to create/initialize system thread"); |
|||
SET GLOBAL debug_dbug='+d,wsrep_simulate_failed_connection_1'; |
|||
SET GLOBAL wsrep_slave_threads=2; |
|||
ERROR HY000: Incorrect arguments to SET |
|||
SELECT @@wsrep_slave_threads; |
|||
@@wsrep_slave_threads |
|||
1 |
|||
SET GLOBAL debug_dbug=''; |
|||
SET GLOBAL wsrep_slave_threads=1; |
|||
SELECT @@wsrep_slave_threads; |
|||
@@wsrep_slave_threads |
|||
1 |
|||
@ -0,0 +1,40 @@ |
|||
connection node_2; |
|||
connection node_1; |
|||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 varchar(2000)); |
|||
INSERT INTO t1 VALUES (1, 0, REPEAT('1234567890', 200)); |
|||
INSERT INTO t1 VALUES (3, 3, REPEAT('1234567890', 200)); |
|||
SET SESSION wsrep_sync_wait=0; |
|||
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; |
|||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
|||
connection node_1a; |
|||
SET SESSION wsrep_sync_wait=0; |
|||
connection node_1; |
|||
begin; |
|||
select f1,f2 from t1; |
|||
f1 f2 |
|||
1 0 |
|||
3 3 |
|||
connection node_2; |
|||
UPDATE t1 SET f2=2 WHERE f1=3; |
|||
connection node_1a; |
|||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; |
|||
connection node_1; |
|||
UPDATE t1 SET f2=1 WHERE f1=3; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync'; |
|||
COMMIT; |
|||
connection node_1a; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync'; |
|||
SET GLOBAL DEBUG_DBUG = ""; |
|||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; |
|||
SET GLOBAL debug_dbug = NULL; |
|||
SET debug_sync='RESET'; |
|||
connection node_1; |
|||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
|||
select f1,f2 from t1; |
|||
f1 f2 |
|||
1 0 |
|||
3 2 |
|||
DROP TABLE t1; |
|||
@ -0,0 +1,24 @@ |
|||
--source include/galera_cluster.inc |
|||
--source include/have_debug.inc |
|||
--source include/have_debug_sync.inc |
|||
|
|||
--let $node_1=node_1 |
|||
--let $node_2=node_2 |
|||
--source ../galera/include/auto_increment_offset_save.inc |
|||
|
|||
--connection node_2 |
|||
call mtr.add_suppression("WSREP: Failed to create/initialize system thread"); |
|||
SET GLOBAL debug_dbug='+d,wsrep_simulate_failed_connection_1'; |
|||
--error ER_WRONG_ARGUMENTS |
|||
SET GLOBAL wsrep_slave_threads=2; |
|||
SELECT @@wsrep_slave_threads; |
|||
SET GLOBAL debug_dbug=''; |
|||
SET GLOBAL wsrep_slave_threads=1; |
|||
SELECT @@wsrep_slave_threads; |
|||
|
|||
# MDEV-29878: this test caused a subsequent test to fail |
|||
# during shutdown. Do a restart here, to make sure the |
|||
# issue is fixed. |
|||
--source include/restart_mysqld.inc |
|||
|
|||
--source ../galera/include/auto_increment_offset_restore.inc |
|||
@ -0,0 +1,15 @@ |
|||
!include ../galera_2nodes.cnf |
|||
|
|||
[mysqld] |
|||
log-bin |
|||
log-slave-updates |
|||
|
|||
[mysqld.1] |
|||
log_bin |
|||
log_slave_updates |
|||
max-binlog-size=4096 |
|||
expire-logs-days=1 |
|||
|
|||
|
|||
[mysqld.2] |
|||
|
|||
@ -0,0 +1,91 @@ |
|||
# |
|||
# This test is for reproducing the issue in: |
|||
# https://jira.mariadb.org/browse/MDEV-29512 |
|||
# |
|||
# The hanging in MDEV-29512 happens when binlog purging is attempted, and there is |
|||
# one local BF aborted transaction waiting for commit monitor. |
|||
# |
|||
# The test will launch two node cluster and enable binlogging with expire log days, |
|||
# to force binlog purging to happen. |
|||
# A local transaction is executed so that will become BF abort victim, and has advanced |
|||
# to replication stage waiting for commit monitor for final cleanup (to mark position in innodb) |
|||
# after that, applier is released to complete the BF abort and due to binlog configuration, |
|||
# starting the binlog purging. This is where the hanging would occur, if code is buggy |
|||
# |
|||
--source include/galera_cluster.inc |
|||
--source include/have_innodb.inc |
|||
--source include/have_debug_sync.inc |
|||
--source include/galera_have_debug_sync.inc |
|||
|
|||
# |
|||
# binlog size is limited to 4096 bytes, we will create enough events to |
|||
# cause binlog rotation |
|||
# |
|||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 varchar(2000)); |
|||
INSERT INTO t1 VALUES (1, 0, REPEAT('1234567890', 200)); |
|||
INSERT INTO t1 VALUES (3, 3, REPEAT('1234567890', 200)); |
|||
|
|||
SET SESSION wsrep_sync_wait=0; |
|||
|
|||
# set sync point for replication applier |
|||
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; |
|||
|
|||
# Control connection to manage sync points for appliers |
|||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 |
|||
--connection node_1a |
|||
SET SESSION wsrep_sync_wait=0; |
|||
|
|||
# starting local transaction, only select so far, |
|||
# write will happen later and this will be ordered after the transaction in node_2 |
|||
--connection node_1 |
|||
begin; |
|||
select f1,f2 from t1; |
|||
|
|||
# send from node 2 an UPDATE transaction, which will BF abort the transaction in node_1 |
|||
--connection node_2 |
|||
--let $wait_condition=select count(*)=2 from t1 |
|||
--source include/wait_condition.inc |
|||
|
|||
UPDATE t1 SET f2=2 WHERE f1=3; |
|||
|
|||
--connection node_1a |
|||
# wait to see the UPDATE from node_2 in apply_cb sync point |
|||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; |
|||
|
|||
--connection node_1 |
|||
# now issuing conflicting update |
|||
UPDATE t1 SET f2=1 WHERE f1=3; |
|||
|
|||
# Block the local commit, send final COMMIT and wait until it gets blocked |
|||
--let $galera_sync_point = commit_monitor_master_enter_sync |
|||
--source include/galera_set_sync_point.inc |
|||
--send COMMIT |
|||
|
|||
--connection node_1a |
|||
# wait for the local commit to enter in commit monitor wait state |
|||
--let $galera_sync_point = commit_monitor_master_enter_sync |
|||
--source include/galera_wait_sync_point.inc |
|||
--source include/galera_clear_sync_point.inc |
|||
|
|||
# release the local transaction to continue with commit |
|||
--let $galera_sync_point = commit_monitor_master_enter_sync |
|||
--source include/galera_signal_sync_point.inc |
|||
|
|||
# and now release the applier, it should force local trx to abort |
|||
SET GLOBAL DEBUG_DBUG = ""; |
|||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; |
|||
SET GLOBAL debug_dbug = NULL; |
|||
SET debug_sync='RESET'; |
|||
|
|||
--connection node_1 |
|||
--error ER_LOCK_DEADLOCK |
|||
--reap |
|||
|
|||
# wait until applying is complete |
|||
--let $wait_condition = SELECT COUNT(*)=1 FROM t1 WHERE f2=2 |
|||
--source include/wait_condition.inc |
|||
|
|||
# final read to verify what we got |
|||
select f1,f2 from t1; |
|||
|
|||
DROP TABLE t1; |
|||
@ -1,4 +1,3 @@ |
|||
GCF-336 : |
|||
GCF-582 : |
|||
GCF-810A : |
|||
GCF-810B : |
|||
|
|||
@ -0,0 +1,47 @@ |
|||
# |
|||
# MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit |
|||
# |
|||
CREATE TABLE t1 ( |
|||
a CHAR |
|||
) COLLATE=tis620_thai_nopad_ci |
|||
PARTITION BY RANGE COLUMNS (a) |
|||
( |
|||
PARTITION p0 VALUES LESS THAN (''), |
|||
PARTITION p VALUES LESS THAN ('') |
|||
); |
|||
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition |
|||
CREATE TABLE t1 ( |
|||
a CHAR |
|||
) COLLATE=tis620_thai_nopad_ci |
|||
PARTITION BY RANGE COLUMNS (a) |
|||
( |
|||
PARTITION p0 VALUES LESS THAN (''), |
|||
PARTITION p VALUES LESS THAN (' ') |
|||
); |
|||
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition |
|||
CREATE TABLE t1 ( |
|||
a CHAR |
|||
) COLLATE=tis620_thai_nopad_ci |
|||
PARTITION BY RANGE COLUMNS (a) |
|||
( |
|||
PARTITION p0 VALUES LESS THAN (' '), |
|||
PARTITION p VALUES LESS THAN ('') |
|||
); |
|||
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition |
|||
CREATE TABLE t1 |
|||
( |
|||
id INT NOT NULL, |
|||
data VARCHAR(2), |
|||
KEY data_id (data(1),id) |
|||
) COLLATE tis620_thai_nopad_ci ENGINE=MyISAM |
|||
PARTITION BY RANGE (id) |
|||
( |
|||
PARTITION p10 VALUES LESS THAN (10), |
|||
PARTITION p20 VALUES LESS THAN (20) |
|||
); |
|||
INSERT INTO t1 VALUES (4, 'ab'), (14, 'ab'), (19,''),(9,'') ; |
|||
SELECT id FROM t1 WHERE data='' ORDER BY id; |
|||
id |
|||
9 |
|||
19 |
|||
DROP TABLE t1; |
|||
@ -0,0 +1,52 @@ |
|||
--source include/have_partition.inc |
|||
--source include/have_tis620.inc |
|||
|
|||
--echo # |
|||
--echo # MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit |
|||
--echo # |
|||
|
|||
--error ER_RANGE_NOT_INCREASING_ERROR |
|||
CREATE TABLE t1 ( |
|||
a CHAR |
|||
) COLLATE=tis620_thai_nopad_ci |
|||
PARTITION BY RANGE COLUMNS (a) |
|||
( |
|||
PARTITION p0 VALUES LESS THAN (''), |
|||
PARTITION p VALUES LESS THAN ('') |
|||
); |
|||
|
|||
--error ER_RANGE_NOT_INCREASING_ERROR |
|||
CREATE TABLE t1 ( |
|||
a CHAR |
|||
) COLLATE=tis620_thai_nopad_ci |
|||
PARTITION BY RANGE COLUMNS (a) |
|||
( |
|||
PARTITION p0 VALUES LESS THAN (''), |
|||
PARTITION p VALUES LESS THAN (' ') |
|||
); |
|||
|
|||
--error ER_RANGE_NOT_INCREASING_ERROR |
|||
CREATE TABLE t1 ( |
|||
a CHAR |
|||
) COLLATE=tis620_thai_nopad_ci |
|||
PARTITION BY RANGE COLUMNS (a) |
|||
( |
|||
PARTITION p0 VALUES LESS THAN (' '), |
|||
PARTITION p VALUES LESS THAN ('') |
|||
); |
|||
|
|||
|
|||
CREATE TABLE t1 |
|||
( |
|||
id INT NOT NULL, |
|||
data VARCHAR(2), |
|||
KEY data_id (data(1),id) |
|||
) COLLATE tis620_thai_nopad_ci ENGINE=MyISAM |
|||
PARTITION BY RANGE (id) |
|||
( |
|||
PARTITION p10 VALUES LESS THAN (10), |
|||
PARTITION p20 VALUES LESS THAN (20) |
|||
); |
|||
INSERT INTO t1 VALUES (4, 'ab'), (14, 'ab'), (19,''),(9,'') ; |
|||
SELECT id FROM t1 WHERE data='' ORDER BY id; |
|||
DROP TABLE t1; |
|||
@ -1 +1 @@ |
|||
Subproject commit 8bfce04189671eb1f06e0fa83dff8c880f31088f |
|||
Subproject commit f8ff2cfdd4c6424ffd96fc53bcc0f2e1d9ffe137 |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue