mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch 10.5 into 10.6
This commit is contained in:
@@ -27,4 +27,4 @@ wsrep_last_written_gtid()
|
||||
connection node_1;
|
||||
drop table t1;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -49,4 +49,4 @@ mysqld-bin.000003 # Query # # COMMIT
|
||||
BINLOG_POSITIONS_MATCH
|
||||
1
|
||||
DROP TABLE t1,ts1;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -5,7 +5,7 @@ select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode;
|
||||
@@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode
|
||||
0 11 1 1
|
||||
connection node_2;
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode;
|
||||
@@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode
|
||||
0 12 1 1
|
||||
|
@@ -42,4 +42,4 @@ SET GLOBAL wsrep_on=ON;
|
||||
connection node_3;
|
||||
reset master;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -167,4 +167,4 @@ set global wsrep_on=ON;
|
||||
connection node_3;
|
||||
reset master;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -42,4 +42,4 @@ SELECT @@gtid_binlog_state;
|
||||
@@gtid_binlog_state
|
||||
1-1-101
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -34,4 +34,4 @@ wsrep_last_written_id_advanced
|
||||
SET AUTOCOMMIT=ON;
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -3,9 +3,9 @@ connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
|
||||
connection node_2;
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
connection node_4;
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
connection node_3;
|
||||
CHANGE MASTER TO master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos;;
|
||||
START SLAVE;
|
||||
|
@@ -24,4 +24,4 @@ WSREP_SYNC_WAIT_UPTO
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -90,7 +90,7 @@ set global wsrep_on=OFF;
|
||||
reset master;
|
||||
set global wsrep_on=ON;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
# End of test
|
||||
|
@@ -90,7 +90,7 @@ set global wsrep_on=OFF;
|
||||
reset master;
|
||||
set global wsrep_on=ON;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
# End of test
|
||||
|
@@ -19,4 +19,4 @@ select wsrep_last_written_gtid();
|
||||
drop table t1;
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -48,4 +48,4 @@ CREATE TABLE ts1 AS SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1,ts1;
|
||||
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -1,5 +1,7 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/galera_have_debug_sync.inc
|
||||
|
||||
#
|
||||
|
@@ -3,7 +3,7 @@
|
||||
--connection node_1
|
||||
select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode;
|
||||
--connection node_2
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode;
|
||||
|
||||
--connection node_1
|
||||
|
@@ -92,4 +92,4 @@ SET GLOBAL wsrep_on=ON;
|
||||
reset master;
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -199,4 +199,4 @@ set global wsrep_on=ON;
|
||||
reset master;
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -53,4 +53,4 @@ SELECT @@gtid_binlog_state;
|
||||
SELECT @@gtid_binlog_state;
|
||||
DROP TABLE t1;
|
||||
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -66,4 +66,4 @@ SET AUTOCOMMIT=ON;
|
||||
DROP TABLE t1;
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -22,9 +22,9 @@
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
|
||||
--connection node_2
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
--connection node_4
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
|
||||
--connection node_3
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
@@ -72,4 +73,4 @@ INSERT INTO t1 VALUES (2);
|
||||
DROP TABLE t1;
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -60,7 +60,7 @@ reset master;
|
||||
set global wsrep_on=ON;
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
||||
|
@@ -60,7 +60,7 @@ reset master;
|
||||
set global wsrep_on=ON;
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
||||
|
@@ -56,7 +56,7 @@ connection node_1;
|
||||
set global wsrep_gtid_domain_id=100;
|
||||
connection node_2;
|
||||
set global wsrep_gtid_domain_id=100;
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
connection node_3;
|
||||
set global wsrep_gtid_domain_id=100;
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -75,19 +75,19 @@ connection node_2;
|
||||
SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
connection node_3;
|
||||
SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
connection node_5;
|
||||
SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
connection node_6;
|
||||
SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -199,12 +199,12 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1950
|
||||
connection node_2;
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
call mtr.add_suppression("Sending JOIN failed: ");
|
||||
call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST");
|
||||
call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration");
|
||||
connection node_3;
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
call mtr.add_suppression("Sending JOIN failed: ");
|
||||
call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST");
|
||||
call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration");
|
||||
|
@@ -119,8 +119,8 @@ set global wsrep_gtid_domain_id=100;
|
||||
|
||||
--connection node_2
|
||||
set global wsrep_gtid_domain_id=100;
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
|
||||
--connection node_3
|
||||
set global wsrep_gtid_domain_id=100;
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
CALL mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -129,7 +129,7 @@ SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
||||
--connection node_3
|
||||
|
||||
@@ -137,7 +137,7 @@ SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
||||
--connection node_5
|
||||
|
||||
@@ -145,7 +145,7 @@ SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
||||
--connection node_6
|
||||
|
||||
@@ -153,4 +153,4 @@ SET GLOBAL wsrep_on = OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on = ON;
|
||||
|
||||
CALL mtr.add_suppression("Ignoring server id for non bootstrap node");
|
||||
CALL mtr.add_suppression("Ignoring server id .* for non bootstrap node");
|
||||
|
@@ -343,12 +343,12 @@ SELECT COUNT(*) FROM t1;
|
||||
# cleanups
|
||||
#
|
||||
--connection node_2
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
call mtr.add_suppression("Sending JOIN failed: ");
|
||||
call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST");
|
||||
call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration");
|
||||
--connection node_3
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
call mtr.add_suppression("Sending JOIN failed: ");
|
||||
call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST");
|
||||
call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration");
|
||||
|
@@ -5,7 +5,7 @@ connection node_1;
|
||||
CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
connection node_2;
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
|
@@ -13,7 +13,7 @@ CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
|
||||
--connection node_2
|
||||
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\.");
|
||||
call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
|
||||
SELECT * FROM t1;
|
||||
|
||||
--connection node_1
|
||||
|
16
mysql-test/suite/innodb/r/innodb-replace,INPLACE.rdiff
Normal file
16
mysql-test/suite/innodb/r/innodb-replace,INPLACE.rdiff
Normal file
@@ -0,0 +1,16 @@
|
||||
--- innodb-replace.result
|
||||
+++ innodb-replace,INPLACE.result
|
||||
@@ -31,10 +31,10 @@
|
||||
REPLACE INTO t1 (c1,c2,c3) VALUES (0,1,b'11');
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN ('HANDLER_DELETE','HANDLER_WRITE','HANDLER_READ_KEY','HANDLER_UPDATE');
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
-HANDLER_DELETE 1
|
||||
+HANDLER_DELETE 2
|
||||
HANDLER_READ_KEY 2
|
||||
-HANDLER_UPDATE 1
|
||||
-HANDLER_WRITE 2
|
||||
+HANDLER_UPDATE 0
|
||||
+HANDLER_WRITE 3
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3
|
||||
0 1
|
@@ -11,3 +11,53 @@ ERROR HY000: DELAYED option not supported for table 't1'
|
||||
select * from t1;
|
||||
c1 c2 stamp
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-35115 Inconsistent Replace behaviour when multiple
|
||||
# unique index exist
|
||||
#
|
||||
CREATE TABLE t1 (c1 NUMERIC UNSIGNED NOT NULL,
|
||||
c2 INT3 UNIQUE,
|
||||
c3 BIT(2) PRIMARY KEY)ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ADD UNIQUE INDEX(c1);
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES (0,0,b'01');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES (1,1,b'10');
|
||||
FLUSH STATUS;
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN ('HANDLER_DELETE','HANDLER_WRITE','HANDLER_READ_KEY','HANDLER_UPDATE');
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
HANDLER_DELETE 0
|
||||
HANDLER_READ_KEY 0
|
||||
HANDLER_UPDATE 0
|
||||
HANDLER_WRITE 0
|
||||
REPLACE INTO t1 (c1,c2,c3) VALUES (0,1,b'11');
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN ('HANDLER_DELETE','HANDLER_WRITE','HANDLER_READ_KEY','HANDLER_UPDATE');
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
HANDLER_DELETE 1
|
||||
HANDLER_READ_KEY 2
|
||||
HANDLER_UPDATE 1
|
||||
HANDLER_WRITE 2
|
||||
SELECT * FROM t1;
|
||||
c1 c2 c3
|
||||
0 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 INT NOT NULL PRIMARY KEY,
|
||||
f2 INT, f3 INT, f4 INT,
|
||||
UNIQUE INDEX i1(f2))ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ADD INDEX i3(f4);
|
||||
ALTER TABLE t1 ADD UNIQUE INDEX i2(f3);
|
||||
INSERT INTO t1 VALUES (0,0,0,0);
|
||||
INSERT INTO t1 VALUES (1,1,1,1);
|
||||
FLUSH STATUS;
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN ('HANDLER_DELETE','HANDLER_WRITE','HANDLER_READ_KEY','HANDLER_UPDATE');
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
HANDLER_DELETE 0
|
||||
HANDLER_READ_KEY 0
|
||||
HANDLER_UPDATE 0
|
||||
HANDLER_WRITE 0
|
||||
REPLACE INTO t1 VALUES (0,0,1,1);
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN ('HANDLER_DELETE','HANDLER_WRITE','HANDLER_READ_KEY','HANDLER_UPDATE');
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
HANDLER_DELETE 1
|
||||
HANDLER_READ_KEY 2
|
||||
HANDLER_UPDATE 1
|
||||
HANDLER_WRITE 2
|
||||
DROP TABLE t1;
|
||||
|
@@ -14,6 +14,22 @@ drop table t1;
|
||||
rename table mysql.table_stats_save to mysql.table_stats;
|
||||
flush tables;
|
||||
#
|
||||
# MDEV-32667 dict_stats_save_index_stat() reads uninitialized
|
||||
# index->stats_error_printed
|
||||
#
|
||||
call mtr.add_suppression("InnoDB: Cannot save index statistics for table");
|
||||
CREATE TABLE t1(a INT) ENGINE=InnoDB STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
|
||||
BEGIN;
|
||||
SELECT COUNT(*)>=0 FROM mysql.innodb_index_stats LOCK IN SHARE MODE;
|
||||
COUNT(*)>=0
|
||||
1
|
||||
INSERT INTO t1 VALUES(0),(0);
|
||||
SELECT sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-26753 Assertion state == TRX_STATE_PREPARED ||... failed
|
||||
#
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
2
mysql-test/suite/innodb/t/innodb-replace.combinations
Normal file
2
mysql-test/suite/innodb/t/innodb-replace.combinations
Normal file
@@ -0,0 +1,2 @@
|
||||
[COPY]
|
||||
[INPLACE]
|
@@ -20,3 +20,67 @@ select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35115 Inconsistent Replace behaviour when multiple
|
||||
--echo # unique index exist
|
||||
--echo #
|
||||
let $get_handler_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN ('HANDLER_DELETE','HANDLER_WRITE','HANDLER_READ_KEY','HANDLER_UPDATE');
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
let $algorithm=`select regexp_replace('$MTR_COMBINATIONS', 'innodb,\|,innodb', '')`;
|
||||
|
||||
CREATE TABLE t1 (c1 NUMERIC UNSIGNED NOT NULL,
|
||||
c2 INT3 UNIQUE,
|
||||
c3 BIT(2) PRIMARY KEY)ENGINE=InnoDB;
|
||||
|
||||
replace_result ,ALGORITHM=COPY '' ,ALGORITHM=INPLACE '';
|
||||
eval ALTER TABLE t1 ADD UNIQUE INDEX(c1),ALGORITHM=$algorithm;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES (0,0,b'01');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES (1,1,b'10');
|
||||
|
||||
FLUSH STATUS;
|
||||
|
||||
--disable_ps2_protocol
|
||||
eval $get_handler_status_counts;
|
||||
--enable_ps2_protocol
|
||||
|
||||
# INPLACE algorithm appends the index, so unique index
|
||||
# reordering happened between innodb and .frm file. This
|
||||
# lead to deletion of 2 existing rows for the replace statement
|
||||
|
||||
# COPY algorithm does table rebuild everytime. No reordering
|
||||
# happened in this case. This lead to 1 deletion of record
|
||||
# and 1 update on the existing record
|
||||
REPLACE INTO t1 (c1,c2,c3) VALUES (0,1,b'11');
|
||||
|
||||
--disable_ps2_protocol
|
||||
eval $get_handler_status_counts;
|
||||
--enable_ps2_protocol
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (f1 INT NOT NULL PRIMARY KEY,
|
||||
f2 INT, f3 INT, f4 INT,
|
||||
UNIQUE INDEX i1(f2))ENGINE=InnoDB;
|
||||
replace_result ,ALGORITHM=COPY '' ,ALGORITHM=INPLACE '';
|
||||
eval ALTER TABLE t1 ADD INDEX i3(f4),ALGORITHM=$algorithm;
|
||||
|
||||
replace_result ,ALGORITHM=COPY '' ,ALGORITHM=INPLACE '';
|
||||
eval ALTER TABLE t1 ADD UNIQUE INDEX i2(f3),ALGORITHM=$algorithm;
|
||||
|
||||
INSERT INTO t1 VALUES (0,0,0,0);
|
||||
INSERT INTO t1 VALUES (1,1,1,1);
|
||||
|
||||
FLUSH STATUS;
|
||||
--disable_ps2_protocol
|
||||
eval $get_handler_status_counts;
|
||||
--enable_ps2_protocol
|
||||
|
||||
REPLACE INTO t1 VALUES (0,0,1,1);
|
||||
|
||||
--disable_ps2_protocol
|
||||
eval $get_handler_status_counts;
|
||||
--enable_ps2_protocol
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@@ -16,6 +16,19 @@ drop table t1;
|
||||
rename table mysql.table_stats_save to mysql.table_stats;
|
||||
flush tables;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32667 dict_stats_save_index_stat() reads uninitialized
|
||||
--echo # index->stats_error_printed
|
||||
--echo #
|
||||
call mtr.add_suppression("InnoDB: Cannot save index statistics for table");
|
||||
CREATE TABLE t1(a INT) ENGINE=InnoDB STATS_PERSISTENT=1 STATS_AUTO_RECALC=1;
|
||||
BEGIN;
|
||||
SELECT COUNT(*)>=0 FROM mysql.innodb_index_stats LOCK IN SHARE MODE;
|
||||
INSERT INTO t1 VALUES(0),(0);
|
||||
SELECT sleep(1);
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26753 Assertion state == TRX_STATE_PREPARED ||... failed
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user