Skip to content

Commit

Permalink
PS-9218: Merge MySQL 8.4.0 (MTR test fixes)
Browse files Browse the repository at this point in the history
https://perconadev.atlassian.net/browse/PS-9218

- enable/disable_reconnect removal
- fixed path to included files
- remove rocksdb.upgrade_parts_from_prev_ver test, it checked upgrades
  from previous partitioning format in 5.7
- updated rocksdb_rpl.rpl_rocksdb_stm_mixed_auto_increment and
  rocksdb_rpl.rpl_rocksdb_row_auto_increment tests to use
  rpl_auto_increment_innodb.test internally as rpl_auto_increment.test
  is nor deleted
- update and rename rocksdb_rpl.rpl_rocksdb_extra_col_slave and
  rocksdb_rpl.rpl_rocksdb_extra_col_master tests
- use WRITE instead of deprecated LOW_PRIORITY WRITE in rocksdb.lock
- remove ENGINE from DROP TABLESPACE statement in rocksdb.create_table
- rerecord innodb.log_encrypt_kill test
- update percona.utility_user test to mask thread ID in ER_KILL_DENIED_ERROR
  error string
- in rocksdb.autoinc_vars remove testcase for DOUBLE AUTO_INCREMENT
  as support for it was removed in new release
  • Loading branch information
oleksandr-kachan committed Jul 11, 2024
1 parent 0221a73 commit ed1104f
Show file tree
Hide file tree
Showing 75 changed files with 174 additions and 860 deletions.
4 changes: 2 additions & 2 deletions mysql-test/common/rpl/rpl_auto_increment_innodb.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ drop table t1;
connection master;
set auto_increment_increment=1;
set auto_increment_offset=1;
CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb;
eval CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=$engine_type;
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
show create table t1;

Expand Down Expand Up @@ -118,7 +118,7 @@ SET SQL_MODE='';
# will fail in ha_external_lock() function.
#
connection master;
CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb;
eval CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=$engine_type;

BEGIN;
--echo # Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing
Expand Down
Binary file removed mysql-test/std_data/data_prev_ver_part_rocksdb.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions mysql-test/suite/innodb/r/log_encrypt_kill.result
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ SELECT @@global.innodb_redo_log_encrypt ;
0
SET GLOBAL innodb_redo_log_encrypt = 1;
SET GLOBAL innodb_undo_log_encrypt = 1;
select * from performance_schema.keyring_component_status;
STATUS_KEY STATUS_VALUE
Warnings:
Warning 7014 InnoDB: Undo log can't be encrypted if the keyring is not loaded.
select * from performance_schema.keyring_component_status;
STATUS_KEY STATUS_VALUE
CREATE TABLE tne_1(c1 INT, c2 varchar(2000)) ENGINE = InnoDB;
INSERT INTO tne_1 VALUES (1,REPEAT('a',1990)),(2,REPEAT('b',1990)),(100,REPEAT('c',1990));
SELECT c1,LEFT(c2,10) FROM tne_1;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/percona/r/utility_user.result
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ COUNT(DISTINCT PROCESSLIST_ID)
SELECT COUNT(*) FROM performance_schema.threads where type='FOREGROUND';
COUNT(*)
3
ERROR HY000: You are not owner of thread 10
ERROR HY000: You are not owner of thread <ID>
REVOKE PROXY ON 'frank'@'%' FROM 'root'@'localhost';
CREATE ROLE r1;
GRANT r1 TO frank@'%';
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/percona/t/utility_user.test
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ SELECT COUNT(*) FROM performance_schema.threads where type='FOREGROUND';
connection default;

--disable_query_log
--replace_regex /\s\d+$/ <ID>/
--error ER_KILL_DENIED_ERROR
--eval KILL $conn_id
--enable_query_log
Expand Down
12 changes: 0 additions & 12 deletions mysql-test/suite/rocksdb/r/autoinc_vars.result
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,6 @@ a b
18446744073709551613 a
DROP TABLE t1;
#----------------------------------
# Issue #792 Crash in autoincrement
#----------------------------------
CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY,C2 CHAR) ENGINE=ROCKSDB;
Warnings:
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'C1'.
INSERT INTO t1 VALUES(2177,0);
DROP TABLE t1;
CREATE TABLE t0(c0 BLOB) ENGINE=ROCKSDB;
INSERT INTO t0 VALUES(0);
ALTER TABLE t0 AUTO_INCREMENT=0;
DROP TABLE t0;
#----------------------------------
# Issue #869 Crash in autoincrement
#----------------------------------
CREATE TABLE t1 (pk INT AUTO_INCREMENT, a INT, PRIMARY KEY(pk)) ENGINE=RocksDB;
Expand Down
4 changes: 1 addition & 3 deletions mysql-test/suite/rocksdb/r/create_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,7 @@ ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option '
CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' ENGINE=INNODB;
CREATE TABLE t1 (a INT) ENGINE=ROCKSDB TABLESPACE ts1;
ERROR 42000: This version of MySQL doesn't yet support 'TABLESPACEs for the RocksDB storage engine'
DROP TABLESPACE ts1 ENGINE=INNODB;
Warnings:
Warning 1681 'ENGINE tablespace option' is deprecated and will be removed in a future release.
DROP TABLESPACE ts1;
CREATE TABLE t1 (a INT) COMPRESSION='ZLIB' ENGINE=ROCKSDB;
ERROR 42000: This version of MySQL doesn't yet support 'InnoDB page COMPRESSION for the RocksDB storage engine'
CREATE TABLE t1 (a INT) COMPRESSION='LZ4' ENGINE=ROCKSDB;
Expand Down
4 changes: 1 addition & 3 deletions mysql-test/suite/rocksdb/r/lock.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ SET lock_wait_timeout=1;
connection default;
CREATE TABLE t1 (id INT, id2 INT, pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=ROCKSDB;
INSERT INTO t1 (id,id2) VALUES (1,1),(1,2),(1,3);
LOCK TABLE t1 LOW_PRIORITY WRITE;
Warnings:
Warning 1287 'LOW_PRIORITY WRITE' is deprecated and will be removed in a future release. Please use WRITE instead
LOCK TABLE t1 WRITE;
SELECT id2,COUNT(DISTINCT id) FROM t1 GROUP BY id2;
id2 COUNT(DISTINCT id)
1 1
Expand Down
5 changes: 5 additions & 0 deletions mysql-test/suite/rocksdb/r/type_json.result
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Verify that JSON columns can be dropped
ALTER TABLE t2 DROP COLUMN j1;
ALTER TABLE t2 DROP COLUMN j2;
DROP TABLE t2;
Verify that JSON columns do not support primary key on alter table
CREATE TABLE t3(j1 JSON, j2 JSON NOT NULL);
ALTER TABLE t3 ADD PRIMARY KEY(j1);
ERROR 42000: JSON column 'j1' supports indexing only via generated columns on a specified JSON path.
DROP TABLE t3;
CREATE TABLE json(json int);
INSERT INTO json(json) VALUES (1);
SELECT json FROM json;
Expand Down
46 changes: 0 additions & 46 deletions mysql-test/suite/rocksdb/r/upgrade_parts_from_prev_ver.result

This file was deleted.

2 changes: 0 additions & 2 deletions mysql-test/suite/rocksdb/t/add_index_inplace_crash.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ SET SESSION debug="+d,crash_during_online_index_creation";
--error CR_SERVER_LOST
ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE;

--enable_reconnect
--source include/wait_until_connected_again.inc

SET SESSION debug="-d,crash_during_online_index_creation";
Expand Down Expand Up @@ -52,7 +51,6 @@ SET SESSION debug="+d,crash_during_index_creation_partition";
--error CR_SERVER_LOST
ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;

--enable_reconnect
--source include/wait_until_connected_again.inc

SET SESSION debug="-d,crash_during_index_creation_partition";
Expand Down
8 changes: 0 additions & 8 deletions mysql-test/suite/rocksdb/t/autoinc_debug.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ set debug="+d,crash_commit_before";
--error CR_SERVER_LOST
commit;
--source include/wait_until_disconnected.inc
--enable_reconnect
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--disable_reconnect
select max(i) into @row_max from t;
select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't';

Expand All @@ -36,10 +34,8 @@ set debug="+d,crash_commit_after_prepare";
--error CR_SERVER_LOST
commit;
--source include/wait_until_disconnected.inc
--enable_reconnect
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--disable_reconnect
select max(i) into @row_max from t;
select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't';

Expand All @@ -52,10 +48,8 @@ set debug="+d,crash_commit_after_log";
--error CR_SERVER_LOST
commit;
--source include/wait_until_disconnected.inc
--enable_reconnect
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--disable_reconnect
select max(i) into @row_max from t;
select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't';

Expand All @@ -68,10 +62,8 @@ set debug="+d,crash_commit_after";
--error CR_SERVER_LOST
commit;
--source include/wait_until_disconnected.inc
--enable_reconnect
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--disable_reconnect
select max(i) into @row_max from t;
select table_schema, table_name, auto_increment > @row_max from information_schema.tables where table_name = 't';

Expand Down
13 changes: 0 additions & 13 deletions mysql-test/suite/rocksdb/t/autoinc_vars.test
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,6 @@ INSERT INTO t1 VALUES (NULL, 'c');
SELECT * FROM t1;
DROP TABLE t1;

--echo #----------------------------------
--echo # Issue #792 Crash in autoincrement
--echo #----------------------------------

CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY,C2 CHAR) ENGINE=ROCKSDB;
INSERT INTO t1 VALUES(2177,0);
DROP TABLE t1;

CREATE TABLE t0(c0 BLOB) ENGINE=ROCKSDB;
INSERT INTO t0 VALUES(0);
ALTER TABLE t0 AUTO_INCREMENT=0;
DROP TABLE t0;

--echo #----------------------------------
--echo # Issue #869 Crash in autoincrement
--echo #----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/rocksdb/t/create_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' ENGINE=INNODB;
--error ER_NOT_SUPPORTED_YET
CREATE TABLE t1 (a INT) ENGINE=ROCKSDB TABLESPACE ts1;

DROP TABLESPACE ts1 ENGINE=INNODB;
DROP TABLESPACE ts1;

# MYR-181 : MyRocks doesnt issue error if CREATE TABLE ... COMPRESSION='...' is specified
--error ER_NOT_SUPPORTED_YET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ select * from t1;
--remove_file $DATADIR_LOCATION/.rocksdb/ROCKSDB_CORRUPTED

--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
let $WAIT_COUNT=6000;
--source include/wait_time_until_connected_again.inc

Expand Down Expand Up @@ -70,7 +69,6 @@ insert into t2 (sk) values (1), (2) on duplicate key update val = val + 1;
--remove_file $DATADIR_LOCATION/.rocksdb/ROCKSDB_CORRUPTED

--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
let $WAIT_COUNT=6000;
--source include/wait_time_until_connected_again.inc

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/rocksdb/t/lock.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CREATE TABLE t1 (id INT, id2 INT, pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=ROCK
INSERT INTO t1 (id,id2) VALUES (1,1),(1,2),(1,3);

# LOW_PRIORITY has no effect, but is still syntactically correct
LOCK TABLE t1 LOW_PRIORITY WRITE;
LOCK TABLE t1 WRITE;
SELECT id2,COUNT(DISTINCT id) FROM t1 GROUP BY id2;

UPDATE t1 SET id=-1 WHERE id=1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ EOF
--exec grep "Corruption: SST file is ahead of WALs" $_custom_err | wc -l

--exec echo "restart:--rocksdb_wal_recovery_mode=3 --rocksdb_track_and_verify_wals_in_manifest=0" --rocksdb_write_policy=$write_policy > $_expect_file_name
--enable_reconnect
--source include/wait_until_connected_again.inc

select * from t1;
Expand Down
4 changes: 0 additions & 4 deletions mysql-test/suite/rocksdb/t/truncate_failures.test
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,12 @@ SET DEBUG = "+d,rocksdb_truncate_failure_crash";
--error 2013
TRUNCATE TABLE t1_crash;
--source include/wait_until_disconnected.inc
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
--exec grep 'Removing truncated leftover' $LOG | wc -l
DROP TABLE IF EXISTS t1_crash;
--remove_file $LOG

--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
shutdown_server;
--source include/wait_until_disconnected.inc
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect

This file was deleted.

27 changes: 0 additions & 27 deletions mysql-test/suite/rocksdb/t/upgrade_parts_from_prev_ver.test

This file was deleted.

4 changes: 2 additions & 2 deletions mysql-test/suite/rocksdb_rpl/r/rpl_backup_locks.result
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LOCK TABLES FOR BACKUP;
# connection master
INSERT INTO t_myisam VALUES (0);
# connection slave
STOP SLAVE SQL_THREAD;
STOP REPLICA SQL_THREAD;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
UNLOCK TABLES;
# connection master
Expand All @@ -37,7 +37,7 @@ LOCK INSTANCE FOR BACKUP;
# connection master
CREATE TABLE t (a INT);
# connection slave
STOP SLAVE SQL_THREAD;
STOP REPLICA SQL_THREAD;
ERROR HY000: Cannot stop the replica SQL thread while the instance is locked for backup. Try running `UNLOCK INSTANCE` first.
UNLOCK INSTANCE;
# connection master
Expand Down
Loading

0 comments on commit ed1104f

Please sign in to comment.