From 4c448836d489bd5a25c7509e8a69309c3b0a8e72 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 5 Jan 2021 18:10:04 +0100 Subject: MDEV-12161 Can't specify collation for virtual columns sql standard (2016) allows in two places in the - as a part of the or at the very end. Let's do that too. Side effect: in column/SP declaration `COLLATE cs_coll` automatically implies `CHARACTER SET cs` (unless charset was specified explicitly). See changes in sp-ucs2.result --- mysql-test/r/sp-ucs2.result | 6 +++--- mysql-test/suite/gcol/inc/gcol_column_def_options.inc | 5 +++-- .../suite/gcol/r/gcol_column_def_options_innodb.result | 14 ++++++++++++-- .../suite/gcol/r/gcol_column_def_options_myisam.result | 14 ++++++++++++-- mysql-test/t/sp-ucs2.test | 6 +++--- 5 files changed, 33 insertions(+), 12 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/sp-ucs2.result b/mysql-test/r/sp-ucs2.result index ca448efa535..6c94a111f6f 100644 --- a/mysql-test/r/sp-ucs2.result +++ b/mysql-test/r/sp-ucs2.result @@ -100,20 +100,20 @@ RETURNS VARCHAR(64) CHARACTER SET ucs2 BEGIN RETURN 'str'; END| -ERROR 42000: COLLATION 'ucs2_unicode_ci' is not valid for CHARACTER SET 'latin1' +DROP FUNCTION f| CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2) RETURNS VARCHAR(64) COLLATE ucs2_unicode_ci BEGIN RETURN 'str'; END| -ERROR 42000: COLLATION 'ucs2_unicode_ci' is not valid for CHARACTER SET 'latin1' +DROP FUNCTION f| CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2) RETURNS VARCHAR(64) CHARACTER SET ucs2 BEGIN DECLARE f2 VARCHAR(64) COLLATE ucs2_unicode_ci; RETURN 'str'; END| -ERROR 42000: COLLATION 'ucs2_unicode_ci' is not valid for CHARACTER SET 'latin1' +DROP FUNCTION f| SET NAMES utf8; DROP FUNCTION IF EXISTS bug48766; CREATE FUNCTION bug48766 () diff --git a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc index 28c854c44f4..f4350d25ae9 100644 --- a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc +++ b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc @@ -343,11 +343,12 @@ DELETE FROM t1 WHERE c=1; DROP TABLE t1; } ---error ER_PARSE_ERROR CREATE TABLE t1 (c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar")); +SHOW CREATE TABLE t1; +DROP TABLE t1; CREATE TABLE t1 (i INT); ---error ER_PARSE_ERROR ALTER TABLE t1 ADD COLUMN c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar"); +SHOW CREATE TABLE t1; DROP TABLE t1; --error ER_PARSE_ERROR CREATE TABLE t1 (i INT COLLATE utf8_bin, c INT COLLATE utf8_bin GENERATED ALWAYS AS (10)); diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result index ee80e5f605a..48c4613f6ca 100644 --- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result @@ -426,10 +426,20 @@ INSERT INTO t1(a) VALUES(0); DELETE FROM t1 WHERE c=1; DROP TABLE t1; CREATE TABLE t1 (c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar")); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar"))' at line 1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; CREATE TABLE t1 (i INT); ALTER TABLE t1 ADD COLUMN c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar"); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar")' at line 1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL, + `c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (i INT COLLATE utf8_bin, c INT COLLATE utf8_bin GENERATED ALWAYS AS (10)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS (10))' at line 1 diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result index 09e5b617af1..b7ae6488c95 100644 --- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result @@ -426,10 +426,20 @@ INSERT INTO t1(a) VALUES(0); DELETE FROM t1 WHERE c=1; DROP TABLE t1; CREATE TABLE t1 (c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar")); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar"))' at line 1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; CREATE TABLE t1 (i INT); ALTER TABLE t1 ADD COLUMN c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar"); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar")' at line 1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL, + `c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (i INT COLLATE utf8_bin, c INT COLLATE utf8_bin GENERATED ALWAYS AS (10)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS (10))' at line 1 diff --git a/mysql-test/t/sp-ucs2.test b/mysql-test/t/sp-ucs2.test index a1aec8071b4..95021bcb8ef 100644 --- a/mysql-test/t/sp-ucs2.test +++ b/mysql-test/t/sp-ucs2.test @@ -114,35 +114,35 @@ DROP FUNCTION f1| # # COLLATE with no CHARACTER SET in IN param # ---error ER_COLLATION_CHARSET_MISMATCH CREATE FUNCTION f(f1 VARCHAR(64) COLLATE ucs2_unicode_ci) RETURNS VARCHAR(64) CHARACTER SET ucs2 BEGIN RETURN 'str'; END| +DROP FUNCTION f| # # COLLATE with no CHARACTER SET in RETURNS # ---error ER_COLLATION_CHARSET_MISMATCH CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2) RETURNS VARCHAR(64) COLLATE ucs2_unicode_ci BEGIN RETURN 'str'; END| +DROP FUNCTION f| # # COLLATE with no CHARACTER SET in DECLARE # ---error ER_COLLATION_CHARSET_MISMATCH CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2) RETURNS VARCHAR(64) CHARACTER SET ucs2 BEGIN DECLARE f2 VARCHAR(64) COLLATE ucs2_unicode_ci; RETURN 'str'; END| +DROP FUNCTION f| delimiter ;| -- cgit v1.2.1 From 69f1adaa5565bdd752215774cc7e455793c25109 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 9 Jan 2021 16:56:35 +0100 Subject: main.skip_grants cleanup --- mysql-test/r/skip_grants.result | 30 ++++++++++++++--------- mysql-test/t/skip_grants-master.opt | 1 - mysql-test/t/skip_grants.opt | 1 + mysql-test/t/skip_grants.test | 49 +++++++++++++++---------------------- 4 files changed, 39 insertions(+), 42 deletions(-) delete mode 100644 mysql-test/t/skip_grants-master.opt create mode 100644 mysql-test/t/skip_grants.opt (limited to 'mysql-test') diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result index 1c055ef7385..b92e62a6ff0 100644 --- a/mysql-test/r/skip_grants.result +++ b/mysql-test/r/skip_grants.result @@ -1,14 +1,4 @@ use test; -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -DROP VIEW IF EXISTS v3; -DROP TABLE IF EXISTS t1; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP FUNCTION IF EXISTS f3; CREATE TABLE t1(c INT); CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW @@ -58,10 +48,16 @@ DROP PROCEDURE p3; DROP FUNCTION f1; DROP FUNCTION f2; DROP FUNCTION f3; +# +# Bug #26807 "set global event_scheduler=1" and --skip-grant-tables crashes server +# set global event_scheduler=1; Warnings: Note 1408 Event Scheduler: Loaded 0 events set global event_scheduler=0; +# +# Bug#26285 Selecting information_schema crahes server +# select count(*) from information_schema.COLUMN_PRIVILEGES; count(*) 0 @@ -74,14 +70,21 @@ count(*) select count(*) from information_schema.USER_PRIVILEGES; count(*) 0 -End of 5.0 tests +# +# End of 5.0 tests +# # # Bug#29817 Queries with UDF fail with non-descriptive error # if mysql.proc is missing # select no_such_function(1); ERROR 42000: FUNCTION test.no_such_function does not exist -End of 5.1 tests +# +# End of 5.1 tests +# +# +# MDEV-8280 crash in 'show global status' with --skip-grant-tables +# show global status like 'Acl%'; Variable_name Value Acl_column_grants 0 @@ -93,3 +96,6 @@ Acl_role_grants 0 Acl_roles 0 Acl_table_grants 0 Acl_users 0 +# +# End of 10.1 tests +# diff --git a/mysql-test/t/skip_grants-master.opt b/mysql-test/t/skip_grants-master.opt deleted file mode 100644 index 5699a3387b8..00000000000 --- a/mysql-test/t/skip_grants-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-grant-tables diff --git a/mysql-test/t/skip_grants.opt b/mysql-test/t/skip_grants.opt new file mode 100644 index 00000000000..5699a3387b8 --- /dev/null +++ b/mysql-test/t/skip_grants.opt @@ -0,0 +1 @@ +--skip-grant-tables diff --git a/mysql-test/t/skip_grants.test b/mysql-test/t/skip_grants.test index 5f79404e7e4..f68734f8244 100644 --- a/mysql-test/t/skip_grants.test +++ b/mysql-test/t/skip_grants.test @@ -17,24 +17,6 @@ use test; # Prepare. ---disable_warnings - -DROP VIEW IF EXISTS v1; -DROP VIEW IF EXISTS v2; -DROP VIEW IF EXISTS v3; - -DROP TABLE IF EXISTS t1; - -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; - -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP FUNCTION IF EXISTS f3; - ---enable_warnings - # Test case. CREATE TABLE t1(c INT); @@ -109,20 +91,23 @@ DROP FUNCTION f1; DROP FUNCTION f2; DROP FUNCTION f3; -# -# Bug #26807 "set global event_scheduler=1" and --skip-grant-tables crashes server -# +--echo # +--echo # Bug #26807 "set global event_scheduler=1" and --skip-grant-tables crashes server +--echo # set global event_scheduler=1; set global event_scheduler=0; -# -# Bug#26285 Selecting information_schema crahes server -# +--echo # +--echo # Bug#26285 Selecting information_schema crahes server +--echo # select count(*) from information_schema.COLUMN_PRIVILEGES; select count(*) from information_schema.SCHEMA_PRIVILEGES; select count(*) from information_schema.TABLE_PRIVILEGES; select count(*) from information_schema.USER_PRIVILEGES; ---echo End of 5.0 tests + +--echo # +--echo # End of 5.0 tests +--echo # --echo # --echo # Bug#29817 Queries with UDF fail with non-descriptive error @@ -131,9 +116,15 @@ select count(*) from information_schema.USER_PRIVILEGES; --error ER_SP_DOES_NOT_EXIST select no_such_function(1); ---echo End of 5.1 tests +--echo # +--echo # End of 5.1 tests +--echo # -# -# MDEV-8280 crash in 'show global status' with --skip-grant-tables -# +--echo # +--echo # MDEV-8280 crash in 'show global status' with --skip-grant-tables +--echo # show global status like 'Acl%'; + +--echo # +--echo # End of 10.1 tests +--echo # -- cgit v1.2.1 From fc0d9a470ce9ae2285f687e9b13f08b76527051b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 9 Jan 2021 17:00:04 +0100 Subject: MDEV-22966 Server crashes or hangs with SET ROLE when started with skip-grant-tables --- mysql-test/r/skip_grants.result | 8 ++++++++ mysql-test/t/skip_grants.test | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result index b92e62a6ff0..b058c8f001e 100644 --- a/mysql-test/r/skip_grants.result +++ b/mysql-test/r/skip_grants.result @@ -99,3 +99,11 @@ Acl_users 0 # # End of 10.1 tests # +# +# MDEV-22966 Server crashes or hangs with SET ROLE when started with skip-grant-tables +# +set role x; +ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement +# +# End of 10.2 tests +# diff --git a/mysql-test/t/skip_grants.test b/mysql-test/t/skip_grants.test index f68734f8244..0ecaa022fd4 100644 --- a/mysql-test/t/skip_grants.test +++ b/mysql-test/t/skip_grants.test @@ -128,3 +128,14 @@ show global status like 'Acl%'; --echo # --echo # End of 10.1 tests --echo # + +--echo # +--echo # MDEV-22966 Server crashes or hangs with SET ROLE when started with skip-grant-tables +--echo # + +--error ER_OPTION_PREVENTS_STATEMENT +set role x; + +--echo # +--echo # End of 10.2 tests +--echo # -- cgit v1.2.1 From 22b171d3044675481c03b83888cffa018a502c4e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 9 Jan 2021 17:56:33 +0100 Subject: MDEV-17852 Altered connection limits for user have no effect update mqh in struct user_conn after taking it from the cache --- mysql-test/r/user_limits.result | 27 +++++++++++++++++++++++++++ mysql-test/t/user_limits.test | 26 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/user_limits.result b/mysql-test/r/user_limits.result index bbf73d7c617..8658cc1497d 100644 --- a/mysql-test/r/user_limits.result +++ b/mysql-test/r/user_limits.result @@ -186,3 +186,30 @@ connection default; drop user mysqltest_1@localhost; drop table t1; set global max_user_connections= @my_max_user_connections; +# +# End of 10.1 tests +# +# +# MDEV-17852 Altered connection limits for user have no effect +# +create user foo@'%' with max_user_connections 1; +connect con1,localhost,foo; +select current_user(); +current_user() +foo@% +connect(localhost,foo,,test,MYSQL_PORT,MYSQL_SOCK); +connect con2,localhost,foo; +ERROR 42000: User 'foo' has exceeded the 'max_user_connections' resource (current value: 1) +connection default; +alter user foo with max_user_connections 2; +connect con3,localhost,foo; +select current_user(); +current_user() +foo@% +disconnect con3; +disconnect con1; +connection default; +drop user foo@'%'; +# +# End of 10.2 tests +# diff --git a/mysql-test/t/user_limits.test b/mysql-test/t/user_limits.test index ebb4fd4fb88..36524febd8d 100644 --- a/mysql-test/t/user_limits.test +++ b/mysql-test/t/user_limits.test @@ -216,3 +216,29 @@ drop table t1; --source include/wait_until_count_sessions.inc set global max_user_connections= @my_max_user_connections; + +--echo # +--echo # End of 10.1 tests +--echo # + +--echo # +--echo # MDEV-17852 Altered connection limits for user have no effect +--echo # +create user foo@'%' with max_user_connections 1; +--connect con1,localhost,foo +select current_user(); +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +--error ER_USER_LIMIT_REACHED +--connect con2,localhost,foo +--connection default +alter user foo with max_user_connections 2; +--connect con3,localhost,foo +select current_user(); +--disconnect con3 +--disconnect con1 +--connection default +drop user foo@'%'; + +--echo # +--echo # End of 10.2 tests +--echo # -- cgit v1.2.1 From 674be2fd8296092f246f2d89bc514f50f65dfa2c Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 9 Jan 2021 18:52:33 +0100 Subject: MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE fix "engine does not support TRANSACTIONAL=1" error message to match user input --- mysql-test/r/create.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 3e5efbe74dd..2f039826209 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1290,7 +1290,7 @@ drop table if exists t1,t2,t3; # Fix modified for MariaDB: we support this syntax create table t1 (a int) transactional=0; Warnings: -Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1' +Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=0' create table t2 (a int) page_checksum=1; create table t3 (a int) row_format=page; drop table t1,t2,t3; -- cgit v1.2.1 From 4568a72ce45207a538d89449ffcff4a84cb3ea33 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 10 Jan 2021 01:31:38 +0100 Subject: don't do a warning for bad table options in replication slave thread otherwise ALTER TABLE can break replication --- mysql-test/suite/rpl/r/rpl_table_options.result | 9 ++++++--- mysql-test/suite/rpl/t/rpl_table_options.test | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_table_options.result b/mysql-test/suite/rpl/r/rpl_table_options.result index 87fd8c2b2fb..14af4e390c2 100644 --- a/mysql-test/suite/rpl/r/rpl_table_options.result +++ b/mysql-test/suite/rpl/r/rpl_table_options.result @@ -5,24 +5,27 @@ set storage_engine=example; connection slave; connection master; create table t1 (a int not null) ull=12340; +alter table t1 ull=12350; +Warnings: +Note 1105 EXAMPLE DEBUG: ULL 12340 -> 12350 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL -) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12340 +) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12350 connection slave; connection slave; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `ull`=12340 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `ull`=12350 */ set sql_mode=ignore_bad_table_options; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12340 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12350 connection master; drop table t1; set storage_engine=default; diff --git a/mysql-test/suite/rpl/t/rpl_table_options.test b/mysql-test/suite/rpl/t/rpl_table_options.test index 3f52444a3c7..6dd1c9bd20d 100644 --- a/mysql-test/suite/rpl/t/rpl_table_options.test +++ b/mysql-test/suite/rpl/t/rpl_table_options.test @@ -18,6 +18,7 @@ connection master; # the option is unknown. # create table t1 (a int not null) ull=12340; +alter table t1 ull=12350; show create table t1; sync_slave_with_master; -- cgit v1.2.1 From 6f707430e5e24aed3720e39de6cf49dc8d18d131 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 9 Jan 2021 18:48:16 +0100 Subject: cleanup: copy RAII helpers from 10.5, cleanup test --- mysql-test/r/create.result | 16 ++++-- mysql-test/t/create.test | 138 ++++++++++++++++++++++----------------------- 2 files changed, 81 insertions(+), 73 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 2f039826209..d0755931bf7 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1,7 +1,4 @@ call mtr.add_suppression("table or database name 't-1'"); -drop table if exists t1,t2,t3,t4,t5; -drop database if exists mysqltest; -drop view if exists v1; create table t1 (b char(0)); insert into t1 values (""),(null); select * from t1; @@ -2066,10 +2063,21 @@ alter table t1 add key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0064 (f64) comment 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'; ERROR HY000: Cannot create table `t1`: index information is too long. Decrease number of indexes or use shorter index names or shorter comments. drop table t1; -End of 5.5 tests +# +# End of 5.5 tests +# +# +# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS +# create table t1; ERROR 42000: A table must have at least 1 column +# +# MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT +# create table t1 (i int, j int, key(i), key(i)) as select 1 as i, 2 as j; Warnings: Note 1831 Duplicate index `i_2`. This is deprecated and will be disallowed in a future release drop table t1; +# +# End of 10.0 tests +# diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 11f641c6033..03437320ee6 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -5,12 +5,6 @@ call mtr.add_suppression("table or database name 't-1'"); # Check some special create statements. # ---disable_warnings -drop table if exists t1,t2,t3,t4,t5; -drop database if exists mysqltest; -drop view if exists v1; ---enable_warnings - create table t1 (b char(0)); insert into t1 values (""),(null); select * from t1; @@ -29,30 +23,30 @@ drop table t1; # Test of some CREATE TABLE'S that should fail # ---error 1146 +--error ER_NO_SUCH_TABLE create table t2 engine=heap select * from t1; ---error 1146 +--error ER_NO_SUCH_TABLE create table t2 select auto+1 from t1; drop table if exists t1,t2; ---error 1167 +--error ER_WRONG_KEY_COLUMN create table t1 (b char(0) not null, index(b)); ---error 1163 +--error ER_TABLE_CANT_HANDLE_BLOB create table t1 (a int not null,b text) engine=heap; drop table if exists t1; ---error 1075 +--error ER_WRONG_AUTO_KEY create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; --- error 1049 +--error ER_BAD_DB_ERROR create table not_existing_database.test (a int); create table `a/a` (a int); show create table `a/a`; create table t1 like `a/a`; drop table `a/a`; drop table `t1`; ---error 1103 +--error ER_WRONG_TABLE_NAME create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int); ---error 1059 +--error ER_TOO_LONG_IDENT create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int); # @@ -62,17 +56,17 @@ create table t1 (a datetime default now()); drop table t1; create table t1 (a datetime on update now()); drop table t1; ---error 1067 +--error ER_INVALID_DEFAULT create table t1 (a int default 100 auto_increment); ---error 1067 +--error ER_INVALID_DEFAULT create table t1 (a tinyint default 1000); ---error 1067 +--error ER_INVALID_DEFAULT create table t1 (a varchar(5) default 'abcdef'); create table t1 (a varchar(5) default 'abcde'); insert into t1 values(); select * from t1; ---error 1067 +--error ER_INVALID_DEFAULT SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR alter table t1 alter column a set default 'abcdef'; drop table t1; @@ -97,13 +91,13 @@ create table mysqltest.test2$ (a int); drop table mysqltest.test2$; drop database mysqltest; ---error 1103 +--error ER_WRONG_TABLE_NAME create table `` (a int); ---error 1103 +--error ER_WRONG_TABLE_NAME drop table if exists ``; ---error 1166 +--error ER_WRONG_COLUMN_NAME create table t1 (`` int); ---error 1280 +--error ER_WRONG_NAME_FOR_INDEX create table t1 (i int, index `` (i)); # @@ -158,13 +152,13 @@ create table t2 (a int) select * from t1; describe t1; describe t2; drop table if exists t2; ---error 1060 +--error ER_DUP_FIELDNAME create table t2 (a int, a float) select * from t1; drop table if exists t2; ---error 1060 +--error ER_DUP_FIELDNAME create table t2 (a int) select a as b, a+1 as b from t1; drop table if exists t2; ---error 1060 +--error ER_DUP_FIELDNAME create table t2 (b int) select a as b, a+1 as b from t1; drop table if exists t1,t2; @@ -176,7 +170,7 @@ CREATE TABLE t1 (a int not null); INSERT INTO t1 values (1),(2),(1); --error ER_DUP_ENTRY CREATE TABLE t2 (primary key(a)) SELECT * FROM t1; ---error 1146 +--error ER_NO_SUCH_TABLE SELECT * from t2; DROP TABLE t1; DROP TABLE IF EXISTS t2; @@ -202,7 +196,7 @@ SELECT @@storage_engine; CREATE TABLE t1 (a int not null); show create table t1; drop table t1; ---error 1286 +--error ER_UNKNOWN_STORAGE_ENGINE SET SESSION storage_engine="gemini"; SELECT @@storage_engine; CREATE TABLE t1 (a int not null); @@ -216,11 +210,11 @@ drop table t1; # create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2)); insert into t1 values ("a", 1), ("b", 2); ---error 1048 +--error ER_BAD_NULL_ERROR insert into t1 values ("c", NULL); ---error 1048 +--error ER_BAD_NULL_ERROR insert into t1 values (NULL, 3); ---error 1048 +--error ER_BAD_NULL_ERROR insert into t1 values (NULL, NULL); drop table t1; @@ -262,11 +256,11 @@ drop table t1; # "Table truncated when creating another table name with Spaces" # ---error 1103 +--error ER_WRONG_TABLE_NAME create table `t1 `(a int); ---error 1102 +--error ER_WRONG_DB_NAME create database `db1 `; ---error 1166 +--error ER_WRONG_COLUMN_NAME create table t1(`a ` int); # @@ -274,11 +268,11 @@ create table t1(`a ` int); # "Parser permits multiple commas without syntax error" # ---error 1064 +--error ER_PARSE_ERROR create table t1 (a int,); ---error 1064 +--error ER_PARSE_ERROR create table t1 (a int,,b int); ---error 1064 +--error ER_PARSE_ERROR create table t1 (,b int); # @@ -320,13 +314,13 @@ create table t2 like t3; show create table t2; select * from t2; create table t3 like t1; ---error 1050 +--error ER_TABLE_EXISTS_ERROR create table t3 like mysqltest.t3; ---error 1049 +--error ER_BAD_DB_ERROR create table non_existing_database.t1 like t1; --error ER_NO_SUCH_TABLE create table t3 like non_existing_table; ---error 1050 +--error ER_TABLE_EXISTS_ERROR create temporary table t3 like t1; drop table t1, t2, t3; drop table t3; @@ -360,7 +354,7 @@ SELECT @@storage_engine; CREATE TABLE t1 (a int not null); show create table t1; drop table t1; ---error 1286 +--error ER_UNKNOWN_STORAGE_ENGINE SET SESSION storage_engine="gemini"; SELECT @@storage_engine; CREATE TABLE t1 (a int not null); @@ -464,9 +458,9 @@ use test; # Test for Bug 856 'Naming a key "Primary" causes trouble' # ---error 1280 +--error ER_WRONG_NAME_FOR_INDEX create table t1 (a int, index `primary` (a)); ---error 1280 +--error ER_WRONG_NAME_FOR_INDEX create table t1 (a int, index `PRIMARY` (a)); create table t1 (`primary` int, index(`primary`)); @@ -475,9 +469,9 @@ create table t2 (`PRIMARY` int, index(`PRIMARY`)); show create table t2; create table t3 (a int); ---error 1280 +--error ER_WRONG_NAME_FOR_INDEX alter table t3 add index `primary` (a); ---error 1280 +--error ER_WRONG_NAME_FOR_INDEX alter table t3 add index `PRIMARY` (a); create table t4 (`primary` int); @@ -532,11 +526,11 @@ drop table t1; # # Bug#10413: Invalid column name is not rejected # ---error 1103 +--error ER_WRONG_TABLE_NAME create table t1(column.name int); ---error 1103 +--error ER_WRONG_TABLE_NAME create table t1(test.column.name int); ---error 1102 +--error ER_WRONG_DB_NAME create table t1(xyz.t1.name int); create table t1(t1.name int); create table t2(test.t2.name int); @@ -575,7 +569,7 @@ drop table if exists test.t1; create database mysqltest; use mysqltest; create view v1 as select 'foo' from dual; ---error 1347 +--error ER_WRONG_OBJECT create table t1 like v1; drop view v1; drop database mysqltest; @@ -696,7 +690,7 @@ drop table t1, t2; # # Bug #15316 SET value having comma not correctly handled # ---error 1367 +--error ER_ILLEGAL_VALUE_FOR_TYPE create table t1(a set("a,b","c,d") not null); # End of 4.1 tests @@ -894,9 +888,9 @@ INSERT IGNORE INTO t1 (b) VALUES (5); CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY) SELECT a FROM t1; ---error 1062 +--error ER_DUP_ENTRY INSERT INTO t2 SELECT a FROM t1; ---error 1062 +--error ER_DUP_ENTRY INSERT INTO t2 SELECT a FROM t1; DROP TABLE t1, t2; @@ -956,24 +950,24 @@ drop table t1,t2; # Test incorrect database names # ---error 1102 +--error ER_WRONG_DB_NAME CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ---error 1102 +--error ER_WRONG_DB_NAME DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; # TODO: enable these tests when RENAME DATABASE is implemented. -# --error 1049 +# --error ER_BAD_DB_ERROR # RENAME DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa TO a; -# --error 1102 +# --error ER_WRONG_DB_NAME # RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; # create database mysqltest; -# --error 1102 +# --error ER_WRONG_DB_NAME # RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; # drop database mysqltest; ---error 1102 +--error ER_WRONG_DB_NAME USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ---error 1102 +--error ER_WRONG_DB_NAME SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; # @@ -1025,11 +1019,11 @@ before insert on имя_таблицы_в_кодировке_утф8_длино select TRIGGER_NAME from information_schema.triggers where trigger_schema='test'; drop trigger имя_триггера_в_кодировке_утф8_длиной_больше_чем_49; ---error 1059 +--error ER_TOO_LONG_IDENT create trigger очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66 before insert on имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; ---error 1059 +--error ER_TOO_LONG_IDENT drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66; create procedure имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50() @@ -1038,7 +1032,7 @@ end; select ROUTINE_NAME from information_schema.routines where routine_schema='test'; drop procedure имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50; ---error 1059 +--error ER_TOO_LONG_IDENT create procedure очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66() begin end; @@ -1049,7 +1043,7 @@ return 0; select ROUTINE_NAME from information_schema.routines where routine_schema='test'; drop function имя_функции_в_кодировке_утф8_длиной_больше_чем_49; ---error 1059 +--error ER_TOO_LONG_IDENT create function очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66() returns int return 0; @@ -1917,16 +1911,22 @@ alter table t1 add key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0064 (f64) comment 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'; drop table t1; ---echo End of 5.5 tests +--echo # +--echo # End of 5.5 tests +--echo # -# -# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS -# +--echo # +--echo # MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS +--echo # --error ER_TABLE_MUST_HAVE_COLUMNS create table t1; -# -# MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT -# +--echo # +--echo # MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT +--echo # create table t1 (i int, j int, key(i), key(i)) as select 1 as i, 2 as j; drop table t1; + +--echo # +--echo # End of 10.0 tests +--echo # -- cgit v1.2.1 From 0d8bd7cc3ac9b71450f47700320dfd3d67347a88 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 10 Jan 2021 00:57:02 +0100 Subject: MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE * be strict in CREATE TABLE, just like in ALTER TABLE, because CREATE TABLE, just like ALTER TABLE, can be rolled back for any engine * but don't auto-convert warnings into errors for engine warnings (handler::create) - this matches ALTER TABLE behavior * and not when creating a default record, these errors are handled specially (and replaced with ER_INVALID_DEFAULT) * always issue a Note when a non-unique key is truncated, because it's not a Warning that can be converted to an Error. Before this commit it was a Note for blobs and a Warning for all other data types. --- mysql-test/r/create.result | 8 ++++++++ mysql-test/r/ctype_utf32.result | 2 +- mysql-test/r/ctype_utf8mb4.result | 6 +++--- mysql-test/r/ctype_utf8mb4_innodb.result | 4 ++-- mysql-test/r/ctype_utf8mb4_myisam.result | 4 ++-- mysql-test/r/mix2_myisam.result | 2 +- mysql-test/r/myisam.result | 15 ++++++++------- mysql-test/r/partition_innodb.result | 2 +- mysql-test/r/table_elim.result | 2 +- mysql-test/suite/innodb/r/file_format_defaults.result | 2 +- mysql-test/suite/innodb/r/innodb.result | 6 +++--- mysql-test/suite/innodb_zip/r/index_large_prefix.result | 6 +++--- .../suite/innodb_zip/r/prefix_index_liftedlimit.result | 2 +- mysql-test/suite/maria/maria-ucs2.result | 4 ++-- mysql-test/suite/maria/maria.result | 14 +++++++------- mysql-test/suite/maria/maria3.result | 2 +- mysql-test/suite/maria/mrr.result | 4 ++-- mysql-test/suite/rpl/r/rpl_row_utf32.result | 4 ++-- mysql-test/t/create.test | 10 ++++++++++ mysql-test/t/myisam.test | 1 + 20 files changed, 60 insertions(+), 40 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index d0755931bf7..edbceba7ee5 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -2081,3 +2081,11 @@ drop table t1; # # End of 10.0 tests # +# +# MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE +# +create table t1 (c int(10) unsigned) engine=memory transactional=0; +ERROR HY000: Table storage engine 'MEMORY' does not support the create option 'TRANSACTIONAL=0' +# +# End of 10.2 tests +# diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 7598474e493..584ca12f8c3 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -1306,7 +1306,7 @@ create table t1 (a varchar(334) character set utf32 primary key); ERROR 42000: Specified key was too long; max key length is 1000 bytes create table t1 (a varchar(333) character set utf32, key(a)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes insert into t1 values (repeat('a',333)), (repeat('b',333)); flush tables; check table t1; diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index bdcc07d590e..2762873b9c7 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -1478,7 +1478,7 @@ a varchar(255) NOT NULL default '', KEY a (a) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes insert into t1 values (_utf8mb4 0xe880bd); insert into t1 values (_utf8mb4 0x5b); select hex(a) from t1; @@ -1526,7 +1526,7 @@ Warnings: Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); INSERT INTO t1 VALUES('uu'); check table t1; @@ -2726,7 +2726,7 @@ DEFAULT CHARACTER SET utf8, MODIFY subject varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, MODIFY p varchar(255) CHARACTER SET utf8; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result index c8fe1233b55..e9e54cb86fc 100644 --- a/mysql-test/r/ctype_utf8mb4_innodb.result +++ b/mysql-test/r/ctype_utf8mb4_innodb.result @@ -1438,7 +1438,7 @@ a varchar(255) NOT NULL default '', KEY a (a) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes +Note 1071 Specified key was too long; max key length is 767 bytes insert into t1 values (_utf8mb4 0xe880bd); insert into t1 values (_utf8mb4 0x5b); select hex(a) from t1; @@ -1486,7 +1486,7 @@ Warnings: Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes +Note 1071 Specified key was too long; max key length is 767 bytes INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); INSERT INTO t1 VALUES('uu'); check table t1; diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result index c975d805dfa..408b4f9c68b 100644 --- a/mysql-test/r/ctype_utf8mb4_myisam.result +++ b/mysql-test/r/ctype_utf8mb4_myisam.result @@ -1438,7 +1438,7 @@ a varchar(255) NOT NULL default '', KEY a (a) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes insert into t1 values (_utf8mb4 0xe880bd); insert into t1 values (_utf8mb4 0x5b); select hex(a) from t1; @@ -1486,7 +1486,7 @@ Warnings: Note 1051 Unknown table 'test.t1' CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); INSERT INTO t1 VALUES('uu'); check table t1; diff --git a/mysql-test/r/mix2_myisam.result b/mysql-test/r/mix2_myisam.result index 34764466d2a..dbc992ece23 100644 --- a/mysql-test/r/mix2_myisam.result +++ b/mysql-test/r/mix2_myisam.result @@ -1989,7 +1989,7 @@ a b drop table t1; create table t1 (v varchar(65530), key(v)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes drop table t1; SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR create table t1 (v varchar(65536)); diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index dc99dc06b6d..1a0fb5f0c04 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1695,7 +1695,7 @@ a b drop table t1; create table t1 (v varchar(65530), key(v)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes drop table if exists t1; set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65536)); @@ -1968,7 +1968,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1978,7 +1978,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1024); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1988,7 +1988,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -2034,7 +2034,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -2046,7 +2046,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -2076,7 +2076,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -2322,6 +2322,7 @@ Key Start Len Index Type 1 2 30 multip. varchar 2 33 30 multip. char NULL DROP TABLE t1; +set statement sql_mode='' for create table t1 (n int not null, c char(1)) transactional=1; Warnings: Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1' diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 6770b64552f..a4405882189 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -853,7 +853,7 @@ PARTITION p0 VALUES IN (1,3,9,null), PARTITION p1 VALUES IN (2,4,0) ); Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes +Note 1071 Specified key was too long; max key length is 767 bytes INSERT INTO t2 VALUES ('k','s',3,'b','j'),('a','b',NULL,'v','j'),('c','m',9,'t',NULL), ('b','l',9,'b',NULL),('i','y',3,'o','w'),('c','m',NULL,'a','m'), diff --git a/mysql-test/r/table_elim.result b/mysql-test/r/table_elim.result index 764a1b2780e..8e4210c06fb 100644 --- a/mysql-test/r/table_elim.result +++ b/mysql-test/r/table_elim.result @@ -544,7 +544,7 @@ drop table t0,t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (f1 int(11), PRIMARY KEY (f1)) ; CREATE TABLE t2 (f4 varchar(1024), KEY (f4)) ; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes INSERT IGNORE INTO t2 VALUES ('xcddwntkbxyorzdv'), ('cnxxcddwntkbxyor'),('r'),('r'), ('did'),('I'),('when'), ('hczkfqjeggivdvac'),('e'),('okay'),('up'); diff --git a/mysql-test/suite/innodb/r/file_format_defaults.result b/mysql-test/suite/innodb/r/file_format_defaults.result index 5ea34ceb7b5..2be4e375eb2 100644 --- a/mysql-test/suite/innodb/r/file_format_defaults.result +++ b/mysql-test/suite/innodb/r/file_format_defaults.result @@ -12,7 +12,7 @@ Warning 131 Using innodb_large_prefix is deprecated and the parameter may be rem SET SQL_MODE=strict_all_tables; CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; Warnings: -Warning 1071 Specified key was too long; max key length is 3072 bytes +Note 1071 Specified key was too long; max key length is 3072 bytes SHOW CREATE TABLE tab0; Table Create Table tab0 CREATE TABLE `tab0` ( diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index 921f9880d47..ace226781c0 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -2302,7 +2302,7 @@ Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/ create table t1 (v varchar(65530), key(v)); Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes +Note 1071 Specified key was too long; max key length is 767 bytes SET GLOBAL innodb_large_prefix=default; Warnings: Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/ @@ -2477,11 +2477,11 @@ Warning 131 Using innodb_large_prefix is deprecated and the parameter may be rem create table t1 (col1 varchar(768), index(col1)) character set = latin1 engine = innodb; Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes +Note 1071 Specified key was too long; max key length is 767 bytes create table t2 (col1 varbinary(768), index(col1)) character set = latin1 engine = innodb; Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes +Note 1071 Specified key was too long; max key length is 767 bytes create table t3 (col1 text, index(col1(768))) character set = latin1 engine = innodb; Warnings: diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix.result b/mysql-test/suite/innodb_zip/r/index_large_prefix.result index fe03586546a..d125df09ae3 100644 --- a/mysql-test/suite/innodb_zip/r/index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result @@ -407,10 +407,10 @@ ROW_FORMAT=DYNAMIC; SET sql_mode=''; create index idx1 on worklog5743(a2); Warnings: -Warning 1071 Specified key was too long; max key length is 3072 bytes +Note 1071 Specified key was too long; max key length is 3072 bytes create index idx2 on worklog5743(a3); Warnings: -Warning 1071 Specified key was too long; max key length is 3072 bytes +Note 1071 Specified key was too long; max key length is 3072 bytes create index idx3 on worklog5743(a4); show warnings; Level Code Message @@ -419,7 +419,7 @@ create index idx4 on worklog5743(a1, a2); ERROR 42000: Specified key was too long; max key length is 3072 bytes show warnings; Level Code Message -Error 1071 Specified key was too long; max key length is 3072 bytes +Note 1071 Specified key was too long; max key length is 3072 bytes Error 1071 Specified key was too long; max key length is 3072 bytes create index idx5 on worklog5743(a1, a5); ERROR 42000: Specified key was too long; max key length is 3072 bytes diff --git a/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result index 6cb0b09dee0..a5da38e24db 100644 --- a/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result +++ b/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result @@ -1221,7 +1221,7 @@ DROP INDEX prefix_idx ON worklog5743; SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000)); Warnings: -Warning 1071 Specified key was too long; max key length is 3072 bytes +Note 1071 Specified key was too long; max key length is 3072 bytes SET sql_mode = default; INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; diff --git a/mysql-test/suite/maria/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result index 7499b37279b..73c45759373 100644 --- a/mysql-test/suite/maria/maria-ucs2.result +++ b/mysql-test/suite/maria/maria-ucs2.result @@ -17,7 +17,7 @@ test.t1 check status OK SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK @@ -30,7 +30,7 @@ t1 CREATE TABLE `t1` ( DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(800),KEY(a)) ENGINE=Aria CHARACTER SET ucs2; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes INSERT INTO t1 VALUES (REPEAT('abc ',200)); CHECK TABLE t1; Table Op Msg_type Msg_text diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index 35ec098f7a8..1e85ee8b50c 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -1585,7 +1585,7 @@ a b drop table t1; create table t1 (v varchar(65530), key(v)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes drop table if exists t1; set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for create table t1 (v varchar(65536)); @@ -1855,7 +1855,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a)); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1865,7 +1865,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1024); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1875,7 +1875,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1921,7 +1921,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1933,7 +1933,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1963,7 +1963,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result index e923039a07f..6005bedf7bb 100644 --- a/mysql-test/suite/maria/maria3.result +++ b/mysql-test/suite/maria/maria3.result @@ -17,7 +17,7 @@ t1 CREATE TABLE `t1` ( drop table t1; create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000); Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/maria/mrr.result b/mysql-test/suite/maria/mrr.result index 06be64566e5..5f9fcb4f937 100644 --- a/mysql-test/suite/maria/mrr.result +++ b/mysql-test/suite/maria/mrr.result @@ -393,7 +393,7 @@ PRIMARY KEY (pk), KEY col_varchar_1024_latin1_key (col_varchar_1024_latin1_key) ) ENGINE=Aria; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes INSERT INTO t1 VALUES (1,'z'), (2,'abcdefjhjkl'), (3,'in'), (4,'abcdefjhjkl'), (6,'abcdefjhjkl'), (11,'zx'), (12,'abcdefjhjm'), (13,'jn'), (14,'abcdefjhjp'), (16,'abcdefjhjr'); @@ -430,7 +430,7 @@ f5 varchar(1024) COLLATE latin1_bin, KEY (f5) ) ENGINE=Aria TRANSACTIONAL=0 ; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes # Fill the table with some data SELECT alias2.* , alias1.f2 FROM diff --git a/mysql-test/suite/rpl/r/rpl_row_utf32.result b/mysql-test/suite/rpl/r/rpl_row_utf32.result index af6e709860e..6d177b7cda0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_utf32.result +++ b/mysql-test/suite/rpl/r/rpl_row_utf32.result @@ -3,7 +3,7 @@ include/master-slave.inc SET SQL_LOG_BIN=0; CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes SET SQL_LOG_BIN=1; connection slave; SET @saved_slave_type_conversions= @@global.slave_type_conversions; @@ -13,7 +13,7 @@ include/start_slave.inc SET SQL_LOG_BIN=0; CREATE TABLE t1 ( c1 varchar(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32; Warnings: -Warning 1071 Specified key was too long; max key length is 1000 bytes +Note 1071 Specified key was too long; max key length is 1000 bytes SET SQL_LOG_BIN=1; connection master; INSERT INTO t1(c1) VALUES ('insert into t1'); diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 03437320ee6..396de147ec2 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1930,3 +1930,13 @@ drop table t1; --echo # --echo # End of 10.0 tests --echo # + +--echo # +--echo # MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE +--echo # +--error ER_ILLEGAL_HA_CREATE_OPTION +create table t1 (c int(10) unsigned) engine=memory transactional=0; + +--echo # +--echo # End of 10.2 tests +--echo # diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 217789fccb2..d6efdea982f 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1539,6 +1539,7 @@ DROP TABLE t1; # MariaDB: Note that the table will still have 'TRANSACTIONAL=1' attribute. # That's the intended behavior atm. # +set statement sql_mode='' for create table t1 (n int not null, c char(1)) transactional=1; show create table t1; drop table t1; -- cgit v1.2.1 From a216672dab202207a21f9d2ffdc4b00eb958060f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 10 Jan 2021 21:20:51 +0100 Subject: MDEV-16341 Wrong length for USER columns in performance_schema tables use USERNAME_CHAR_LENGTH and HOSTNAME_LENGTH for perfschema USER and HOST columns --- mysql-test/suite/perfschema/r/schema.result | 22 +++++++++++----------- mysql-test/suite/perfschema/r/table_schema.result | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/perfschema/r/schema.result b/mysql-test/suite/perfschema/r/schema.result index 1f331394df6..8ce4cad4f4b 100644 --- a/mysql-test/suite/perfschema/r/schema.result +++ b/mysql-test/suite/perfschema/r/schema.result @@ -62,7 +62,7 @@ users show create table accounts; Table Create Table accounts CREATE TABLE `accounts` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `CURRENT_CONNECTIONS` bigint(20) NOT NULL, `TOTAL_CONNECTIONS` bigint(20) NOT NULL @@ -140,7 +140,7 @@ events_stages_summary_by_thread_by_event_name CREATE TABLE `events_stages_summar show create table events_stages_summary_by_user_by_event_name; Table Create Table events_stages_summary_by_user_by_event_name CREATE TABLE `events_stages_summary_by_user_by_event_name` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -151,7 +151,7 @@ events_stages_summary_by_user_by_event_name CREATE TABLE `events_stages_summary_ show create table events_stages_summary_by_account_by_event_name; Table Create Table events_stages_summary_by_account_by_event_name CREATE TABLE `events_stages_summary_by_account_by_event_name` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, @@ -398,7 +398,7 @@ events_statements_summary_by_thread_by_event_name CREATE TABLE `events_statement show create table events_statements_summary_by_user_by_event_name; Table Create Table events_statements_summary_by_user_by_event_name CREATE TABLE `events_statements_summary_by_user_by_event_name` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -428,7 +428,7 @@ events_statements_summary_by_user_by_event_name CREATE TABLE `events_statements_ show create table events_statements_summary_by_account_by_event_name; Table Create Table events_statements_summary_by_account_by_event_name CREATE TABLE `events_statements_summary_by_account_by_event_name` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, @@ -590,7 +590,7 @@ events_waits_summary_by_thread_by_event_name CREATE TABLE `events_waits_summary_ show create table events_waits_summary_by_user_by_event_name; Table Create Table events_waits_summary_by_user_by_event_name CREATE TABLE `events_waits_summary_by_user_by_event_name` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL, @@ -601,7 +601,7 @@ events_waits_summary_by_user_by_event_name CREATE TABLE `events_waits_summary_by show create table events_waits_summary_by_account_by_event_name; Table Create Table events_waits_summary_by_account_by_event_name CREATE TABLE `events_waits_summary_by_account_by_event_name` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EVENT_NAME` varchar(128) NOT NULL, `COUNT_STAR` bigint(20) unsigned NOT NULL, @@ -762,8 +762,8 @@ show create table setup_actors; Table Create Table setup_actors CREATE TABLE `setup_actors` ( `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%', - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%', - `ROLE` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%' + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%', + `ROLE` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%' ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8 show create table setup_consumers; Table Create Table @@ -1028,7 +1028,7 @@ threads CREATE TABLE `threads` ( `NAME` varchar(128) NOT NULL, `TYPE` varchar(10) NOT NULL, `PROCESSLIST_ID` bigint(20) unsigned DEFAULT NULL, - `PROCESSLIST_USER` varchar(16) DEFAULT NULL, + `PROCESSLIST_USER` varchar(128) DEFAULT NULL, `PROCESSLIST_HOST` varchar(60) DEFAULT NULL, `PROCESSLIST_DB` varchar(64) DEFAULT NULL, `PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL, @@ -1042,7 +1042,7 @@ threads CREATE TABLE `threads` ( show create table users; Table Create Table users CREATE TABLE `users` ( - `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `CURRENT_CONNECTIONS` bigint(20) NOT NULL, `TOTAL_CONNECTIONS` bigint(20) NOT NULL ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8 diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result index 5c4cf88e9a5..a9beee31f28 100644 --- a/mysql-test/suite/perfschema/r/table_schema.result +++ b/mysql-test/suite/perfschema/r/table_schema.result @@ -1,7 +1,7 @@ select * from information_schema.columns where table_schema="performance_schema" order by table_name, ordinal_position; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION -def performance_schema accounts USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema accounts USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema accounts HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL def performance_schema accounts CURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema accounts TOTAL_CONNECTIONS 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL @@ -37,7 +37,7 @@ def performance_schema events_stages_history_long TIMER_END 7 NULL YES bigint NU def performance_schema events_stages_history_long TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_history_long NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_history_long NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL -def performance_schema events_stages_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema events_stages_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -59,7 +59,7 @@ def performance_schema events_stages_summary_by_thread_by_event_name SUM_TIMER_W def performance_schema events_stages_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def performance_schema events_stages_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema events_stages_summary_by_user_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_stages_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -192,7 +192,7 @@ def performance_schema events_statements_history_long NO_INDEX_USED 37 NULL NO b def performance_schema events_statements_history_long NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_history_long NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_history_long NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL -def performance_schema events_statements_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema events_statements_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -300,7 +300,7 @@ def performance_schema events_statements_summary_by_thread_by_event_name SUM_SOR def performance_schema events_statements_summary_by_thread_by_event_name SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_thread_by_event_name SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_thread_by_event_name SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def performance_schema events_statements_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema events_statements_summary_by_user_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_statements_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -408,7 +408,7 @@ def performance_schema events_waits_history_long NESTING_EVENT_TYPE 16 NULL YES def performance_schema events_waits_history_long OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL def performance_schema events_waits_history_long NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema events_waits_history_long FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL -def performance_schema events_waits_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema events_waits_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -437,7 +437,7 @@ def performance_schema events_waits_summary_by_thread_by_event_name SUM_TIMER_WA def performance_schema events_waits_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def performance_schema events_waits_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema events_waits_summary_by_user_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema events_waits_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL @@ -561,8 +561,8 @@ def performance_schema session_connect_attrs ATTR_NAME 2 NULL NO varchar 32 96 N def performance_schema session_connect_attrs ATTR_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_bin varchar(1024) select,insert,update,references NEVER NULL def performance_schema session_connect_attrs ORDINAL_POSITION 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL def performance_schema setup_actors HOST 1 '%' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL -def performance_schema setup_actors USER 2 '%' NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL -def performance_schema setup_actors ROLE 3 '%' NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema setup_actors USER 2 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL +def performance_schema setup_actors ROLE 3 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema setup_consumers NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL def performance_schema setup_consumers ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL def performance_schema setup_instruments NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL @@ -783,7 +783,7 @@ def performance_schema threads THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NU def performance_schema threads NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema threads TYPE 3 NULL NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_ID 4 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def performance_schema threads PROCESSLIST_USER 5 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references NEVER NULL +def performance_schema threads PROCESSLIST_USER 5 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_HOST 6 NULL YES varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_DB 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL def performance_schema threads PROCESSLIST_COMMAND 8 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references NEVER NULL @@ -793,7 +793,7 @@ def performance_schema threads PROCESSLIST_INFO 11 NULL YES longtext 4294967295 def performance_schema threads PARENT_THREAD_ID 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def performance_schema threads ROLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL def performance_schema threads INSTRUMENTED 14 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL -def performance_schema users USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL +def performance_schema users USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL def performance_schema users CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL def performance_schema users TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL select count(*) from information_schema.columns -- cgit v1.2.1 From 3b94309a6cec8d8149c9f312229d18227036e01d Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Tue, 12 Jan 2021 11:17:37 +0530 Subject: MDEV-23753: SIGSEGV in Column_stat::store_stat_fields For EITS collection min and max fields are allocated for each column that is set in the read_set bitmap of a table. This allocation of min and max fields happens inside alloc_statistics_for_table. For a partitioned table ha_rnd_init is called inside the function collect_statistics_for_table which sets the read_set bitmap for the columns inside the partition expression. This happens only when there is a write lock on the partitioned table. But the allocation happens before this, so min and max fields are not allocated for the columns involved in the partition expression. This resulted in a crash, as the EITS statistics were collected but there was no min and max field to store the value to. The fix would be to call ha_rnd_init inside the function alloc_statistics_for_table that would make sure that min and max fields are allocated for the columns involved in the partition expression. --- mysql-test/r/stat_tables.result | 14 ++++++++++++++ mysql-test/r/stat_tables_innodb.result | 14 ++++++++++++++ mysql-test/t/stat_tables.test | 12 ++++++++++++ 3 files changed, 40 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result index bb3a0a80f7e..a52db46d119 100644 --- a/mysql-test/r/stat_tables.result +++ b/mysql-test/r/stat_tables.result @@ -825,5 +825,19 @@ length(a) set names latin1; set @@use_stat_tables=@save_use_stat_tables; drop table t1; +# +# MDEV-23753: SIGSEGV in Column_stat::store_stat_fields +# +CREATE TABLE t1 (a INT, b INT) PARTITION BY HASH (b) PARTITIONS 2; +LOCK TABLES t1 WRITE; +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a) INDEXES (); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (nonexisting) INDEXES (nonexisting); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze error Invalid argument +DROP TABLE t1; # please keep this at the last set @@global.histogram_size=@save_histogram_size; diff --git a/mysql-test/r/stat_tables_innodb.result b/mysql-test/r/stat_tables_innodb.result index 23b952cc891..3be6b0bd4b3 100644 --- a/mysql-test/r/stat_tables_innodb.result +++ b/mysql-test/r/stat_tables_innodb.result @@ -852,6 +852,20 @@ length(a) set names latin1; set @@use_stat_tables=@save_use_stat_tables; drop table t1; +# +# MDEV-23753: SIGSEGV in Column_stat::store_stat_fields +# +CREATE TABLE t1 (a INT, b INT) PARTITION BY HASH (b) PARTITIONS 2; +LOCK TABLES t1 WRITE; +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a) INDEXES (); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (nonexisting) INDEXES (nonexisting); +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze error Invalid argument +DROP TABLE t1; # please keep this at the last set @@global.histogram_size=@save_histogram_size; set optimizer_switch=@save_optimizer_switch_for_stat_tables_test; diff --git a/mysql-test/t/stat_tables.test b/mysql-test/t/stat_tables.test index 4c21e21ea70..f7c18637cdd 100644 --- a/mysql-test/t/stat_tables.test +++ b/mysql-test/t/stat_tables.test @@ -1,4 +1,5 @@ --source include/have_stat_tables.inc +--source include/have_partition.inc select @@global.use_stat_tables; select @@session.use_stat_tables; @@ -568,5 +569,16 @@ set names latin1; set @@use_stat_tables=@save_use_stat_tables; drop table t1; +--echo # +--echo # MDEV-23753: SIGSEGV in Column_stat::store_stat_fields +--echo # + +CREATE TABLE t1 (a INT, b INT) PARTITION BY HASH (b) PARTITIONS 2; +LOCK TABLES t1 WRITE; +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a) INDEXES (); +ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (nonexisting) INDEXES (nonexisting); +DROP TABLE t1; + + --echo # please keep this at the last set @@global.histogram_size=@save_histogram_size; -- cgit v1.2.1 From ab271ee7e22ce1250ec36b09123bfb98bc3f8107 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Tue, 12 Jan 2021 14:25:55 +0530 Subject: MDEV-23826: ORDER BY in view definition leads to wrong result with GROUP BY on query using view Introduced val_time_packed and val_datetime_packed functions for Item_direct_ref to make sure to get the value from the item it is referring to. The issue for incorrect result was that the item was getting its value from the temporary table rather than from the view. --- mysql-test/r/group_by.result | 44 ++++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/group_by.test | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index c996627486c..55e7703a377 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -2875,3 +2875,47 @@ WHERE c.table_schema=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.columns GROUP BY c GROUP BY t.table_name; ERROR HY001: Out of sort memory, consider increasing server sort buffer size SET max_sort_length= @save_max_sort_length; +# +# MDEV-23826: ORDER BY in view definition leads to wrong result with GROUP BY on query using view +# +CREATE TABLE t1 +( +id INT PRIMARY KEY AUTO_INCREMENT, +dt datetime, +INDEX(dt), +foo int +); +INSERT INTO t1 VALUES (1,'2020-09-26 12:00:00',1); +INSERT INTO t1 VALUES (2,'2020-09-26 13:00:00',1); +INSERT INTO t1 VALUES (3,'2020-09-27 13:00:00',1); +INSERT INTO t1 VALUES (4,'2020-09-27 12:00:00',1); +INSERT INTO t1 VALUES (5,'2020-09-28 12:00:00',1); +INSERT INTO t1 VALUES (6,'2020-09-28 13:00:00',1); +INSERT INTO t1 VALUES (7,'2020-09-25 12:00:00',1); +INSERT INTO t1 VALUES (8,'2020-09-25 13:00:00',1); +INSERT INTO t1 VALUES (9,'2020-09-26 13:00:00',1); +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v2 AS SELECT * FROM t1 ORDER BY dt; +SELECT dt, sum(foo) AS foo FROM v1 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt; +dt foo +2020-09-25 12:00:00 1 +2020-09-25 13:00:00 1 +2020-09-26 12:00:00 1 +2020-09-26 13:00:00 2 +2020-09-27 12:00:00 1 +2020-09-27 13:00:00 1 +2020-09-28 12:00:00 1 +2020-09-28 13:00:00 1 +SELECT dt, sum(foo) AS foo FROM v2 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt; +dt foo +2020-09-25 12:00:00 1 +2020-09-25 13:00:00 1 +2020-09-26 12:00:00 1 +2020-09-26 13:00:00 2 +2020-09-27 12:00:00 1 +2020-09-27 13:00:00 1 +2020-09-28 12:00:00 1 +2020-09-28 13:00:00 1 +DROP TABLE t1; +DROP VIEW v1,v2; +# End of 10.2 tests diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 324b41ce23c..d4c6d6527d5 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1996,3 +1996,36 @@ ON t.table_schema=c.table_schema WHERE c.table_schema=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.columns GROUP BY column_type) GROUP BY t.table_name; SET max_sort_length= @save_max_sort_length; + + +--echo # +--echo # MDEV-23826: ORDER BY in view definition leads to wrong result with GROUP BY on query using view +--echo # + +CREATE TABLE t1 +( + id INT PRIMARY KEY AUTO_INCREMENT, + dt datetime, + INDEX(dt), + foo int +); + +INSERT INTO t1 VALUES (1,'2020-09-26 12:00:00',1); +INSERT INTO t1 VALUES (2,'2020-09-26 13:00:00',1); +INSERT INTO t1 VALUES (3,'2020-09-27 13:00:00',1); +INSERT INTO t1 VALUES (4,'2020-09-27 12:00:00',1); +INSERT INTO t1 VALUES (5,'2020-09-28 12:00:00',1); +INSERT INTO t1 VALUES (6,'2020-09-28 13:00:00',1); +INSERT INTO t1 VALUES (7,'2020-09-25 12:00:00',1); +INSERT INTO t1 VALUES (8,'2020-09-25 13:00:00',1); +INSERT INTO t1 VALUES (9,'2020-09-26 13:00:00',1); + +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v2 AS SELECT * FROM t1 ORDER BY dt; +SELECT dt, sum(foo) AS foo FROM v1 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt; +SELECT dt, sum(foo) AS foo FROM v2 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt; + +DROP TABLE t1; +DROP VIEW v1,v2; + +--echo # End of 10.2 tests -- cgit v1.2.1 From 9e4a5a81fc062c082312afb230d2b8d4cf6b11cf Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Wed, 13 Jan 2021 16:16:13 +0700 Subject: MDEV-24208 SHOW RELAYLOG EVENTS command is not supported in the prepared statement protocol yet Added sending of metadata in response to preparing request for the commands SQLCOM_SHOW_BINLOG_EVENTS, SQLCOM_SHOW_RELAYLOG_EVENTS --- mysql-test/r/ps_show_log.result | 65 +++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_row_create_table.test | 5 -- mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test | 6 -- mysql-test/t/ps_show_log.test | 73 ++++++++++++++++++++++++ 4 files changed, 138 insertions(+), 11 deletions(-) create mode 100644 mysql-test/r/ps_show_log.result create mode 100644 mysql-test/t/ps_show_log.test (limited to 'mysql-test') diff --git a/mysql-test/r/ps_show_log.result b/mysql-test/r/ps_show_log.result new file mode 100644 index 00000000000..54eabaeded6 --- /dev/null +++ b/mysql-test/r/ps_show_log.result @@ -0,0 +1,65 @@ +# +# MDEV-24208 SHOW RELAYLOG EVENTS command is not supported in the prepared +# statement protocol yet +# +CREATE USER u1; +include/master-slave.inc +[connection master] +connection master; +CREATE TABLE t1(n INT); +DROP TABLE t1; +connection slave; +PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS'; +EXECUTE stmt_1; +Log_name Pos Event_type Server_id End_log_pos Info +# # Format_desc # # # +# # Gtid_list # # [] +# # Binlog_checkpoint # # # +# # Gtid # # GTID 0-1-1 +# # Query # # use `test`; CREATE TABLE t1(n INT) +# # Gtid # # GTID 0-1-2 +# # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +# Execute the same prepared statement the second time to check that +# no internal structures used for handling the statement +# 'SHOW BINLOG EVENTS' were damaged. +EXECUTE stmt_1; +Log_name Pos Event_type Server_id End_log_pos Info +# # Format_desc # # # +# # Gtid_list # # [] +# # Binlog_checkpoint # # # +# # Gtid # # GTID 0-1-1 +# # Query # # use `test`; CREATE TABLE t1(n INT) +# # Gtid # # GTID 0-1-2 +# # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +DEALLOCATE PREPARE stmt_1; +connection slave; +PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS'; +EXECUTE stmt_1; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000001 # Format_desc # # # +slave-relay-bin.000001 # Rotate # # # +# Execute the same prepared statement the second time to check that +# no internal structures used for handling the statement +# 'SHOW RELAYLOG EVENTS' were damaged. +EXECUTE stmt_1; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000001 # Format_desc # # # +slave-relay-bin.000001 # Rotate # # # +DEALLOCATE PREPARE stmt_1; +# Create the user u1 without the REPLICATION SLAVE privilege required +# for running the statements SHOW BINLOG EVENTS/SHOW RELAYLOG EVENTS +# and check that attempt to execute the statements SHOW BINLOG EVENTS/ +# SHOW RELAYLOG EVENTS as a prepred statements by a user without required +# privileges results in error. +connect con2,localhost,u1,,test; +PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS'; +EXECUTE stmt_1; +ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation +PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS'; +EXECUTE stmt_1; +ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation +DEALLOCATE PREPARE stmt_1; +include/rpl_end.inc +connection default; +DROP USER u1; +# End of 10.2 tests diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index 65f14295c19..cb76d6c4dcb 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -7,11 +7,6 @@ connection slave; --source include/have_innodb.inc connection master; -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol - # Set the default storage engine to different values on master and # slave. We need to stop the slave for the server variable to take # effect, since the variable is only read on start-up. diff --git a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test index 71cd4a5b9ae..4d786794f5f 100644 --- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test @@ -4,10 +4,4 @@ let $rename_event_pos= `select @binlog_start_pos + 819`; -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. - ---disable_ps_protocol -- source extra/rpl_tests/rpl_flsh_tbls.test ---enable_ps_protocol diff --git a/mysql-test/t/ps_show_log.test b/mysql-test/t/ps_show_log.test new file mode 100644 index 00000000000..95000d2d7e0 --- /dev/null +++ b/mysql-test/t/ps_show_log.test @@ -0,0 +1,73 @@ +--echo # +--echo # MDEV-24208 SHOW RELAYLOG EVENTS command is not supported in the prepared +--echo # statement protocol yet +--echo # + +CREATE USER u1; + +--source include/have_binlog_format_statement.inc +--source include/master-slave.inc +--connection master +CREATE TABLE t1(n INT); + +DROP TABLE t1; + +--sync_slave_with_master +PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS'; + +--replace_column 2 # 4 # 5 # +--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-bin.*/#/ +EXECUTE stmt_1; + +--echo # Execute the same prepared statement the second time to check that +--echo # no internal structures used for handling the statement +--echo # 'SHOW BINLOG EVENTS' were damaged. + +--replace_column 2 # 4 # 5 # +--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-bin.*/#/ +EXECUTE stmt_1; + +DEALLOCATE PREPARE stmt_1; + +--connection slave +PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS'; +--replace_column 2 # 4 # 5 # +--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-relay-bin.*;pos=.*/#/ +EXECUTE stmt_1; + +--echo # Execute the same prepared statement the second time to check that +--echo # no internal structures used for handling the statement +--echo # 'SHOW RELAYLOG EVENTS' were damaged. + +--replace_column 2 # 4 # 5 # +--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-relay-bin.*;pos=.*/#/ +EXECUTE stmt_1; + +DEALLOCATE PREPARE stmt_1; + +--echo # Create the user u1 without the REPLICATION SLAVE privilege required +--echo # for running the statements SHOW BINLOG EVENTS/SHOW RELAYLOG EVENTS +--echo # and check that attempt to execute the statements SHOW BINLOG EVENTS/ +--echo # SHOW RELAYLOG EVENTS as a prepred statements by a user without required +--echo # privileges results in error. + +--connect (con2,localhost,u1,,test) +PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS'; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +EXECUTE stmt_1; + +PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS'; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +EXECUTE stmt_1; + +DEALLOCATE PREPARE stmt_1; + +--source include/rpl_end.inc + +--connection default +# Clean up +DROP USER u1; + +--echo # End of 10.2 tests -- cgit v1.2.1 From 25db70f912f9c2535d7b49b123e042815cb7b1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 13 Jan 2021 18:54:53 +0200 Subject: Fix innodb.innodb_mysql It is unclear for how long the result has been broken, because ./mtr --big-test is not run regularly. --- mysql-test/suite/innodb/r/innodb_mysql.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 0272ecd82b5..877f20cf195 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -1166,7 +1166,7 @@ drop table t1,t2; create table t1(f1 varchar(800) binary not null, key(f1)) character set utf8 collate utf8_general_ci; Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes +Note 1071 Specified key was too long; max key length is 767 bytes insert into t1 values('aaa'); drop table t1; CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB; -- cgit v1.2.1 From ea9cd97f855fddf91f011434e8289ce5eba52528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 13 Jan 2021 18:55:56 +0200 Subject: MDEV-24536 innodb_idle_flush_pct has no effect The parameter innodb_idle_flush_pct that was introduced in MariaDB Server 10.1.2 by MDEV-6932 has no effect ever since the InnoDB changes from MySQL 5.7.9 were applied in commit 2e814d4702d71a04388386a9f591d14a35980bfe. Let us declare the parameter as deprecated and having no effect. --- .../suite/sys_vars/r/innodb_idle_flush_pct_basic.result | 12 ++++++++++++ mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff | 2 +- mysql-test/suite/sys_vars/r/sysvars_innodb.result | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result index a2c328f38fd..915343fcff2 100644 --- a/mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_idle_flush_pct_basic.result @@ -24,6 +24,8 @@ select * from information_schema.session_variables where variable_name='innodb_i VARIABLE_NAME VARIABLE_VALUE INNODB_IDLE_FLUSH_PCT 100 set global innodb_idle_flush_pct=10; +Warnings: +Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect. select @@global.innodb_idle_flush_pct; @@global.innodb_idle_flush_pct 10 @@ -44,6 +46,7 @@ ERROR 42000: Incorrect argument type to variable 'innodb_idle_flush_pct' set global innodb_idle_flush_pct=-7; Warnings: Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '-7' +Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect. select @@global.innodb_idle_flush_pct; @@global.innodb_idle_flush_pct 0 @@ -53,6 +56,7 @@ INNODB_IDLE_FLUSH_PCT 0 set global innodb_idle_flush_pct=106; Warnings: Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '106' +Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect. select @@global.innodb_idle_flush_pct; @@global.innodb_idle_flush_pct 100 @@ -60,18 +64,26 @@ select * from information_schema.global_variables where variable_name='innodb_id VARIABLE_NAME VARIABLE_VALUE INNODB_IDLE_FLUSH_PCT 100 set global innodb_idle_flush_pct=0; +Warnings: +Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect. select @@global.innodb_idle_flush_pct; @@global.innodb_idle_flush_pct 0 set global innodb_idle_flush_pct=100; +Warnings: +Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect. select @@global.innodb_idle_flush_pct; @@global.innodb_idle_flush_pct 100 set global innodb_idle_flush_pct=DEFAULT; +Warnings: +Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect. select @@global.innodb_idle_flush_pct; @@global.innodb_idle_flush_pct 100 SET @@global.innodb_idle_flush_pct = @start_global_value; +Warnings: +Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect. SELECT @@global.innodb_idle_flush_pct; @@global.innodb_idle_flush_pct 100 diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff index 0e4bb7cf7d6..0a1954f6cd5 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff @@ -331,7 +331,7 @@ VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED - VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so. + VARIABLE_COMMENT DEPRECATED. This setting has no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 @@ -1306,22 +1306,22 @@ diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 89138c2fedd..e67a3d28fb6 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -1283,7 +1283,7 @@ SESSION_VALUE NULL DEFAULT_VALUE 100 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED -VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so. +VARIABLE_COMMENT DEPRECATED. This setting has no effect. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 100 NUMERIC_BLOCK_SIZE 0 -- cgit v1.2.1 From db9b54f16365465deda047a3d5da9696606162a0 Mon Sep 17 00:00:00 2001 From: Alice Sherepa Date: Thu, 14 Jan 2021 18:06:41 +0100 Subject: MDEV-12908 binlog_encryption.binlog_xa_recover, binlog.binlog_xa_recover failed in bb with extra checkpoint --- mysql-test/extra/binlog_tests/binlog_xa_recover.inc | 3 +-- mysql-test/suite/binlog/r/binlog_xa_recover.result | 2 +- mysql-test/suite/binlog_encryption/binlog_xa_recover.result | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/binlog_tests/binlog_xa_recover.inc b/mysql-test/extra/binlog_tests/binlog_xa_recover.inc index de2703377cc..9e0906c90f0 100644 --- a/mysql-test/extra/binlog_tests/binlog_xa_recover.inc +++ b/mysql-test/extra/binlog_tests/binlog_xa_recover.inc @@ -180,12 +180,11 @@ connection default; # commit checkpoint, otherwise we get nondeterministic results. SET @old_dbug= @@global.DEBUG_DBUG; SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed"; - +SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed"; SET DEBUG_SYNC= "now SIGNAL con12_cont"; connection con12; reap; connection default; -SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed"; SET GLOBAL debug_dbug= @old_dbug; SET DEBUG_SYNC= "now SIGNAL con11_cont"; diff --git a/mysql-test/suite/binlog/r/binlog_xa_recover.result b/mysql-test/suite/binlog/r/binlog_xa_recover.result index 25aa1389b71..cb2cad957f0 100644 --- a/mysql-test/suite/binlog/r/binlog_xa_recover.result +++ b/mysql-test/suite/binlog/r/binlog_xa_recover.result @@ -148,10 +148,10 @@ connection con10; connection default; SET @old_dbug= @@global.DEBUG_DBUG; SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed"; +SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed"; SET DEBUG_SYNC= "now SIGNAL con12_cont"; connection con12; connection default; -SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed"; SET GLOBAL debug_dbug= @old_dbug; SET DEBUG_SYNC= "now SIGNAL con11_cont"; connection con11; diff --git a/mysql-test/suite/binlog_encryption/binlog_xa_recover.result b/mysql-test/suite/binlog_encryption/binlog_xa_recover.result index af36fe277a1..6e33595eb9e 100644 --- a/mysql-test/suite/binlog_encryption/binlog_xa_recover.result +++ b/mysql-test/suite/binlog_encryption/binlog_xa_recover.result @@ -153,10 +153,10 @@ connection con10; connection default; SET @old_dbug= @@global.DEBUG_DBUG; SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed"; +SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed"; SET DEBUG_SYNC= "now SIGNAL con12_cont"; connection con12; connection default; -SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed"; SET GLOBAL debug_dbug= @old_dbug; SET DEBUG_SYNC= "now SIGNAL con11_cont"; connection con11; -- cgit v1.2.1 From 9e3aa83f01176373d86166257192a175256a16aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 12 Jan 2021 17:00:00 +0200 Subject: MDEV-24443 : galera.lp1376747-4 MTR fails: Result length mismatch Use debug_sync to force FTWRL to pause in correct state. --- mysql-test/suite/galera/r/lp1376747-4.result | 13 ++++++------ mysql-test/suite/galera/t/lp1376747-4.test | 30 ++++++++++++++++++---------- 2 files changed, 25 insertions(+), 18 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/lp1376747-4.result b/mysql-test/suite/galera/r/lp1376747-4.result index f1d32aa8f69..3370e1d3d8e 100644 --- a/mysql-test/suite/galera/r/lp1376747-4.result +++ b/mysql-test/suite/galera/r/lp1376747-4.result @@ -3,26 +3,23 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); connection node_2; SET session wsrep_sync_wait=0; -SET session wsrep_causal_reads=OFF; -Warnings: -Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead -FLUSH TABLE WITH READ LOCK; +FLUSH TABLES WITH READ LOCK; connection node_1; ALTER TABLE t1 ADD COLUMN f2 INTEGER; INSERT INTO t1 VALUES (2,3); connection node_2a; SET session wsrep_sync_wait=0; -SET session wsrep_causal_reads=OFF; -Warnings: -Warning 1287 '@@wsrep_causal_reads' is deprecated and will be removed in a future release. Please use '@@wsrep_sync_wait=1' instead SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SET debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2'; FLUSH TABLES t1 WITH READ LOCK;; connection node_2; +SET debug_sync='now WAIT_FOR parked2'; +SET debug_sync='now SIGNAL go2'; UNLOCK TABLES; SHOW CREATE TABLE t1; Table Create Table @@ -30,8 +27,10 @@ t1 CREATE TABLE `t1` ( `id` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +set debug_sync= 'RESET'; connection node_2a; UNLOCK TABLES; +SET SESSION wsrep_sync_wait = DEFAULT; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-test/suite/galera/t/lp1376747-4.test index 6ae89fe9df4..d19ff422ab0 100644 --- a/mysql-test/suite/galera/t/lp1376747-4.test +++ b/mysql-test/suite/galera/t/lp1376747-4.test @@ -5,7 +5,8 @@ # after provider is unpaused # --source include/galera_cluster.inc ---source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc --let $galera_connection_name = node_2a --let $galera_server_number = 2 @@ -17,8 +18,7 @@ INSERT INTO t1 VALUES (1); --connection node_2 SET session wsrep_sync_wait=0; -SET session wsrep_causal_reads=OFF; -FLUSH TABLE WITH READ LOCK; +FLUSH TABLES WITH READ LOCK; --connection node_1 ALTER TABLE t1 ADD COLUMN f2 INTEGER; @@ -26,25 +26,33 @@ INSERT INTO t1 VALUES (2,3); --connection node_2a SET session wsrep_sync_wait=0; -SET session wsrep_causal_reads=OFF; - SHOW CREATE TABLE t1; +SET debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2'; --send FLUSH TABLES t1 WITH READ LOCK; --connection node_2 ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%'; ---source include/wait_condition.inc - +SET debug_sync='now WAIT_FOR parked2'; + +# let the flush table wait in pause state before we unlock +# table otherwise there is window where-in flush table is +# yet to wait in pause and unlock allows alter table to proceed. +# this is because send is asynchronous. +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE Info LIKE 'FLUSH TABLES t1 WITH READ LOCK'; +--let $wait_condition_on_error_output = SHOW PROCESSLIST +--source include/wait_condition_with_debug.inc + +SET debug_sync='now SIGNAL go2'; +# this will release existing lock but will not resume +# the cluster as there is new FTRL that is still pausing it. UNLOCK TABLES; SHOW CREATE TABLE t1; +set debug_sync= 'RESET'; --connection node_2a --reap UNLOCK TABLES; ---let $wait_condition = SELECT COUNT(*) = 2 FROM t1; ---source include/wait_condition.inc - +SET SESSION wsrep_sync_wait = DEFAULT; SHOW CREATE TABLE t1; SELECT * from t1; -- cgit v1.2.1 From cf6114ebea0224f265d1ac25592fce9b984b0e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 13 Jan 2021 08:32:10 +0200 Subject: MDEV-24432 : galera.galera_fk_cascade_delete_debug MTR failed: query 'reap' failed: 1205: Lock wait timeout exceeded Add wait_conditions to verify correct database state before next operation. --- .../suite/galera/r/galera_fk_cascade_delete.result | 26 ++++++++++++----- .../galera/r/galera_fk_cascade_delete_debug.result | 21 ++++++------- .../suite/galera/t/galera_fk_cascade_delete.test | 19 ++++++++---- .../galera/t/galera_fk_cascade_delete_debug.test | 34 +++++++++++++++++----- 4 files changed, 67 insertions(+), 33 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result index a6c6504dc39..ba5feadb1ff 100644 --- a/mysql-test/suite/galera/r/galera_fk_cascade_delete.result +++ b/mysql-test/suite/galera/r/galera_fk_cascade_delete.result @@ -2,7 +2,6 @@ # test phase with cascading foreign key through 3 tables # connection node_1; -set wsrep_sync_wait=0; CREATE TABLE grandparent ( id INT NOT NULL PRIMARY KEY ) ENGINE=InnoDB; @@ -24,15 +23,26 @@ INSERT INTO grandparent VALUES (1),(2); INSERT INTO parent VALUES (1,1), (2,2); INSERT INTO child VALUES (1,1), (2,2); connection node_2; -set wsrep_sync_wait=0; DELETE FROM grandparent WHERE id = 1; +SELECT * FROM grandparent; +id +2 +SELECT * FROM parent; +id grandparent_id +2 2 +SELECT * FROM child; +id parent_id +2 2 connection node_1; -SELECT COUNT(*), COUNT(*) = 0 FROM parent WHERE grandparent_id = 1; -COUNT(*) COUNT(*) = 0 -0 1 -SELECT COUNT(*), COUNT(*) = 0 FROM child WHERE parent_id = 1; -COUNT(*) COUNT(*) = 0 -0 1 +SELECT * FROM grandparent; +id +2 +SELECT * FROM parent; +id grandparent_id +2 2 +SELECT * FROM child; +id parent_id +2 2 DROP TABLE child; DROP TABLE parent; DROP TABLE grandparent; diff --git a/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result b/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result index 89613b2856a..e2879c30a98 100644 --- a/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result +++ b/mysql-test/suite/galera/r/galera_fk_cascade_delete_debug.result @@ -18,12 +18,10 @@ INSERT INTO child VALUES (1,'row one'), (2,'row two'); connection node_2; DELETE FROM parent; connection node_1; -SELECT COUNT(*), COUNT(*) = 0 FROM parent; -COUNT(*) COUNT(*) = 0 -0 1 -SELECT COUNT(*), COUNT(*) = 0 FROM child; -COUNT(*) COUNT(*) = 0 -0 1 +SELECT * FROM parent; +id +SELECT * FROM child; +id parent_id DROP TABLE child; DROP TABLE parent; # @@ -44,6 +42,7 @@ ON DELETE CASCADE ) ENGINE=InnoDB; INSERT INTO parent VALUES (1); INSERT INTO child VALUES (1,0,1); +connection node_2; connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; connection node_2; @@ -57,11 +56,9 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; SET GLOBAL debug_dbug = ""; SET DEBUG_SYNC = "RESET"; connection node_1; -SELECT COUNT(*), COUNT(*) = 0 FROM parent; -COUNT(*) COUNT(*) = 0 -0 1 -SELECT COUNT(*), COUNT(*) = 0 FROM child; -COUNT(*) COUNT(*) = 0 -0 1 +SELECT * FROM parent; +id +SELECT * FROM child; +id j parent_id DROP TABLE child; DROP TABLE parent; diff --git a/mysql-test/suite/galera/t/galera_fk_cascade_delete.test b/mysql-test/suite/galera/t/galera_fk_cascade_delete.test index a3e0dbcf36f..49b54f0f7f0 100644 --- a/mysql-test/suite/galera/t/galera_fk_cascade_delete.test +++ b/mysql-test/suite/galera/t/galera_fk_cascade_delete.test @@ -9,7 +9,6 @@ --echo # --connection node_1 -set wsrep_sync_wait=0; CREATE TABLE grandparent ( id INT NOT NULL PRIMARY KEY @@ -36,8 +35,12 @@ INSERT INTO parent VALUES (1,1), (2,2); INSERT INTO child VALUES (1,1), (2,2); --connection node_2 -set wsrep_sync_wait=0; - +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'grandparent' +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'parent' +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'child' +--source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 2 FROM child; --source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 2 FROM parent; @@ -46,6 +49,10 @@ set wsrep_sync_wait=0; --source include/wait_condition.inc DELETE FROM grandparent WHERE id = 1; +SELECT * FROM grandparent; +SELECT * FROM parent; +SELECT * FROM child; + --connection node_1 --let $wait_condition = SELECT COUNT(*) = 1 FROM child; --source include/wait_condition.inc @@ -53,8 +60,10 @@ DELETE FROM grandparent WHERE id = 1; --source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 1 FROM grandparent; --source include/wait_condition.inc -SELECT COUNT(*), COUNT(*) = 0 FROM parent WHERE grandparent_id = 1; -SELECT COUNT(*), COUNT(*) = 0 FROM child WHERE parent_id = 1; + +SELECT * FROM grandparent; +SELECT * FROM parent; +SELECT * FROM child; DROP TABLE child; DROP TABLE parent; diff --git a/mysql-test/suite/galera/t/galera_fk_cascade_delete_debug.test b/mysql-test/suite/galera/t/galera_fk_cascade_delete_debug.test index f38c028b7d6..d902783ed64 100644 --- a/mysql-test/suite/galera/t/galera_fk_cascade_delete_debug.test +++ b/mysql-test/suite/galera/t/galera_fk_cascade_delete_debug.test @@ -25,16 +25,25 @@ INSERT INTO parent VALUES ('row one'), ('row two'); INSERT INTO child VALUES (1,'row one'), (2,'row two'); --connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'parent' +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'child' +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 2 FROM parent; +--source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 2 FROM child; --source include/wait_condition.inc + DELETE FROM parent; --connection node_1 +--let $wait_condition = SELECT COUNT(*) = 0 FROM parent; +--source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 0 FROM child; --source include/wait_condition.inc -SELECT COUNT(*), COUNT(*) = 0 FROM parent; -SELECT COUNT(*), COUNT(*) = 0 FROM child; +SELECT * FROM parent; +SELECT * FROM child; DROP TABLE child; DROP TABLE parent; @@ -61,20 +70,27 @@ CREATE TABLE child ( INSERT INTO parent VALUES (1); INSERT INTO child VALUES (1,0,1); +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'parent' +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'child' +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 1 FROM parent; +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 1 FROM child; +--source include/wait_condition.inc + # block applier before applying --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb"; --connection node_2 ---let $wait_condition = SELECT COUNT(*) = 1 FROM child; ---source include/wait_condition.inc DELETE FROM parent; --connection node_1a # wait until applier has reached the sync point SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; - --connection node_1 # issue conflicting write to child table, it should fail in certification --error ER_LOCK_DEADLOCK @@ -88,11 +104,13 @@ SET DEBUG_SYNC = "RESET"; --connection node_1 --reap - +--let $wait_condition = SELECT COUNT(*) = 0 FROM parent; +--source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 0 FROM child; --source include/wait_condition.inc -SELECT COUNT(*), COUNT(*) = 0 FROM parent; -SELECT COUNT(*), COUNT(*) = 0 FROM child; + +SELECT * FROM parent; +SELECT * FROM child; DROP TABLE child; DROP TABLE parent; -- cgit v1.2.1 From beaea31ab12ab56ea8a6eb5e99cf82648675ea78 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 9 Dec 2020 21:53:18 +0200 Subject: MDEV-23851 BF-BF Conflict issue because of UK GAP locks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some DML operations on tables having unique secondary keys cause scanning in the secondary index, for instance to find potential unique key violations in the seconday index. This scanning may involve GAP locking in the index. As this locking happens also when applying replication events in high priority applier threads, there is a probabality for lock conflicts between two wsrep high priority threads. This PR avoids lock conflicts of high priority wsrep threads, which do secondary index scanning e.g. for duplicate key detection. The actual fix is the patch in sql_class.cc:thd_need_ordering_with(), where we allow relaxed GAP locking protocol between wsrep high priority threads. wsrep high priority threads (replication appliers, replayers and TOI processors) are ordered by the replication provider, and they will not need serializability support gained by secondary index GAP locks. PR contains also a mtr test, which exercises a scenario where two replication applier threads have a false positive conflict in GAP of unique secondary index. The conflicting local committing transaction has to replay, and the test verifies also that the replaying phase will not conflict with the latter repllication applier. Commit also contains new test scenario for galera.galera_UK_conflict.test, where replayer starts applying after a slave applier thread, with later seqno, has advanced to commit phase. The applier and replayer have false positive GAP lock conflict on secondary unique index, and replayer should ignore this. This test scenario caused crash with earlier version in this PR, and to fix this, the secondary index uniquenes checking has been relaxed even further. Now innodb trx_t structure has new member: bool wsrep_UK_scan, which is set to true, when high priority thread is performing unique secondary index scanning. The member trx_t::wsrep_UK_scan is defined inside WITH_WSREP directive, to make it possible to prepare a MariaDB build where this additional trx_t member is not present and is not used in the code base. trx->wsrep_UK_scan is set to true only for the duration of function call for: lock_rec_lock() trx->wsrep_UK_scan is used only in lock_rec_has_to_wait() function to relax the need to wait if wsrep_UK_scan is set and conflicting transaction is also high priority. Reviewed-by: Jan Lindström --- .../suite/galera/r/galera_UK_conflict.result | 89 +++++++++++++ mysql-test/suite/galera/t/galera_UK_conflict.test | 148 +++++++++++++++++++++ 2 files changed, 237 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera_UK_conflict.result create mode 100644 mysql-test/suite/galera/t/galera_UK_conflict.test (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/galera_UK_conflict.result b/mysql-test/suite/galera/r/galera_UK_conflict.result new file mode 100644 index 00000000000..76649f1b268 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_UK_conflict.result @@ -0,0 +1,89 @@ +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2)); +INSERT INTO t1 VALUES (1, 1, 0); +INSERT INTO t1 VALUES (3, 3, 0); +INSERT INTO t1 VALUES (10, 10, 0); +SET GLOBAL wsrep_slave_threads = 3; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; +connection node_1; +SET SESSION wsrep_sync_wait=0; +START TRANSACTION; +DELETE FROM t1 WHERE f2 = 3; +INSERT INTO t1 VALUES (3, 3, 1); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1a; +SET SESSION wsrep_sync_wait=0; +connection node_2; +INSERT INTO t1 VALUES (5, 5, 2); +connection node_1a; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; +INSERT INTO t1 VALUES (4, 4, 2); +connection node_1a; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +connection node_1; +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_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SET GLOBAL debug_dbug = NULL; +SET debug_sync='RESET'; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; +SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SET GLOBAL debug_dbug = NULL; +SET debug_sync='RESET'; +SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +connection node_1; +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +10 10 0 +wsrep_local_replays +1 +SET GLOBAL wsrep_slave_threads = DEFAULT; +connection node_2; +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +10 10 0 +INSERT INTO t1 VALUES (7,7,7); +INSERT INTO t1 VALUES (8,8,8); +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +7 7 7 +8 8 8 +10 10 0 +connection node_1; +SELECT * FROM t1; +f1 f2 f3 +1 1 0 +3 3 1 +4 4 2 +5 5 2 +7 7 7 +10 10 0 +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_UK_conflict.test b/mysql-test/suite/galera/t/galera_UK_conflict.test new file mode 100644 index 00000000000..57bafbf8ae0 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_UK_conflict.test @@ -0,0 +1,148 @@ +# +# This test tests the operation of transaction replay with a scenario +# where two subsequent write sets in applying conflict with local transaction +# in commit phase. The conflict is "false positive" confict on GAP lock in +# secondary unique index. +# The first applier will cause BF abort for the local committer, which +# starts replaying because of positive certification. +# In buggy version, scenatio continues so that ehile the local transaction +# is replaying, the latter applier experiences similar UK GAP lock conflict +# and forces the replayer to abort second time. +# In fixed version, this latter BF abort should not happen. +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source include/galera_have_debug_sync.inc + +--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2)); +INSERT INTO t1 VALUES (1, 1, 0); +INSERT INTO t1 VALUES (3, 3, 0); +INSERT INTO t1 VALUES (10, 10, 0); + +# we will need 2 appliers threads for applyin two write sets in parallel in node1 +# and 1 applier thread for handling replaying +SET GLOBAL wsrep_slave_threads = 3; +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; + +--connection node_1 +# starting a transaction, which deletes and inserts the middle row in test table +# this will be victim of false positive conflict with appliers +SET SESSION wsrep_sync_wait=0; +START TRANSACTION; + +DELETE FROM t1 WHERE f2 = 3; +INSERT INTO t1 VALUES (3, 3, 1); + +# 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; + +# send from node 2 first INSERT transaction, which will conflict on GAP lock in node 1 +--connection node_2 +INSERT INTO t1 VALUES (5, 5, 2); + +--connection node_1a +# wait to see the INSERT in apply_cb sync point +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + +# first applier seen in wait point, set sync point for the second INSERT +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_set_sync_point.inc + +--connection node_2 +# send second insert into same GAP in test table +INSERT INTO t1 VALUES (4, 4, 2); + +--connection node_1a +# wait for the second insert to arrive in his sync point +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc + +# both appliers are now waiting in separate sync points + +# Block the local commit, send the COMMIT and wait until it gets blocked +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc + +--connection node_1 +--send COMMIT + +--connection node_1a +# wait for the local commit to enter in commit monitor wait state +--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_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_enter_sync +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc + +# and now release the first 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'; + +# set another sync point for second applier +SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; + +# letting the second appier to move forward +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_signal_sync_point.inc + +# waiting until second applier is in wait +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + +# stopping second applier before commit +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc +--source include/galera_clear_sync_point.inc + +# releasing the second insert, with buggy version it will conflict with +# replayer +SET GLOBAL DEBUG_DBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SET GLOBAL debug_dbug = NULL; +SET debug_sync='RESET'; + +# with fixed version, second applier has reached commit monitor, and we can +# release it to complete +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc + +# local commit should succeed +--connection node_1 +--reap + +SELECT * FROM t1; + +# wsrep_local_replays has increased by 1 +--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` +--disable_query_log +--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays; +--enable_query_log + +# returning original slave thread count +SET GLOBAL wsrep_slave_threads = DEFAULT; + +--connection node_2 +SELECT * FROM t1; + +# replicate some transactions, so that wsrep slave thread count can reach +# original state in node 1 +INSERT INTO t1 VALUES (7,7,7); +INSERT INTO t1 VALUES (8,8,8); +SELECT * FROM t1; + +--connection node_1 +SELECT * FROM t1; + +DROP TABLE t1; -- cgit v1.2.1 From 94890a749a217bb831a5c260703d27b0a3e290d4 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Fri, 18 Dec 2020 00:28:38 +0530 Subject: MDEV-24179: Assertion `m_status == DA_ERROR || m_status == DA_OK || m_status == DA_OK_BULK' failed in Diagnostics_area::message() Analysis: Assertion failure happens because we reach the maximum limit to examine rows. Fix: Return the error state. --- mysql-test/r/information_schema.result | 12 ++++++++++++ mysql-test/t/information_schema.test | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index db416f983e3..1594ebf75e0 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -2196,5 +2196,17 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL Warnings: Warning 1931 Query execution was interrupted. The query examined at least ### rows, which exceeds LIMIT ROWS EXAMINED (10). The query result may be incomplete # +# MDEV-24179: AAssertion `m_status == DA_ERROR || m_status == DA_OK || +# m_status == DA_OK_BULK' failed in Diagnostics_area::message() +# +call mtr.add_suppression("Sort aborted.*"); +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema; +SELECT * FROM v LIMIT ROWS EXAMINED 9; +ERROR HY000: Sort aborted: +DROP VIEW v; +# # End of 10.2 Test # diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index cd30c2103a0..9ff94d2deb7 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1917,6 +1917,23 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a' replace_regex /at least \d+ rows/at least ### rows/; SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` LIMIT ROWS EXAMINED 10; +--echo # +--echo # MDEV-24179: AAssertion `m_status == DA_ERROR || m_status == DA_OK || +--echo # m_status == DA_OK_BULK' failed in Diagnostics_area::message() +--echo # + +call mtr.add_suppression("Sort aborted.*"); + +DROP DATABASE test; +CREATE DATABASE test; +USE test; +CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema; + +--error ER_FILSORT_ABORT +SELECT * FROM v LIMIT ROWS EXAMINED 9; + +DROP VIEW v; + --echo # --echo # End of 10.2 Test --echo # -- cgit v1.2.1 From 479b4214fadcb0b8dedcaf780b180160d60b3986 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Mon, 11 Jan 2021 15:23:09 +0530 Subject: MDEV-24547 Update fails when online alter does rollback due to MDL time out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When online alter rollbacks due to MDL time out, it doesn't mark the index online status as ONLINE_INDEX_ABORTED. Concurrent update fails to update the secondary index while building the entry. InnoDB should check the online status of the secondary index before building the secondary index entry. Reviewed-by: Marko Mäkelä --- mysql-test/suite/innodb/r/alter_mdl_timeout.result | 23 ++++++++++++++++ mysql-test/suite/innodb/t/alter_mdl_timeout.opt | 1 + mysql-test/suite/innodb/t/alter_mdl_timeout.test | 32 ++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 mysql-test/suite/innodb/r/alter_mdl_timeout.result create mode 100644 mysql-test/suite/innodb/t/alter_mdl_timeout.opt create mode 100644 mysql-test/suite/innodb/t/alter_mdl_timeout.test (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/alter_mdl_timeout.result b/mysql-test/suite/innodb/r/alter_mdl_timeout.result new file mode 100644 index 00000000000..7af1362c69e --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_mdl_timeout.result @@ -0,0 +1,23 @@ +create table t1(f1 char(10), f2 char(10) not null, f3 int not null, +f4 int not null, primary key(f3))engine=innodb; +insert into t1 values('a','a', 1, 1), ('b','b', 2, 2), ('c', 'c', 3, 3), ('d', 'd', 4, 4); +SET DEBUG_SYNC="row_merge_after_scan SIGNAL con1_start WAIT_FOR con1_insert"; +SET DEBUG_SYNC="innodb_commit_inplace_alter_table_wait SIGNAL con1_wait WAIT_FOR con1_update"; +ALTER TABLE t1 ADD UNIQUE INDEX(f1(3), f4), ADD UNIQUE INDEX(f2), ALGORITHM=INPLACE; +connect con1,localhost,root,,,; +SET DEBUG_SYNC="now WAIT_FOR con1_start"; +begin; +INSERT INTO t1 VALUES('e','e',5, 5); +SET DEBUG_SYNC="now SIGNAL con1_insert"; +SET DEBUG_SYNC="now WAIT_FOR con1_wait"; +SET DEBUG_SYNC="before_row_upd_sec_new_index_entry SIGNAL con1_update WAIT_FOR alter_rollback"; +UPDATE t1 set f4 = 10 order by f1 desc limit 2; +connection default; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC="now SIGNAL alter_rollback"; +connection con1; +commit; +connection default; +disconnect con1; +DROP TABLE t1; +SET DEBUG_SYNC="RESET"; diff --git a/mysql-test/suite/innodb/t/alter_mdl_timeout.opt b/mysql-test/suite/innodb/t/alter_mdl_timeout.opt new file mode 100644 index 00000000000..9e0e38bd64a --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_mdl_timeout.opt @@ -0,0 +1 @@ +--lock_wait_timeout=2 diff --git a/mysql-test/suite/innodb/t/alter_mdl_timeout.test b/mysql-test/suite/innodb/t/alter_mdl_timeout.test new file mode 100644 index 00000000000..15e7f524fd0 --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_mdl_timeout.test @@ -0,0 +1,32 @@ +--source include/have_innodb.inc +--source include/have_debug.inc + +create table t1(f1 char(10), f2 char(10) not null, f3 int not null, + f4 int not null, primary key(f3))engine=innodb; +insert into t1 values('a','a', 1, 1), ('b','b', 2, 2), ('c', 'c', 3, 3), ('d', 'd', 4, 4); +SET DEBUG_SYNC="row_merge_after_scan SIGNAL con1_start WAIT_FOR con1_insert"; +SET DEBUG_SYNC="innodb_commit_inplace_alter_table_wait SIGNAL con1_wait WAIT_FOR con1_update"; +send ALTER TABLE t1 ADD UNIQUE INDEX(f1(3), f4), ADD UNIQUE INDEX(f2), ALGORITHM=INPLACE; + +connect(con1,localhost,root,,,); +SET DEBUG_SYNC="now WAIT_FOR con1_start"; +begin; +INSERT INTO t1 VALUES('e','e',5, 5); +SET DEBUG_SYNC="now SIGNAL con1_insert"; +SET DEBUG_SYNC="now WAIT_FOR con1_wait"; +SET DEBUG_SYNC="before_row_upd_sec_new_index_entry SIGNAL con1_update WAIT_FOR alter_rollback"; +SEND UPDATE t1 set f4 = 10 order by f1 desc limit 2; + +connection default; +--error ER_LOCK_WAIT_TIMEOUT +reap; +SET DEBUG_SYNC="now SIGNAL alter_rollback"; + +connection con1; +reap; +commit; + +connection default; +disconnect con1; +DROP TABLE t1; +SET DEBUG_SYNC="RESET"; -- cgit v1.2.1 From 82d39d4374c358c2378af05e42a2e679ffe91306 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Mon, 18 Jan 2021 15:18:33 +0530 Subject: MDEV-24491 db_name mismatch happens during virtual column computation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Database name mismatch happens while opening the table for virtual column computation. Because table_name_parse() returns the length of database and table name before converting the filename to table name. This issue is caused by commit 8b0d4cff0760b0a35285c315d82c49631c108baf (MDEV-15855). Fix should be that table_name_parse() should return the length of database and table name after converting the filename to table name. Reviewed-by: Marko Mäkelä --- mysql-test/suite/gcol/r/innodb_virtual_fk.result | 5 +++++ mysql-test/suite/gcol/t/innodb_virtual_fk.test | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk.result b/mysql-test/suite/gcol/r/innodb_virtual_fk.result index 68601823e31..252274f3e0a 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_fk.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_fk.result @@ -793,6 +793,9 @@ DROP TABLE t1; # # MDEV-24041 Generated column DELETE with FOREIGN KEY crash InnoDB # +SET FOREIGN_KEY_CHECKS=1; +CREATE DATABASE `a-b`; +USE `a-b`; CREATE TABLE emails ( id int, PRIMARY KEY (id) @@ -802,6 +805,7 @@ id int, email_id int, date_sent char(4), generated_email_id int as (email_id), +#generated_sent_date DATE GENERATED ALWAYS AS (date_sent), PRIMARY KEY (id), KEY mautic_generated_sent_date_email_id (generated_email_id), FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE SET NULL @@ -818,3 +822,4 @@ DELETE FROM emails; DROP TABLE email_stats; DROP TABLE emails_metadata; DROP TABLE emails; +DROP DATABASE `a-b`; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_fk.test b/mysql-test/suite/gcol/t/innodb_virtual_fk.test index da20612f0a1..24b6a4631e6 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_fk.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_fk.test @@ -653,7 +653,9 @@ DROP TABLE t1; --echo # --echo # MDEV-24041 Generated column DELETE with FOREIGN KEY crash InnoDB --echo # - +SET FOREIGN_KEY_CHECKS=1; +CREATE DATABASE `a-b`; +USE `a-b`; CREATE TABLE emails ( id int, PRIMARY KEY (id) @@ -664,6 +666,7 @@ CREATE TABLE email_stats ( email_id int, date_sent char(4), generated_email_id int as (email_id), + #generated_sent_date DATE GENERATED ALWAYS AS (date_sent), PRIMARY KEY (id), KEY mautic_generated_sent_date_email_id (generated_email_id), FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE SET NULL @@ -686,3 +689,4 @@ DELETE FROM emails; DROP TABLE email_stats; DROP TABLE emails_metadata; DROP TABLE emails; +DROP DATABASE `a-b`; -- cgit v1.2.1 From 775aa6f08a33042c11039450006cd5a65554aa80 Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 19 Jan 2021 14:25:51 +0300 Subject: MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields Ignore table->fts freed previously by create_table_info_t::create_table(). --- mysql-test/suite/innodb_fts/r/create.result | 10 ++++++++++ mysql-test/suite/innodb_fts/t/create.test | 11 +++++++++++ 2 files changed, 21 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb_fts/r/create.result b/mysql-test/suite/innodb_fts/r/create.result index c3a14fa0281..963b31fdbd7 100644 --- a/mysql-test/suite/innodb_fts/r/create.result +++ b/mysql-test/suite/innodb_fts/r/create.result @@ -182,3 +182,13 @@ Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save; +# +# MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields +# +create table t1 ( +f1 int, f2 text, +FTS_DOC_ID bigint unsigned not null, +unique key FTS_DOC_ID_INDEX(FTS_DOC_ID, f1), +fulltext (f2)) +engine=innodb; +ERROR 42000: Incorrect index name 'FTS_DOC_ID_INDEX' diff --git a/mysql-test/suite/innodb_fts/t/create.test b/mysql-test/suite/innodb_fts/t/create.test index 4e522994fcc..38c93de4982 100644 --- a/mysql-test/suite/innodb_fts/t/create.test +++ b/mysql-test/suite/innodb_fts/t/create.test @@ -106,3 +106,14 @@ SET GLOBAL innodb_optimize_fulltext_only= 1; OPTIMIZE TABLE t1; DROP TABLE t1; SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save; + +--echo # +--echo # MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields +--echo # +--error ER_WRONG_NAME_FOR_INDEX +create table t1 ( + f1 int, f2 text, + FTS_DOC_ID bigint unsigned not null, + unique key FTS_DOC_ID_INDEX(FTS_DOC_ID, f1), + fulltext (f2)) +engine=innodb; -- cgit v1.2.1 From 959dfac4d0e715725d05448a77c08d870d5aa247 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Tue, 19 Jan 2021 15:29:03 +0400 Subject: MDEV-19723 Assertion `je->state == JST_KEY' failed while SELECT ST_GEOMFROMGEOJSON() and Assertion `!mysql_bin_log.is_open() || thd.is_current_stmt_binlog_format_row()' The invalid GeoJSON case wasn't handled here. --- mysql-test/r/gis-json.result | 3 +++ mysql-test/t/gis-json.test | 2 ++ 2 files changed, 5 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/gis-json.result b/mysql-test/r/gis-json.result index 1d6e2193fc9..d507a9994ff 100644 --- a/mysql-test/r/gis-json.result +++ b/mysql-test/r/gis-json.result @@ -104,6 +104,9 @@ a NULL Warnings: Warning 4076 Incorrect GeoJSON format - empty 'coordinates' array. +SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }"); +ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }") +NULL # # End of 10.2 tests # diff --git a/mysql-test/t/gis-json.test b/mysql-test/t/gis-json.test index b91ef235fd0..a97e9411e5c 100644 --- a/mysql-test/t/gis-json.test +++ b/mysql-test/t/gis-json.test @@ -44,6 +44,8 @@ SELECT st_astext(st_geomfromgeojson('{"type": "MultiLineString","coordinates": [ SELECT st_astext(st_geomfromgeojson('{"type": "Polygon","coordinates": []}')) as a; SELECT st_astext(st_geomfromgeojson('{"type": "MultiPolygon","coordinates": []}')) as a; +SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }"); + --echo # --echo # End of 10.2 tests --echo # -- cgit v1.2.1 From b22285e4821b49546de9b88990bbc9c453dc14b2 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Tue, 19 Jan 2021 08:02:37 -0800 Subject: MDEV-16940 Server crashes in unsafe_key_update upon attempt to update view through 2nd execution of SP This bug caused a server crash on the second call of any stored procedure that contained an UPDATE statement over a multi-table view reporting an error message at the prepare stage. On the first call of the stored procedure after reporting an error at the preparation stage of the UPDATE statement finished without calling the function SELECT_LEX::save_prep_leaf_tables() for the SELECT used as the definition of the view. This left the SELECT_LEX structure used by the UPDATE statement in an inconsistent state for second call of the stored procedure. Approved by Oleksandr Byelkin --- mysql-test/r/view.result | 16 ++++++++++++++++ mysql-test/t/view.test | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 0da11c7c355..e48a99f6aff 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -6802,5 +6802,21 @@ drop database db1; create database test; use test; # +# MDEV-16940: update of multi-table view returning error used in SP +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1), (2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (2), (3); +CREATE VIEW v1 AS SELECT a, b FROM t1,t2; +CREATE PROCEDURE sp1() UPDATE v1 SET a = 8, b = 9; +CALL sp1; +ERROR HY000: Can not modify more than one base table through a join view 'test.v1' +CALL sp1; +ERROR HY000: Can not modify more than one base table through a join view 'test.v1' +DROP PROCEDURE sp1; +DROP VIEW v1; +DROP TABLE t1, t2; +# # End of 10.2 tests # diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 2486887600b..b5ce6a1cabf 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -6521,6 +6521,28 @@ drop database db1; create database test; use test; +--echo # +--echo # MDEV-16940: update of multi-table view returning error used in SP +--echo # + +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1), (2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (2), (3); + +CREATE VIEW v1 AS SELECT a, b FROM t1,t2; + +CREATE PROCEDURE sp1() UPDATE v1 SET a = 8, b = 9; + +--error ER_VIEW_MULTIUPDATE +CALL sp1; +--error ER_VIEW_MULTIUPDATE +CALL sp1; + +DROP PROCEDURE sp1; +DROP VIEW v1; +DROP TABLE t1, t2; + --echo # --echo # End of 10.2 tests --echo # -- cgit v1.2.1 From eb75e8705d9a444e10057967eaebf947b1115ff8 Mon Sep 17 00:00:00 2001 From: Sujatha Date: Thu, 7 Jan 2021 17:34:57 +0530 Subject: MDEV-8134: The relay-log is not flushed after the slave-relay-log.999999 showed Problem: ======== Auto purge of relaylogs stops when relay-log-file is 'slave-relay-log.999999' and slave_parallel_threads is enabled. Analysis: ========= The problem is that in Relay_log_info::inc_group_relay_log_pos() function, when two log names are compared via strcmp() function, it gives correct result, when log name sequence numbers are of same digits(6 digits), But when the number goes to 7 digits, a 999999 compares greater than 1000000, which is wrong, hence the bug. Fix: ==== Extract the numeric extension part of the file name, convert it into unsigned long and compare. Thanks to David Zhao for the contribution. --- .../suite/rpl/r/rpl_relay_max_extension.result | 37 +++++++ .../suite/rpl/t/rpl_relay_max_extension.test | 109 +++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_relay_max_extension.result create mode 100644 mysql-test/suite/rpl/t/rpl_relay_max_extension.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_relay_max_extension.result b/mysql-test/suite/rpl/r/rpl_relay_max_extension.result new file mode 100644 index 00000000000..4444398203e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relay_max_extension.result @@ -0,0 +1,37 @@ +include/rpl_init.inc [topology=1->2] +connection server_2; +include/stop_slave.inc +RESET SLAVE; +include/start_slave.inc +include/stop_slave.inc +# +# Stop slave server +# +# +# Simulate file number get close to 999997 +# by renaming relay logs and modifying index/info files +# +# Restart slave server +# +SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads; +SET @save_max_relay_log_size= @@GLOBAL.max_relay_log_size; +SET GLOBAL slave_parallel_threads=1; +SET GLOBAL max_relay_log_size=100 * 1024; +include/start_slave.inc +connection server_1; +create table t1 (i int, c varchar(1024)); +# +# Insert some data to generate enough amount of binary logs +# +connection server_2; +# +# Assert that 'slave-relay-bin.999999' is purged. +# +NOT FOUND /slave-relay-bin.999999/ in slave-relay-bin.index +include/stop_slave.inc +SET GLOBAL slave_parallel_threads= @save_slave_parallel_threads; +SET GLOBAL max_relay_log_size= @save_max_relay_log_size; +include/start_slave.inc +connection server_1; +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_relay_max_extension.test b/mysql-test/suite/rpl/t/rpl_relay_max_extension.test new file mode 100644 index 00000000000..e1e087f2e0e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relay_max_extension.test @@ -0,0 +1,109 @@ +# ==== Purpose ==== +# +# Test verifies that auto purging mechanism of relay logs works fine when the +# file extension grows beyond 999999. +# +# ==== Implementation ==== +# +# Steps: +# 0 - In master-slave setup clear all the relay logs on the slave server. +# 1 - Start the slave so that new relay logs starting from +# 'slave-relay-bin.000001' are created. +# 2 - Get the active relay-log file name by using SHOW SLAVE STATUS. +# Shutdown the slave server. +# 3 - Rename active relay log to '999997' in both 'relay-log.info' and +# 'slave-relay-bin.index' files. +# 4 - Restart the slave server by configuring 'slave_parallel_threads=1' +# and 'max_relay_log_size=100K'. +# 5 - Generate load on master such that few relay logs are generated on +# slave. The relay log sequence number will change to 7 digits. +# 6 - Sync slave with master to ensure that relay logs are applied on +# slave. They should have been automatically purged. +# 7 - Assert that there is no 'slave-relay-bin.999999' file in +# 'relay-log.info'. +# +# ==== References ==== +# +# MDEV-8134: The relay-log is not flushed after the slave-relay-log.999999 +# showed +# + +--source include/have_innodb.inc +--source include/have_binlog_format_row.inc +--let $rpl_topology=1->2 +--source include/rpl_init.inc + +--connection server_2 +--source include/stop_slave.inc +RESET SLAVE; +--source include/start_slave.inc +--source include/stop_slave.inc +--let $relay_log=query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1) + +--echo # +--echo # Stop slave server +--echo # + +--let $datadir = `select @@datadir` +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +--shutdown_server 10 +--source include/wait_until_disconnected.inc + +--exec sed -i "s/$relay_log/slave-relay-bin.999997/g" $datadir/relay-log.info +--exec sed -i "s/$relay_log/slave-relay-bin.999997/g" $datadir/slave-relay-bin.index + +--echo # +--echo # Simulate file number get close to 999997 +--echo # by renaming relay logs and modifying index/info files + +--move_file $datadir/$relay_log $datadir/slave-relay-bin.999997 + +--echo # +--echo # Restart slave server +--echo # + +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +--enable_reconnect +--source include/wait_until_connected_again.inc +SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads; +SET @save_max_relay_log_size= @@GLOBAL.max_relay_log_size; + +SET GLOBAL slave_parallel_threads=1; +SET GLOBAL max_relay_log_size=100 * 1024; +--source include/start_slave.inc + +--connection server_1 +create table t1 (i int, c varchar(1024)); +--echo # +--echo # Insert some data to generate enough amount of binary logs +--echo # +--let $count = 1000 +--disable_query_log +while ($count) +{ + eval insert into t1 values (1001 - $count, repeat('a',1000)); + dec $count; +} +--enable_query_log +--save_master_pos + +--connection server_2 +--sync_with_master + +--let $relay_log=query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1) + +--echo # +--echo # Assert that 'slave-relay-bin.999999' is purged. +--echo # +let SEARCH_FILE=$datadir/slave-relay-bin.index; +let SEARCH_PATTERN=slave-relay-bin.999999; +source include/search_pattern_in_file.inc; + +--source include/stop_slave.inc +SET GLOBAL slave_parallel_threads= @save_slave_parallel_threads; +SET GLOBAL max_relay_log_size= @save_max_relay_log_size; +--source include/start_slave.inc + +--connection server_1 +DROP TABLE t1; +--source include/rpl_end.inc -- cgit v1.2.1 From 7d528881496e761a6188edf17bf125163a765c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 22 Jan 2021 08:34:09 +0200 Subject: MDEV-23659 : Update Galera disabled.def file Update * galera/disabled.def * galera_3_nodes/disabled.def --- mysql-test/suite/galera/disabled.def | 4 ++++ mysql-test/suite/galera_3nodes/disabled.def | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index f53fbd2b08c..7fe03a94220 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -15,9 +15,12 @@ MW-328A : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 MW-328B : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002 MW-329 : MDEV-19962 Galera test failure on MW-329 galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event() +galera_bf_lock_wait : MDEV-24649 galera.galera_bf_lock_wait MTR failed with sigabrt: Assertion `!is_owned()' failed in sync0policy.ic on MutexDebug with Mutex = TTASEventMutex galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc galera_gcache_recover_manytrx : MDEV-18834 Galera test failure +galera_mdl_race : MDEV-21524: galera.galera_mdl_race MTR failed: query 'reap' succeeded - should have failed with errno 1213 galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails +galera_partition : MDEV-21806: galera.galera_partition MTR failed: failed to recover from DONOR state galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encrypt_with_key @@ -26,3 +29,4 @@ galera_wan : MDEV-17259 Test failure on galera.galera_wan partition : MDEV-19958 Galera test failure on galera.partition query_cache: MDEV-15805 Test failure on galera.query_cache sql_log_bin : MDEV-21491 galera.sql_log_bin +versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def index 0e2706f2dc3..884c2a8c82a 100644 --- a/mysql-test/suite/galera_3nodes/disabled.def +++ b/mysql-test/suite/galera_3nodes/disabled.def @@ -10,7 +10,15 @@ # ############################################################################## +GAL-501 : MDEV-24645 galera_3nodes.GAL-501 MTR failed: failed to open gcomm backend connection: 110 galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster +galera_ipv6_mariabackup : MDEV-24440: galera_3nodes.galera_ipv6_mariabackup MTR fails sporadically: Failed to read from: wsrep_sst_mariabackup --role 'donor' --address '[::1]:16028/xtrabackup_sst//1' +galera_ipv6_mariabackup_section : MDEV-22195: galera_3nodes.galera_ipv6_mariabackup_section MTR failed: assert_grep.inc failed +galera_ipv6_mysqldump : MDEV-24036: galera_3nodes.galera_ipv6_mysqldump: rare random crashes during shutdown +galera_ipv6_rsync_section : MDEV-23580: galera_3nodes.galera_ipv6_rsync_section MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(} -galera_slave_options_do :MDEV-8798 +galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query +galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query +galera_pc_bootstrap : MDEV-24650 galera_pc_bootstrap MTR failed: Could not execute 'check-testcase' before testcase +galera_slave_options_do : MDEV-8798 galera_slave_options_ignore : MDEV-8798 -- cgit v1.2.1 From 0d9c9f49bd62a86055aebc00a68f0e4645014637 Mon Sep 17 00:00:00 2001 From: Alice Sherepa Date: Thu, 21 Jan 2021 18:40:03 +0100 Subject: reenable rpl_spec_variables.test --- .../extra/rpl_tests/rpl_binlog_max_cache_size.test | 4 +- mysql-test/suite/rpl/disabled.def | 3 +- mysql-test/suite/rpl/r/rpl_spec_variables.result | 60 +++++++++++++++++++--- .../suite/rpl/t/rpl_spec_variables-slave.opt | 1 - mysql-test/suite/rpl/t/rpl_spec_variables.test | 8 ++- 5 files changed, 61 insertions(+), 15 deletions(-) delete mode 100644 mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test index 0f46b00f683..4c93ad86209 100644 --- a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test +++ b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test @@ -49,14 +49,14 @@ connection master; --echo *** Single statement on transactional table *** --disable_query_log ---error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE +--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE, 1534 eval INSERT INTO t1 (a, data) VALUES (1, CONCAT($data, $data, $data, $data, $data)); --enable_query_log --echo *** Single statement on non-transactional table *** --disable_query_log ---error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE +--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE, 1534 eval INSERT INTO t2 (a, data) VALUES (2, CONCAT($data, $data, $data, $data, $data, $data)); --enable_query_log diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def index 2bf2a69bd62..4508c8e4ca6 100644 --- a/mysql-test/suite/rpl/disabled.def +++ b/mysql-test/suite/rpl/disabled.def @@ -10,8 +10,7 @@ # ############################################################################## -rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux -#rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock +#rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table rpl_row_binlog_max_cache_size : MDEV-11092 rpl_row_index_choice : MDEV-11666 diff --git a/mysql-test/suite/rpl/r/rpl_spec_variables.result b/mysql-test/suite/rpl/r/rpl_spec_variables.result index 96f63a50ea9..8b4c398f308 100644 --- a/mysql-test/suite/rpl/r/rpl_spec_variables.result +++ b/mysql-test/suite/rpl/r/rpl_spec_variables.result @@ -2,14 +2,17 @@ include/master-slave.inc [connection master] * auto_increment_increment, auto_increment_offset * +connection master; SET @@global.auto_increment_increment=2; SET @@session.auto_increment_increment=2; SET @@global.auto_increment_offset=10; SET @@session.auto_increment_offset=10; +connection slave; SET @@global.auto_increment_increment=3; SET @@session.auto_increment_increment=3; SET @@global.auto_increment_offset=20; SET @@session.auto_increment_offset=20; +connection master; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; INSERT INTO t1 (b) VALUES ('master'); INSERT INTO t1 (b) VALUES ('master'); @@ -17,6 +20,7 @@ SELECT * FROM t1 ORDER BY a; a b 2 master 4 master +connection slave; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; INSERT INTO t1 (b) VALUES ('slave'); INSERT INTO t1 (b) VALUES ('slave'); @@ -32,102 +36,123 @@ SELECT * FROM t2 ORDER BY a; a b 1 slave 4 slave +connection master; DROP TABLE IF EXISTS t1,t2; SET @@global.auto_increment_increment=1; SET @@session.auto_increment_increment=1; SET @@global.auto_increment_offset=1; SET @@session.auto_increment_offset=1; +connection slave; SET @@global.auto_increment_increment=1; SET @@session.auto_increment_increment=1; SET @@global.auto_increment_offset=1; SET @@session.auto_increment_offset=1; +connection slave; SET auto_increment_increment=1; SET auto_increment_offset=1; * character_set_database, collation_server * +connection master; SET @restore_master_character_set_database=@@global.character_set_database; SET @restore_master_collation_server=@@global.collation_server; SET @@global.character_set_database=latin1; SET @@session.character_set_database=latin1; SET @@global.collation_server=latin1_german1_ci; SET @@session.collation_server=latin1_german1_ci; +connection slave; SET @restore_slave_character_set_database=@@global.character_set_database; SET @restore_slave_collation_server=@@global.collation_server; SET @@global.character_set_database=utf8; SET @@session.character_set_database=utf8; SET @@global.collation_server=utf8_bin; SET @@session.collation_server=utf8_bin; +connection master; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL, + `b` varchar(10) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +connection slave; CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, - `b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL, + `b` varchar(10) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci +) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( `a` int(11) NOT NULL, - `b` varchar(10) COLLATE utf8_bin DEFAULT NULL, + `b` varchar(10) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin +) ENGINE=MyISAM DEFAULT CHARSET=latin1 SET @@global.collation_server=latin1_swedish_ci; SET @@session.collation_server=latin1_swedish_ci; +connection master; SET @@global.collation_server=latin1_swedish_ci; SET @@session.collation_server=latin1_swedish_ci; DROP TABLE IF EXISTS t1,t2; * default_week_format * +connection master; SET @@global.default_week_format=0; SET @@session.default_week_format=0; +connection slave; SET @@global.default_week_format=1; SET @@session.default_week_format=1; +connection master; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (1, 'master ', WEEK('2008-01-07')); SELECT * FROM t1 ORDER BY a; a b c 1 master 1 +connection slave; INSERT INTO t1 VALUES (2, 'slave ', WEEK('2008-01-07')); SELECT * FROM t1 ORDER BY a; a b c 1 master 1 2 slave 2 +connection master; DROP TABLE t1; +connection slave; SET @@global.default_week_format=0; SET @@session.default_week_format=0; * local_infile * +connection slave; SET @@global.local_infile=0; +connection master; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(20), c CHAR(254)) ENGINE=MyISAM; LOAD DATA LOCAL INFILE 'FILE' INTO TABLE t1 (b); SELECT COUNT(*) FROM t1; COUNT(*) 70 +connection slave; LOAD DATA LOCAL INFILE 'FILE2' INTO TABLE t1 (b); -ERROR 42000: The used command is not allowed with this MySQL version +ERROR 42000: The used command is not allowed with this MariaDB version SELECT COUNT(*) FROM t1; COUNT(*) 70 SET @@global.local_infile=1; +connection master; DROP TABLE t1; * max_heap_table_size * +connection slave; SET @restore_slave_max_heap_table_size=@@global.max_heap_table_size; SET @@global.max_heap_table_size=16384; SET @@session.max_heap_table_size=16384; +connection master; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), c CHAR(254)) ENGINE=MEMORY; SELECT COUNT(*)=2000 FROM t1; COUNT(*)=2000 1 +connection slave; SELECT COUNT(*)=2000 FROM t1 WHERE b='master' GROUP BY b ORDER BY b; COUNT(*)=2000 1 @@ -137,18 +162,24 @@ COUNT(*)<2000 AND COUNT(*)>0 SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t2 WHERE b='slave' GROUP BY b ORDER BY b; COUNT(*)<2000 AND COUNT(*)>0 1 +connection master; DROP TABLE IF EXISTS t1,t2; * storage_engine * +connection master; SET @restore_master_storage_engine=@@global.storage_engine; SET @@global.storage_engine=InnoDB; SET @@session.storage_engine=InnoDB; +connection slave; SET @restore_slave_storage_engine=@@global.storage_engine; SET @@global.storage_engine=Memory; SET @@session.storage_engine=Memory; +connection master; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; +connection slave; CREATE TABLE t3 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); +connection master; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -163,6 +194,7 @@ t2 CREATE TABLE `t2` ( `b` varchar(10) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +connection slave; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -186,37 +218,49 @@ t3 CREATE TABLE `t3` ( ) ENGINE=MEMORY DEFAULT CHARSET=latin1 SET @@global.storage_engine=InnoDB; SET @@session.storage_engine=InnoDB; +connection master; DROP TABLE IF EXISTS t1,t2,t3; * sql_mode * +connection master; +SET @old_sql_mode_master= @@global.sql_mode; SET @@global.sql_mode=ANSI; SET @@session.sql_mode=ANSI; +connection slave; +SET @old_sql_mode_slave= @@global.sql_mode; SET @@global.sql_mode=TRADITIONAL; SET @@session.sql_mode=TRADITIONAL; +connection master; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c DATE); INSERT INTO t1 VALUES (1, 'master', '0000-00-00'); SELECT * FROM t1 ORDER BY a; a b c 1 master 0000-00-00 +connection slave; INSERT INTO t1 VALUES (1, 'slave', '0000-00-00'); -ERROR 22007: Incorrect date value: '0000-00-00' for column 'c' at row 1 +ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`c` at row 1 SELECT * FROM t1 ORDER BY a; a b c 1 master 0000-00-00 SET @@global.sql_mode=''; SET @@session.sql_mode=''; +connection master; SET @@global.sql_mode=''; SET @@session.sql_mode=''; DROP TABLE t1; *** clean up *** +connection master; SET @@global.character_set_database=@restore_master_character_set_database; SET @@global.collation_server=@restore_master_collation_server; SET @@global.storage_engine=@restore_master_storage_engine; +SET @@global.sql_mode=@old_sql_mode_master; +connection slave; SET @@global.character_set_database=@restore_slave_character_set_database; SET @@global.collation_server=@restore_slave_collation_server; SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size; SET @@global.storage_engine=@restore_slave_storage_engine; +SET @@global.sql_mode=@old_sql_mode_slave; call mtr.add_suppression("The table 't[12]' is full"); include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt b/mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/suite/rpl/t/rpl_spec_variables.test b/mysql-test/suite/rpl/t/rpl_spec_variables.test index 2cb580fce83..e2d5175036c 100644 --- a/mysql-test/suite/rpl/t/rpl_spec_variables.test +++ b/mysql-test/suite/rpl/t/rpl_spec_variables.test @@ -260,10 +260,12 @@ DROP TABLE IF EXISTS t1,t2,t3; --echo * sql_mode * --connection master +SET @old_sql_mode_master= @@global.sql_mode; SET @@global.sql_mode=ANSI; SET @@session.sql_mode=ANSI; --connection slave +SET @old_sql_mode_slave= @@global.sql_mode; SET @@global.sql_mode=TRADITIONAL; SET @@session.sql_mode=TRADITIONAL; @@ -292,14 +294,16 @@ DROP TABLE t1; SET @@global.character_set_database=@restore_master_character_set_database; SET @@global.collation_server=@restore_master_collation_server; SET @@global.storage_engine=@restore_master_storage_engine; +SET @@global.sql_mode=@old_sql_mode_master; --sync_slave_with_master SET @@global.character_set_database=@restore_slave_character_set_database; SET @@global.collation_server=@restore_slave_collation_server; SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size; SET @@global.storage_engine=@restore_slave_storage_engine; - +SET @@global.sql_mode=@old_sql_mode_slave; # Put at the end since the test otherwise emptied the table. - +remove_file $MYSQLTEST_VARDIR/tmp/words.dat; +remove_file $MYSQLTEST_VARDIR/tmp/words2.dat; --echo call mtr.add_suppression("The table 't[12]' is full"); -- cgit v1.2.1 From 59e6d14c47aa87fcd61a60c8d4b73d66d7247557 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 5 Nov 2020 13:37:35 +1100 Subject: MDEV-24122: on previously MySQL-5.7 datadirs, adjust mysql.user column order MDEV-23201 correctly reordered columns in mysql.user table when upgrading from MySQL-5.7 Here we also correctly reorder columns in mysql.user table from an invalid order caused by an upgrade from MySQL-5.7 to MariaDB-before-MDEV-23201. --- mysql-test/r/mysql_upgrade.result | 130 +++++++++++++++++++++++++++++++++++++- mysql-test/t/mysql_upgrade.test | 30 +++++++++ 2 files changed, 158 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index a3e88765554..3961c7e8c27 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -711,9 +711,9 @@ user CREATE TABLE `user` ( `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, - `password_last_changed` timestamp NULL DEFAULT NULL, + `password_last_changed` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `password_lifetime` smallint(5) unsigned DEFAULT NULL, - `account_locked` enum('N','Y') COLLATE utf8_bin NOT NULL DEFAULT 'N', + `account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' CREATE ROLE `aRole`; @@ -726,6 +726,132 @@ mysql.session N root N mysql.sys N aRole Y +DROP ROLE aRole; +# +# MDEV-24122: Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201 +# +# +DROP TABLE IF EXISTS mysql.user; +FLUSH TABLES mysql.user; +ALTER TABLE mysql.user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; +ALTER TABLE mysql.user ADD default_role char(80) binary DEFAULT '' NOT NULL; +ALTER TABLE mysql.user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL; +FLUSH PRIVILEGES; +Phase 1/7: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.index_stats OK +mysql.innodb_index_stats OK +mysql.innodb_table_stats OK +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK +Phase 2/7: Installing used storage engines... Skipped +Phase 3/7: Fixing views +Phase 4/7: Running 'mysql_fix_privilege_tables' +Phase 5/7: Fixing table and database names +Phase 6/7: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +Phase 7/7: Running 'FLUSH PRIVILEGES' +OK +SHOW CREATE TABLE mysql.user; +Table Create Table +user CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT 0, + `max_updates` int(11) unsigned NOT NULL DEFAULT 0, + `max_connections` int(11) unsigned NOT NULL DEFAULT 0, + `max_user_connections` int(11) NOT NULL DEFAULT 0, + `plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '', + `authentication_string` text COLLATE utf8_bin NOT NULL, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', + `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, + `password_last_changed` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `password_lifetime` smallint(5) unsigned DEFAULT NULL, + `account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' +CREATE ROLE `aRole`; +SET DEFAULT ROLE aRole; +SHOW GRANTS; +Grants for root@localhost +GRANT aRole TO 'root'@'localhost' WITH ADMIN OPTION +GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO 'aRole' +SET DEFAULT ROLE aRole FOR 'root'@'localhost' +SET DEFAULT ROLE NONE; +SHOW GRANTS; +Grants for root@localhost +GRANT aRole TO 'root'@'localhost' WITH ADMIN OPTION +GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO 'aRole' DROP ROLE `aRole`; FLUSH PRIVILEGES; End of 10.2 tests diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test index a6702f91aa6..c116af860a6 100644 --- a/mysql-test/t/mysql_upgrade.test +++ b/mysql-test/t/mysql_upgrade.test @@ -246,6 +246,36 @@ FLUSH PRIVILEGES; SET ROLE `aRole`; SELECT `User`, `is_role` FROM `mysql`.`user`; +DROP ROLE aRole; + +--echo # +--echo # MDEV-24122: Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201 +--echo # +--echo # + +# For 10.4 merge - dropping the view. +# DROP VIEW IF EXISTS mysql.user; +DROP TABLE IF EXISTS mysql.user; +--copy_file std_data/mysql57user.frm $MYSQLD_DATADIR/mysql/user.frm +--copy_file std_data/mysql57user.MYI $MYSQLD_DATADIR/mysql/user.MYI +--copy_file std_data/mysql57user.MYD $MYSQLD_DATADIR/mysql/user.MYD +FLUSH TABLES mysql.user; + +# What prior to MDEV-23201 would of done: +ALTER TABLE mysql.user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL; +ALTER TABLE mysql.user ADD default_role char(80) binary DEFAULT '' NOT NULL; +ALTER TABLE mysql.user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL; +FLUSH PRIVILEGES; + +--exec $MYSQL_UPGRADE --force 2>&1 +SHOW CREATE TABLE mysql.user; + +CREATE ROLE `aRole`; +SET DEFAULT ROLE aRole; +SHOW GRANTS; +SET DEFAULT ROLE NONE; +SHOW GRANTS; + DROP ROLE `aRole`; --exec $MYSQL mysql < $MYSQLTEST_VARDIR/tmp/user.sql FLUSH PRIVILEGES; -- cgit v1.2.1 From 4a7e62296a295758b128d20f6bbb0973b94c5193 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 18 Jan 2021 11:22:48 +0100 Subject: don't allow `KILL QUERY ID USER xxx` --- mysql-test/r/kill.result | 5 +++++ mysql-test/t/kill.test | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index e3fbb830df5..bda6bddb7de 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -415,3 +415,8 @@ ALTER TABLE t2 DROP c; UNLOCK TABLES; DROP VIEW v1; DROP TABLE t1, t2; +# +# KILL QUERY ID USER +# +kill query id user 'foo'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''foo'' at line 1 diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index 78de8a784f3..6eb9d55f9b8 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -663,3 +663,9 @@ ALTER TABLE t2 DROP c; UNLOCK TABLES; DROP VIEW v1; DROP TABLE t1, t2; + +--echo # +--echo # KILL QUERY ID USER +--echo # +--error ER_PARSE_ERROR +kill query id user 'foo'; -- cgit v1.2.1 From 6a1cb449feb1b77e5ec94904c228d7c5477f528a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 18 Jan 2021 18:02:16 +0100 Subject: cleanup: remove slave background thread, use handle_manager thread instead --- mysql-test/suite/perfschema/r/threads_mysql.result | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/perfschema/r/threads_mysql.result b/mysql-test/suite/perfschema/r/threads_mysql.result index 9f9c46fe6a6..169c22fb7a2 100644 --- a/mysql-test/suite/perfschema/r/threads_mysql.result +++ b/mysql-test/suite/perfschema/r/threads_mysql.result @@ -17,6 +17,16 @@ processlist_info NULL unified_parent_thread_id NULL role NULL instrumented YES +name thread/sql/manager +type BACKGROUND +processlist_user NULL +processlist_host NULL +processlist_db NULL +processlist_command NULL +processlist_info NULL +unified_parent_thread_id unified parent_thread_id +role NULL +instrumented YES name thread/sql/one_connection type FOREGROUND processlist_user root @@ -44,16 +54,6 @@ processlist_info NULL unified_parent_thread_id unified parent_thread_id role NULL instrumented YES -name thread/sql/slave_background -type BACKGROUND -processlist_user NULL -processlist_host NULL -processlist_db NULL -processlist_command NULL -processlist_info NULL -unified_parent_thread_id unified parent_thread_id -role NULL -instrumented YES CREATE TEMPORARY TABLE t1 AS SELECT thread_id FROM performance_schema.threads WHERE name LIKE 'thread/sql%'; @@ -113,7 +113,7 @@ WHERE t1.name LIKE 'thread/sql%' ORDER BY parent_thread_name, child_thread_name; parent_thread_name child_thread_name thread/sql/event_scheduler thread/sql/event_worker +thread/sql/main thread/sql/manager thread/sql/main thread/sql/one_connection thread/sql/main thread/sql/signal_handler -thread/sql/main thread/sql/slave_background thread/sql/one_connection thread/sql/event_scheduler -- cgit v1.2.1 From 1a99958545f923f39344abe8b57bc80a2072510d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 22 Jan 2021 13:43:06 +0100 Subject: mtr: --client-gdb='' --- mysql-test/mysql-test-run.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7b73782eedc..05ceab98d7e 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1323,7 +1323,7 @@ sub command_line_setup { 'rr' => \$opt_rr, 'rr-arg=s' => \@rr_record_args, 'rr-dir=s' => \$opt_rr_dir, - 'client-gdb' => \$opt_client_gdb, + 'client-gdb=s' => \$opt_client_gdb, 'manual-gdb' => \$opt_manual_gdb, 'manual-lldb' => \$opt_manual_lldb, 'boot-gdb' => \$opt_boot_gdb, @@ -1420,7 +1420,7 @@ sub command_line_setup { ); # fix options (that take an optional argument and *only* after = sign - my %fixopt = ( '--gdb' => '--gdb=#' ); + my %fixopt = ( '--gdb' => '--gdb=#', '--client-gdb' => '--client-gdb=#' ); @ARGV = map { $fixopt{$_} or $_ } @ARGV; GetOptions(%options) or usage("Can't read options"); usage("") if $opt_usage; @@ -6064,7 +6064,11 @@ sub gdb_arguments { $input = $input ? "< $input" : ""; if ($type eq 'client') { - mtr_tofile($gdb_init_file, "set args @$$args $input"); + mtr_tofile($gdb_init_file, + join("\n", + "set args @$$args $input", + split /;/, $opt_client_gdb || "" + )); } elsif ($opt_valgrind_mysqld) { my $v = $$exe; my $vargs = []; -- cgit v1.2.1 From c58d2c941c49550a85d610b1ad7b51cf0d4cd8db Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 22 Jan 2021 16:03:07 +1100 Subject: MDEV-20939: Race condition between mysqldump import and InnoDB persistent statistics calculation mysqldump --system=stats and --system=timezones by default used ordinary INSERT statements populate EITS, innodb stats, and timezone tables. As these all have primary keys it could result in conflict. The behavior desired with --system= is to replace the tables. As such we assume --replace for the purposes of stats and timezone tables there if --insert-ignore isn't specified. --- mysql-test/r/mysqldump-system.result | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump-system.result b/mysql-test/r/mysqldump-system.result index 88cf950c621..74cfc4e9882 100644 --- a/mysql-test/r/mysqldump-system.result +++ b/mysql-test/r/mysqldump-system.result @@ -85,31 +85,31 @@ USE mysql; LOCK TABLES `column_stats` WRITE; /*!40000 ALTER TABLE `column_stats` DISABLE KEYS */; -INSERT INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,0,NULL,NULL); +REPLACE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,0,NULL,NULL); /*!40000 ALTER TABLE `column_stats` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `index_stats` WRITE; /*!40000 ALTER TABLE `index_stats` DISABLE KEYS */; -INSERT INTO `index_stats` VALUES ('mysql','tz','PRIMARY',1,98.2500); +REPLACE INTO `index_stats` VALUES ('mysql','tz','PRIMARY',1,98.2500); /*!40000 ALTER TABLE `index_stats` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `table_stats` WRITE; /*!40000 ALTER TABLE `table_stats` DISABLE KEYS */; -INSERT INTO `table_stats` VALUES ('mysql','tz',393); +REPLACE INTO `table_stats` VALUES ('mysql','tz',393); /*!40000 ALTER TABLE `table_stats` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `innodb_index_stats` WRITE; /*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */; -INSERT INTO `innodb_index_stats` VALUES ('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index'); +REPLACE INTO `innodb_index_stats` VALUES ('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index'); /*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `innodb_table_stats` WRITE; /*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */; -INSERT INTO `innodb_table_stats` VALUES ('mysql','tz','2019-12-31 21:00:00',393,1,0); +REPLACE INTO `innodb_table_stats` VALUES ('mysql','tz','2019-12-31 21:00:00',393,1,0); /*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */; UNLOCK TABLES; @@ -117,31 +117,31 @@ USE mysql; LOCK TABLES `time_zone` WRITE; /*!40000 ALTER TABLE `time_zone` DISABLE KEYS */; -INSERT INTO `time_zone` VALUES (1,'N'),(2,'N'),(3,'N'),(4,'Y'),(5,'N'); +REPLACE INTO `time_zone` VALUES (1,'N'),(2,'N'),(3,'N'),(4,'Y'),(5,'N'); /*!40000 ALTER TABLE `time_zone` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `time_zone_name` WRITE; /*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */; -INSERT INTO `time_zone_name` VALUES ('Europe/Moscow',3),('Japan',5),('leap/Europe/Moscow',4),('MET',1),('Universal',2),('UTC',2); +REPLACE INTO `time_zone_name` VALUES ('Europe/Moscow',3),('Japan',5),('leap/Europe/Moscow',4),('MET',1),('Universal',2),('UTC',2); /*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `time_zone_leap_second` WRITE; /*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */; -INSERT INTO `time_zone_leap_second` VALUES (78796800,1),(94694401,2),(126230402,3),(157766403,4),(189302404,5),(220924805,6),(252460806,7),(283996807,8),(315532808,9),(362793609,10),(394329610,11),(425865611,12),(489024012,13),(567993613,14),(631152014,15),(662688015,16),(709948816,17),(741484817,18),(773020818,19),(820454419,20),(867715220,21),(915148821,22); +REPLACE INTO `time_zone_leap_second` VALUES (78796800,1),(94694401,2),(126230402,3),(157766403,4),(189302404,5),(220924805,6),(252460806,7),(283996807,8),(315532808,9),(362793609,10),(394329610,11),(425865611,12),(489024012,13),(567993613,14),(631152014,15),(662688015,16),(709948816,17),(741484817,18),(773020818,19),(820454419,20),(867715220,21),(915148821,22); /*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `time_zone_transition` WRITE; /*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */; -INSERT INTO `time_zone_transition` VALUES (1,-1693706400,0),(1,-1680483600,1),(1,-1663455600,2),(1,-1650150000,3),(1,-1632006000,2),(1,-1618700400,3),(1,-938905200,2),(1,-857257200,3),(1,-844556400,2),(1,-828226800,3),(1,-812502000,2),(1,-796777200,3),(1,228877200,2),(1,243997200,3),(1,260326800,2),(1,276051600,3),(1,291776400,2),(1,307501200,3),(1,323830800,2),(1,338950800,3),(1,354675600,2),(1,370400400,3),(1,386125200,2),(1,401850000,3),(1,417574800,2),(1,433299600,3),(1,449024400,2),(1,465354000,3),(1,481078800,2),(1,496803600,3),(1,512528400,2),(1,528253200,3),(1,543978000,2),(1,559702800,3),(1,575427600,2),(1,591152400,3),(1,606877200,2),(1,622602000,3),(1,638326800,2),(1,654656400,3),(1,670381200,2),(1,686106000,3),(1,701830800,2),(1,717555600,3),(1,733280400,2),(1,749005200,3),(1,764730000,2),(1,780454800,3),(1,796179600,2),(1,811904400,3),(1,828234000,2),(1,846378000,3),(1,859683600,2),(1,877827600,3),(1,891133200,2),(1,909277200,3),(1,922582800,2),(1,941331600,3),(1,954032400,2),(1,972781200,3),(1,985482000,2),(1,1004230800,3),(1,1017536400,2),(1,1035680400,3),(1,1048986000,2),(1,1067130000,3),(1,1080435600,2),(1,1099184400,3),(1,1111885200,2),(1,1130634000,3),(1,1143334800,2),(1,1162083600,3),(1,1174784400,2),(1,1193533200,3),(1,1206838800,2),(1,1224982800,3),(1,1238288400,2),(1,1256432400,3),(1,1269738000,2),(1,1288486800,3),(1,1301187600,2),(1,1319936400,3),(1,1332637200,2),(1,1351386000,3),(1,1364691600,2),(1,1382835600,3),(1,1396141200,2),(1,1414285200,3),(1,1427590800,2),(1,1445734800,3),(1,1459040400,2),(1,1477789200,3),(1,1490490000,2),(1,1509238800,3),(1,1521939600,2),(1,1540688400,3),(1,1553994000,2),(1,1572138000,3),(1,1585443600,2),(1,1603587600,3),(1,1616893200,2),(1,1635642000,3),(1,1648342800,2),(1,1667091600,3),(1,1679792400,2),(1,1698541200,3),(1,1711846800,2),(1,1729990800,3),(1,1743296400,2),(1,1761440400,3),(1,1774746000,2),(1,1792890000,3),(1,1806195600,2),(1,1824944400,3),(1,1837645200,2),(1,1856394000,3),(1,1869094800,2),(1,1887843600,3),(1,1901149200,2),(1,1919293200,3),(1,1932598800,2),(1,1950742800,3),(1,1964048400,2),(1,1982797200,3),(1,1995498000,2),(1,2014246800,3),(1,2026947600,2),(1,2045696400,3),(1,2058397200,2),(1,2077146000,3),(1,2090451600,2),(1,2108595600,3),(1,2121901200,2),(1,2140045200,3),(3,-1688265000,2),(3,-1656819048,1),(3,-1641353448,2),(3,-1627965048,3),(3,-1618716648,1),(3,-1596429048,3),(3,-1593829848,5),(3,-1589860800,4),(3,-1542427200,5),(3,-1539493200,6),(3,-1525323600,5),(3,-1522728000,4),(3,-1491188400,7),(3,-1247536800,4),(3,354920400,5),(3,370728000,4),(3,386456400,5),(3,402264000,4),(3,417992400,5),(3,433800000,4),(3,449614800,5),(3,465346800,8),(3,481071600,9),(3,496796400,8),(3,512521200,9),(3,528246000,8),(3,543970800,9),(3,559695600,8),(3,575420400,9),(3,591145200,8),(3,606870000,9),(3,622594800,8),(3,638319600,9),(3,654649200,8),(3,670374000,10),(3,686102400,11),(3,695779200,8),(3,701812800,5),(3,717534000,4),(3,733273200,9),(3,748998000,8),(3,764722800,9),(3,780447600,8),(3,796172400,9),(3,811897200,8),(3,828226800,9),(3,846370800,8),(3,859676400,9),(3,877820400,8),(3,891126000,9),(3,909270000,8),(3,922575600,9),(3,941324400,8),(3,954025200,9),(3,972774000,8),(3,985474800,9),(3,1004223600,8),(3,1017529200,9),(3,1035673200,8),(3,1048978800,9),(3,1067122800,8),(3,1080428400,9),(3,1099177200,8),(3,1111878000,9),(3,1130626800,8),(3,1143327600,9),(3,1162076400,8),(3,1174777200,9),(3,1193526000,8),(3,1206831600,9),(3,1224975600,8),(3,1238281200,9),(3,1256425200,8),(3,1269730800,9),(3,1288479600,8),(3,1301180400,9),(3,1319929200,8),(3,1332630000,9),(3,1351378800,8),(3,1364684400,9),(3,1382828400,8),(3,1396134000,9),(3,1414278000,8),(3,1427583600,9),(3,1445727600,8),(3,1459033200,9),(3,1477782000,8),(3,1490482800,9),(3,1509231600,8),(3,1521932400,9),(3,1540681200,8),(3,1553986800,9),(3,1572130800,8),(3,1585436400,9),(3,1603580400,8),(3,1616886000,9),(3,1635634800,8),(3,1648335600,9),(3,1667084400,8),(3,1679785200,9),(3,1698534000,8),(3,1711839600,9),(3,1729983600,8),(3,1743289200,9),(3,1761433200,8),(3,1774738800,9),(3,1792882800,8),(3,1806188400,9),(3,1824937200,8),(3,1837638000,9),(3,1856386800,8),(3,1869087600,9),(3,1887836400,8),(3,1901142000,9),(3,1919286000,8),(3,1932591600,9),(3,1950735600,8),(3,1964041200,9),(3,1982790000,8),(3,1995490800,9),(3,2014239600,8),(3,2026940400,9),(3,2045689200,8),(3,2058390000,9),(3,2077138800,8),(3,2090444400,9),(3,2108588400,8),(3,2121894000,9),(3,2140038000,8),(4,-1688265000,2),(4,-1656819048,1),(4,-1641353448,2),(4,-1627965048,3),(4,-1618716648,1),(4,-1596429048,3),(4,-1593829848,5),(4,-1589860800,4),(4,-1542427200,5),(4,-1539493200,6),(4,-1525323600,5),(4,-1522728000,4),(4,-1491188400,7),(4,-1247536800,4),(4,354920409,5),(4,370728010,4),(4,386456410,5),(4,402264011,4),(4,417992411,5),(4,433800012,4),(4,449614812,5),(4,465346812,8),(4,481071612,9),(4,496796413,8),(4,512521213,9),(4,528246013,8),(4,543970813,9),(4,559695613,8),(4,575420414,9),(4,591145214,8),(4,606870014,9),(4,622594814,8),(4,638319615,9),(4,654649215,8),(4,670374016,10),(4,686102416,11),(4,695779216,8),(4,701812816,5),(4,717534017,4),(4,733273217,9),(4,748998018,8),(4,764722818,9),(4,780447619,8),(4,796172419,9),(4,811897219,8),(4,828226820,9),(4,846370820,8),(4,859676420,9),(4,877820421,8),(4,891126021,9),(4,909270021,8),(4,922575622,9),(4,941324422,8),(4,954025222,9),(4,972774022,8),(4,985474822,9),(4,1004223622,8),(4,1017529222,9),(4,1035673222,8),(4,1048978822,9),(4,1067122822,8),(4,1080428422,9),(4,1099177222,8),(4,1111878022,9),(4,1130626822,8),(4,1143327622,9),(4,1162076422,8),(4,1174777222,9),(4,1193526022,8),(4,1206831622,9),(4,1224975622,8),(4,1238281222,9),(4,1256425222,8),(4,1269730822,9),(4,1288479622,8),(4,1301180422,9),(4,1319929222,8),(4,1332630022,9),(4,1351378822,8),(4,1364684422,9),(4,1382828422,8),(4,1396134022,9),(4,1414278022,8),(4,1427583622,9),(4,1445727622,8),(4,1459033222,9),(4,1477782022,8),(4,1490482822,9),(4,1509231622,8),(4,1521932422,9),(4,1540681222,8),(4,1553986822,9),(4,1572130822,8),(4,1585436422,9),(4,1603580422,8),(4,1616886022,9),(4,1635634822,8),(4,1648335622,9),(4,1667084422,8),(4,1679785222,9),(4,1698534022,8),(4,1711839622,9),(4,1729983622,8),(4,1743289222,9),(4,1761433222,8),(4,1774738822,9),(4,1792882822,8),(4,1806188422,9),(4,1824937222,8),(4,1837638022,9),(4,1856386822,8),(4,1869087622,9),(4,1887836422,8),(4,1901142022,9),(4,1919286022,8),(4,1932591622,9),(4,1950735622,8),(4,1964041222,9),(4,1982790022,8),(4,1995490822,9),(4,2014239622,8),(4,2026940422,9),(4,2045689222,8),(4,2058390022,9),(4,2077138822,8),(4,2090444422,9),(4,2108588422,8),(4,2121894022,9),(4,2140038022,8),(5,-1009875600,1); +REPLACE INTO `time_zone_transition` VALUES (1,-1693706400,0),(1,-1680483600,1),(1,-1663455600,2),(1,-1650150000,3),(1,-1632006000,2),(1,-1618700400,3),(1,-938905200,2),(1,-857257200,3),(1,-844556400,2),(1,-828226800,3),(1,-812502000,2),(1,-796777200,3),(1,228877200,2),(1,243997200,3),(1,260326800,2),(1,276051600,3),(1,291776400,2),(1,307501200,3),(1,323830800,2),(1,338950800,3),(1,354675600,2),(1,370400400,3),(1,386125200,2),(1,401850000,3),(1,417574800,2),(1,433299600,3),(1,449024400,2),(1,465354000,3),(1,481078800,2),(1,496803600,3),(1,512528400,2),(1,528253200,3),(1,543978000,2),(1,559702800,3),(1,575427600,2),(1,591152400,3),(1,606877200,2),(1,622602000,3),(1,638326800,2),(1,654656400,3),(1,670381200,2),(1,686106000,3),(1,701830800,2),(1,717555600,3),(1,733280400,2),(1,749005200,3),(1,764730000,2),(1,780454800,3),(1,796179600,2),(1,811904400,3),(1,828234000,2),(1,846378000,3),(1,859683600,2),(1,877827600,3),(1,891133200,2),(1,909277200,3),(1,922582800,2),(1,941331600,3),(1,954032400,2),(1,972781200,3),(1,985482000,2),(1,1004230800,3),(1,1017536400,2),(1,1035680400,3),(1,1048986000,2),(1,1067130000,3),(1,1080435600,2),(1,1099184400,3),(1,1111885200,2),(1,1130634000,3),(1,1143334800,2),(1,1162083600,3),(1,1174784400,2),(1,1193533200,3),(1,1206838800,2),(1,1224982800,3),(1,1238288400,2),(1,1256432400,3),(1,1269738000,2),(1,1288486800,3),(1,1301187600,2),(1,1319936400,3),(1,1332637200,2),(1,1351386000,3),(1,1364691600,2),(1,1382835600,3),(1,1396141200,2),(1,1414285200,3),(1,1427590800,2),(1,1445734800,3),(1,1459040400,2),(1,1477789200,3),(1,1490490000,2),(1,1509238800,3),(1,1521939600,2),(1,1540688400,3),(1,1553994000,2),(1,1572138000,3),(1,1585443600,2),(1,1603587600,3),(1,1616893200,2),(1,1635642000,3),(1,1648342800,2),(1,1667091600,3),(1,1679792400,2),(1,1698541200,3),(1,1711846800,2),(1,1729990800,3),(1,1743296400,2),(1,1761440400,3),(1,1774746000,2),(1,1792890000,3),(1,1806195600,2),(1,1824944400,3),(1,1837645200,2),(1,1856394000,3),(1,1869094800,2),(1,1887843600,3),(1,1901149200,2),(1,1919293200,3),(1,1932598800,2),(1,1950742800,3),(1,1964048400,2),(1,1982797200,3),(1,1995498000,2),(1,2014246800,3),(1,2026947600,2),(1,2045696400,3),(1,2058397200,2),(1,2077146000,3),(1,2090451600,2),(1,2108595600,3),(1,2121901200,2),(1,2140045200,3),(3,-1688265000,2),(3,-1656819048,1),(3,-1641353448,2),(3,-1627965048,3),(3,-1618716648,1),(3,-1596429048,3),(3,-1593829848,5),(3,-1589860800,4),(3,-1542427200,5),(3,-1539493200,6),(3,-1525323600,5),(3,-1522728000,4),(3,-1491188400,7),(3,-1247536800,4),(3,354920400,5),(3,370728000,4),(3,386456400,5),(3,402264000,4),(3,417992400,5),(3,433800000,4),(3,449614800,5),(3,465346800,8),(3,481071600,9),(3,496796400,8),(3,512521200,9),(3,528246000,8),(3,543970800,9),(3,559695600,8),(3,575420400,9),(3,591145200,8),(3,606870000,9),(3,622594800,8),(3,638319600,9),(3,654649200,8),(3,670374000,10),(3,686102400,11),(3,695779200,8),(3,701812800,5),(3,717534000,4),(3,733273200,9),(3,748998000,8),(3,764722800,9),(3,780447600,8),(3,796172400,9),(3,811897200,8),(3,828226800,9),(3,846370800,8),(3,859676400,9),(3,877820400,8),(3,891126000,9),(3,909270000,8),(3,922575600,9),(3,941324400,8),(3,954025200,9),(3,972774000,8),(3,985474800,9),(3,1004223600,8),(3,1017529200,9),(3,1035673200,8),(3,1048978800,9),(3,1067122800,8),(3,1080428400,9),(3,1099177200,8),(3,1111878000,9),(3,1130626800,8),(3,1143327600,9),(3,1162076400,8),(3,1174777200,9),(3,1193526000,8),(3,1206831600,9),(3,1224975600,8),(3,1238281200,9),(3,1256425200,8),(3,1269730800,9),(3,1288479600,8),(3,1301180400,9),(3,1319929200,8),(3,1332630000,9),(3,1351378800,8),(3,1364684400,9),(3,1382828400,8),(3,1396134000,9),(3,1414278000,8),(3,1427583600,9),(3,1445727600,8),(3,1459033200,9),(3,1477782000,8),(3,1490482800,9),(3,1509231600,8),(3,1521932400,9),(3,1540681200,8),(3,1553986800,9),(3,1572130800,8),(3,1585436400,9),(3,1603580400,8),(3,1616886000,9),(3,1635634800,8),(3,1648335600,9),(3,1667084400,8),(3,1679785200,9),(3,1698534000,8),(3,1711839600,9),(3,1729983600,8),(3,1743289200,9),(3,1761433200,8),(3,1774738800,9),(3,1792882800,8),(3,1806188400,9),(3,1824937200,8),(3,1837638000,9),(3,1856386800,8),(3,1869087600,9),(3,1887836400,8),(3,1901142000,9),(3,1919286000,8),(3,1932591600,9),(3,1950735600,8),(3,1964041200,9),(3,1982790000,8),(3,1995490800,9),(3,2014239600,8),(3,2026940400,9),(3,2045689200,8),(3,2058390000,9),(3,2077138800,8),(3,2090444400,9),(3,2108588400,8),(3,2121894000,9),(3,2140038000,8),(4,-1688265000,2),(4,-1656819048,1),(4,-1641353448,2),(4,-1627965048,3),(4,-1618716648,1),(4,-1596429048,3),(4,-1593829848,5),(4,-1589860800,4),(4,-1542427200,5),(4,-1539493200,6),(4,-1525323600,5),(4,-1522728000,4),(4,-1491188400,7),(4,-1247536800,4),(4,354920409,5),(4,370728010,4),(4,386456410,5),(4,402264011,4),(4,417992411,5),(4,433800012,4),(4,449614812,5),(4,465346812,8),(4,481071612,9),(4,496796413,8),(4,512521213,9),(4,528246013,8),(4,543970813,9),(4,559695613,8),(4,575420414,9),(4,591145214,8),(4,606870014,9),(4,622594814,8),(4,638319615,9),(4,654649215,8),(4,670374016,10),(4,686102416,11),(4,695779216,8),(4,701812816,5),(4,717534017,4),(4,733273217,9),(4,748998018,8),(4,764722818,9),(4,780447619,8),(4,796172419,9),(4,811897219,8),(4,828226820,9),(4,846370820,8),(4,859676420,9),(4,877820421,8),(4,891126021,9),(4,909270021,8),(4,922575622,9),(4,941324422,8),(4,954025222,9),(4,972774022,8),(4,985474822,9),(4,1004223622,8),(4,1017529222,9),(4,1035673222,8),(4,1048978822,9),(4,1067122822,8),(4,1080428422,9),(4,1099177222,8),(4,1111878022,9),(4,1130626822,8),(4,1143327622,9),(4,1162076422,8),(4,1174777222,9),(4,1193526022,8),(4,1206831622,9),(4,1224975622,8),(4,1238281222,9),(4,1256425222,8),(4,1269730822,9),(4,1288479622,8),(4,1301180422,9),(4,1319929222,8),(4,1332630022,9),(4,1351378822,8),(4,1364684422,9),(4,1382828422,8),(4,1396134022,9),(4,1414278022,8),(4,1427583622,9),(4,1445727622,8),(4,1459033222,9),(4,1477782022,8),(4,1490482822,9),(4,1509231622,8),(4,1521932422,9),(4,1540681222,8),(4,1553986822,9),(4,1572130822,8),(4,1585436422,9),(4,1603580422,8),(4,1616886022,9),(4,1635634822,8),(4,1648335622,9),(4,1667084422,8),(4,1679785222,9),(4,1698534022,8),(4,1711839622,9),(4,1729983622,8),(4,1743289222,9),(4,1761433222,8),(4,1774738822,9),(4,1792882822,8),(4,1806188422,9),(4,1824937222,8),(4,1837638022,9),(4,1856386822,8),(4,1869087622,9),(4,1887836422,8),(4,1901142022,9),(4,1919286022,8),(4,1932591622,9),(4,1950735622,8),(4,1964041222,9),(4,1982790022,8),(4,1995490822,9),(4,2014239622,8),(4,2026940422,9),(4,2045689222,8),(4,2058390022,9),(4,2077138822,8),(4,2090444422,9),(4,2108588422,8),(4,2121894022,9),(4,2140038022,8),(5,-1009875600,1); /*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */; UNLOCK TABLES; LOCK TABLES `time_zone_transition_type` WRITE; /*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */; -INSERT INTO `time_zone_transition_type` VALUES (1,0,7200,1,'MEST'),(1,1,3600,0,'MET'),(1,2,7200,1,'MEST'),(1,3,3600,0,'MET'),(2,0,0,0,'UTC'),(3,0,9000,0,'MMT'),(3,1,12648,1,'MST'),(3,2,9048,0,'MMT'),(3,3,16248,1,'MDST'),(3,4,10800,0,'MSK'),(3,5,14400,1,'MSD'),(3,6,18000,1,'MSD'),(3,7,7200,0,'EET'),(3,8,10800,0,'MSK'),(3,9,14400,1,'MSD'),(3,10,10800,1,'EEST'),(3,11,7200,0,'EET'),(4,0,9000,0,'MMT'),(4,1,12648,1,'MST'),(4,2,9048,0,'MMT'),(4,3,16248,1,'MDST'),(4,4,10800,0,'MSK'),(4,5,14400,1,'MSD'),(4,6,18000,1,'MSD'),(4,7,7200,0,'EET'),(4,8,10800,0,'MSK'),(4,9,14400,1,'MSD'),(4,10,10800,1,'EEST'),(4,11,7200,0,'EET'),(5,0,32400,0,'CJT'),(5,1,32400,0,'JST'); +REPLACE INTO `time_zone_transition_type` VALUES (1,0,7200,1,'MEST'),(1,1,3600,0,'MET'),(1,2,7200,1,'MEST'),(1,3,3600,0,'MET'),(2,0,0,0,'UTC'),(3,0,9000,0,'MMT'),(3,1,12648,1,'MST'),(3,2,9048,0,'MMT'),(3,3,16248,1,'MDST'),(3,4,10800,0,'MSK'),(3,5,14400,1,'MSD'),(3,6,18000,1,'MSD'),(3,7,7200,0,'EET'),(3,8,10800,0,'MSK'),(3,9,14400,1,'MSD'),(3,10,10800,1,'EEST'),(3,11,7200,0,'EET'),(4,0,9000,0,'MMT'),(4,1,12648,1,'MST'),(4,2,9048,0,'MMT'),(4,3,16248,1,'MDST'),(4,4,10800,0,'MSK'),(4,5,14400,1,'MSD'),(4,6,18000,1,'MSD'),(4,7,7200,0,'EET'),(4,8,10800,0,'MSK'),(4,9,14400,1,'MSD'),(4,10,10800,1,'EEST'),(4,11,7200,0,'EET'),(5,0,32400,0,'CJT'),(5,1,32400,0,'JST'); /*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; -- cgit v1.2.1 From 8cdeee177d353e60f4a9cdebe6c851f9505d84b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 20 Jan 2021 09:38:20 +0200 Subject: MDEV-24509 : Warning: Memory not freed: 56 on SET @@global.wsrep_sst_auth It seems that memory is not freed when updated value is NULL or when wsrep is not initialized before shutdown. --- .../suite/galera/r/galera_var_sst_auth.result | 16 ++++++++---- mysql-test/suite/galera/t/galera_var_sst_auth.test | 29 +++++++++++++++++++--- 2 files changed, 36 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/galera_var_sst_auth.result b/mysql-test/suite/galera/r/galera_var_sst_auth.result index 1db83197870..89a27dce4f6 100644 --- a/mysql-test/suite/galera/r/galera_var_sst_auth.result +++ b/mysql-test/suite/galera/r/galera_var_sst_auth.result @@ -1,6 +1,3 @@ -# -# MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config -# SELECT @@global.wsrep_sst_auth; @@global.wsrep_sst_auth ******** @@ -8,5 +5,14 @@ SET @@global.wsrep_sst_auth='foo:bar'; SELECT @@global.wsrep_sst_auth; @@global.wsrep_sst_auth ******** -disconnect node_2; -disconnect node_1; +connection node_2; +SET @@global.wsrep_sst_auth= 'abcdefghijklmnopqrstuvwxyz'; +SELECT @@global.wsrep_sst_auth; +@@global.wsrep_sst_auth +******** +Shutdown node_2 +connection node_1; +connection node_2; +SELECT @@global.wsrep_sst_auth; +@@global.wsrep_sst_auth +******** diff --git a/mysql-test/suite/galera/t/galera_var_sst_auth.test b/mysql-test/suite/galera/t/galera_var_sst_auth.test index 5c9b3f5a61e..ad7f46620ad 100644 --- a/mysql-test/suite/galera/t/galera_var_sst_auth.test +++ b/mysql-test/suite/galera/t/galera_var_sst_auth.test @@ -1,12 +1,33 @@ --source include/galera_cluster.inc --source include/have_innodb.inc ---echo # ---echo # MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config ---echo # +# +# MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config +# SELECT @@global.wsrep_sst_auth; SET @@global.wsrep_sst_auth='foo:bar'; SELECT @@global.wsrep_sst_auth; ---source include/galera_end.inc +# +# MDEV-24509 Warning: Memory not freed: 56 on SET @@global.wsrep_sst_auth +# +--connection node_2 +SET @@global.wsrep_sst_auth= 'abcdefghijklmnopqrstuvwxyz'; +SELECT @@global.wsrep_sst_auth; +--echo Shutdown node_2 +--source include/shutdown_mysqld.inc + +# On node_1, verify that the node has left the cluster. +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +# Restart node_2 +--connection node_2 +--source include/start_mysqld.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc +SELECT @@global.wsrep_sst_auth; + + -- cgit v1.2.1 From c207f04eccf2a1f35e6bac2b8146f6c5e0643857 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 13 Jan 2021 18:36:48 +0100 Subject: MDEV-21785: sequences used as default by other table not dumped in right order by mysqldump Dump sequences first. This atch made to keep it small and to keep number of queries to the server the same. Order of tables in a dump can not be changed (except sequences first) because mysql_list_tables uses SHOW TABLES and I used SHOW FULL TABLES. --- mysql-test/suite/sql_sequence/mysqldump.result | 42 ++++++++++++++++++++++++++ mysql-test/suite/sql_sequence/mysqldump.test | 11 +++++++ 2 files changed, 53 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/sql_sequence/mysqldump.result b/mysql-test/suite/sql_sequence/mysqldump.result index e6aedb57ea6..fb023cc5e36 100644 --- a/mysql-test/suite/sql_sequence/mysqldump.result +++ b/mysql-test/suite/sql_sequence/mysqldump.result @@ -2,8 +2,46 @@ CREATE SEQUENCE a1 engine=aria; CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024; insert into t1 values (1),(2); CREATE SEQUENCE x1 engine=innodb; +# dump whole database CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; SELECT SETVAL(`a1`, 1, 0); +CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; +SELECT SETVAL(`x1`, 1, 0); +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + KEY `a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024; +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO `t1` VALUES (1),(2); +# dump by tables order 1 +CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; +SELECT SETVAL(`a1`, 1, 0); +CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; +SELECT SETVAL(`x1`, 1, 0); +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + KEY `a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024; +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO `t1` VALUES (1),(2); +# dump by tables order 2 +CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; +SELECT SETVAL(`a1`, 1, 0); +CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; +SELECT SETVAL(`x1`, 1, 0); +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + KEY `a` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024; +/*!40101 SET character_set_client = @saved_cs_client */; +INSERT INTO `t1` VALUES (1),(2); +# dump by tables only tables /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -12,8 +50,12 @@ CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024; /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (1),(2); +# dump by tables only sequences +CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; +SELECT SETVAL(`a1`, 1, 0); CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; SELECT SETVAL(`x1`, 1, 0); +# end of dumps DROP TABLE a1,t1,x1; set default_storage_engine=InnoDB; create sequence t1; diff --git a/mysql-test/suite/sql_sequence/mysqldump.test b/mysql-test/suite/sql_sequence/mysqldump.test index 308f06d5e8d..d2afb2fd675 100644 --- a/mysql-test/suite/sql_sequence/mysqldump.test +++ b/mysql-test/suite/sql_sequence/mysqldump.test @@ -11,7 +11,18 @@ CREATE SEQUENCE a1 engine=aria; CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024; insert into t1 values (1),(2); CREATE SEQUENCE x1 engine=innodb; +--echo # dump whole database --exec $MYSQL_DUMP --compact test +--echo # dump by tables order 1 +--exec $MYSQL_DUMP --compact --tables test t1 a1 x1 +--echo # dump by tables order 2 +--exec $MYSQL_DUMP --compact --tables test a1 t1 x1 +--echo # dump by tables only tables +--exec $MYSQL_DUMP --compact --tables test t1 +--echo # dump by tables only sequences +--exec $MYSQL_DUMP --compact --tables test a1 x1 +--echo # end of dumps + DROP TABLE a1,t1,x1; # -- cgit v1.2.1 From 900a14754a64388a79e02b52cd32dea013189868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 26 Jan 2021 14:21:33 +0200 Subject: Fix wsrep.variables --- mysql-test/suite/wsrep/r/variables.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result index 1c427b34d2b..9ef1b3290af 100644 --- a/mysql-test/suite/wsrep/r/variables.result +++ b/mysql-test/suite/wsrep/r/variables.result @@ -142,7 +142,7 @@ SELECT @@global.wsrep_sst_auth; SET @@global.wsrep_sst_auth= ''; SELECT @@global.wsrep_sst_auth; @@global.wsrep_sst_auth - +NULL SET @@global.wsrep_sst_auth= NULL; SELECT @@global.wsrep_sst_auth; @@global.wsrep_sst_auth -- cgit v1.2.1 From bdae8bb6fdb7e9c7875f9a3fff02eadadea50dab Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Mon, 25 Jan 2021 15:21:52 -0800 Subject: MDEV-24675 Server crash when table value constructor uses a subselect This patch actually fixes the bug MDEV-24675 and the bug MDEV-24618: Assertion failure when TVC uses a row in the context expecting scalar value The cause of these bugs is the same wrong call of the function that fixes value expressions in the value list of a table value constructor. The assertion failure happened when an expression in the value list is of the row type. In this case an error message was expected, but it was not issued because the function fix_fields_if_needed() was called for to check fields of value expressions in a TVC instead of the function fix_fields_if_needed_for_scalar() that would also check that the value expressions are are of a scalar type. The first bug happened when a table value expression used an expression returned by single-row subselect. In this case the call of the fix_fields_if_needed_for_scalar virtual function must be provided with and address to which the single-row subselect has to be attached. Test cases were added for each of the bugs. Approved by Oleksandr Byelkin --- mysql-test/main/table_value_constr.result | 54 +++++++++++++++++++++++++++++++ mysql-test/main/table_value_constr.test | 49 ++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result index b95f9289360..69c75ddab75 100644 --- a/mysql-test/main/table_value_constr.result +++ b/mysql-test/main/table_value_constr.result @@ -2621,3 +2621,57 @@ EXECUTE IMMEDIATE 'VALUES (?)' USING IGNORE; ERROR HY000: 'ignore' is not allowed in this context EXECUTE IMMEDIATE 'VALUES (?)' USING DEFAULT; ERROR HY000: 'default' is not allowed in this context +# +# MDEV-24675: TVC using subqueries +# +values((select 1)); +(select 1) +1 +values (2), ((select 1)); +2 +2 +1 +values ((select 1)), (2), ((select 3)); +(select 1) +1 +2 +3 +values ((select 1), 2), (3,4), (5, (select 6)); +(select 1) 2 +1 2 +3 4 +5 6 +create table t1 (a int, b int); +insert into t1 values (1,3), (2,3), (3,2), (1,2); +values((select max(a) from t1)); +(select max(a) from t1) +3 +values((select min(b) from t1)); +(select min(b) from t1) +2 +values ((select max(a) from t1), (select min(b) from t1)); +(select max(a) from t1) (select min(b) from t1) +3 2 +values((select * from (select max(b) from t1) as t)); +(select * from (select max(b) from t1) as t) +3 +drop table t1; +# +# MDEV-24618: TVC contains extra parenthesis for row expressions +# in value list +# +create table t1 (a int, b int); +insert into t1 values (1,3), (2,3); +insert into t1 values ((5,4)); +ERROR 21000: Operand should contain 1 column(s) +values ((1,2)); +ERROR 21000: Operand should contain 1 column(s) +select * from (values ((1,2))) dt; +ERROR 21000: Operand should contain 1 column(s) +values (1,2); +1 2 +1 2 +values ((select min(a), max(b) from t1)); +ERROR 21000: Operand should contain 1 column(s) +drop table t1; +End of 10.3 tests diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test index 11d553f0b85..e8697bef589 100644 --- a/mysql-test/main/table_value_constr.test +++ b/mysql-test/main/table_value_constr.test @@ -1353,3 +1353,52 @@ VALUES (DEFAULT); EXECUTE IMMEDIATE 'VALUES (?)' USING IGNORE; --error ER_UNKNOWN_ERROR EXECUTE IMMEDIATE 'VALUES (?)' USING DEFAULT; + +--echo # +--echo # MDEV-24675: TVC using subqueries +--echo # + +values((select 1)); + +values (2), ((select 1)); + +values ((select 1)), (2), ((select 3)); + +values ((select 1), 2), (3,4), (5, (select 6)); + +create table t1 (a int, b int); +insert into t1 values (1,3), (2,3), (3,2), (1,2); + +values((select max(a) from t1)); + +values((select min(b) from t1)); + +values ((select max(a) from t1), (select min(b) from t1)); + +values((select * from (select max(b) from t1) as t)); + +drop table t1; + +--echo # +--echo # MDEV-24618: TVC contains extra parenthesis for row expressions +--echo # in value list +--echo # + +create table t1 (a int, b int); +insert into t1 values (1,3), (2,3); +--error ER_OPERAND_COLUMNS +insert into t1 values ((5,4)); + +--error ER_OPERAND_COLUMNS +values ((1,2)); + +--error ER_OPERAND_COLUMNS +select * from (values ((1,2))) dt; + +values (1,2); +--error ER_OPERAND_COLUMNS +values ((select min(a), max(b) from t1)); + +drop table t1; + +--echo End of 10.3 tests -- cgit v1.2.1 From cbc75e9948acd849956aa78e1d31ed4ec350c35f Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Thu, 21 Jan 2021 11:34:05 +0530 Subject: MDEV-20939: Race condition between mysqldump import and InnoDB persistent statistics calculation Analysis: When --replace or --insert-ignore is not given, dumping of mysql.innodb_index_stats and mysql.innodb_table_stats will result into race condition. Fix: Check if these options are present with --system=stats (because dumping under --system=stats is safe). Otherwise, dump only structure, ignoring data because innodb will recalculate data anyway. --- mysql-test/r/mysqldump.result | 267 ++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/mysqldump.test | 23 ++++ 2 files changed, 290 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 974ff200e68..da80ff09db9 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -5714,4 +5714,271 @@ DELIMITER ; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; DROP TABLE t1; +# +# MDEV-20939: Race condition between mysqldump import and InnoDB +# persistent statistics calculation +# +# +# Without --replace and --insert-ignore +# + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `innodb_index_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `innodb_index_stats` ( + `database_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(199) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `stat_name` varchar(64) COLLATE utf8_bin NOT NULL, + `stat_value` bigint(20) unsigned NOT NULL, + `sample_size` bigint(20) unsigned DEFAULT NULL, + `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `innodb_table_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `innodb_table_stats` ( + `database_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(199) COLLATE utf8_bin NOT NULL, + `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `n_rows` bigint(20) unsigned NOT NULL, + `clustered_index_size` bigint(20) unsigned NOT NULL, + `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`database_name`,`table_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `general_log` ( + `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6), + `user_host` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `command_type` varchar(64) NOT NULL, + `argument` mediumtext NOT NULL +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `slow_log` ( + `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6), + `user_host` mediumtext NOT NULL, + `query_time` time(6) NOT NULL, + `lock_time` time(6) NOT NULL, + `rows_sent` int(11) NOT NULL, + `rows_examined` int(11) NOT NULL, + `db` varchar(512) NOT NULL, + `last_insert_id` int(11) NOT NULL, + `insert_id` int(11) NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, + `rows_affected` int(11) NOT NULL +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +# +# With --replace +# + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `innodb_index_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `innodb_index_stats` ( + `database_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(199) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `stat_name` varchar(64) COLLATE utf8_bin NOT NULL, + `stat_value` bigint(20) unsigned NOT NULL, + `sample_size` bigint(20) unsigned DEFAULT NULL, + `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `innodb_index_stats` WRITE; +/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */; +/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `innodb_table_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `innodb_table_stats` ( + `database_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(199) COLLATE utf8_bin NOT NULL, + `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `n_rows` bigint(20) unsigned NOT NULL, + `clustered_index_size` bigint(20) unsigned NOT NULL, + `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`database_name`,`table_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `innodb_table_stats` WRITE; +/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */; +/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */; +UNLOCK TABLES; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `general_log` ( + `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6), + `user_host` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `command_type` varchar(64) NOT NULL, + `argument` mediumtext NOT NULL +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `slow_log` ( + `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6), + `user_host` mediumtext NOT NULL, + `query_time` time(6) NOT NULL, + `lock_time` time(6) NOT NULL, + `rows_sent` int(11) NOT NULL, + `rows_examined` int(11) NOT NULL, + `db` varchar(512) NOT NULL, + `last_insert_id` int(11) NOT NULL, + `insert_id` int(11) NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, + `rows_affected` int(11) NOT NULL +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +# +# With --insert-ignore +# + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `innodb_index_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `innodb_index_stats` ( + `database_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(199) COLLATE utf8_bin NOT NULL, + `index_name` varchar(64) COLLATE utf8_bin NOT NULL, + `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `stat_name` varchar(64) COLLATE utf8_bin NOT NULL, + `stat_value` bigint(20) unsigned NOT NULL, + `sample_size` bigint(20) unsigned DEFAULT NULL, + `stat_description` varchar(1024) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `innodb_index_stats` WRITE; +/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */; +/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `innodb_table_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `innodb_table_stats` ( + `database_name` varchar(64) COLLATE utf8_bin NOT NULL, + `table_name` varchar(199) COLLATE utf8_bin NOT NULL, + `last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `n_rows` bigint(20) unsigned NOT NULL, + `clustered_index_size` bigint(20) unsigned NOT NULL, + `sum_of_other_index_sizes` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`database_name`,`table_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `innodb_table_stats` WRITE; +/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */; +/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */; +UNLOCK TABLES; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `general_log` ( + `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6), + `user_host` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `command_type` varchar(64) NOT NULL, + `argument` mediumtext NOT NULL +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `slow_log` ( + `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6), + `user_host` mediumtext NOT NULL, + `query_time` time(6) NOT NULL, + `lock_time` time(6) NOT NULL, + `rows_sent` int(11) NOT NULL, + `rows_examined` int(11) NOT NULL, + `db` varchar(512) NOT NULL, + `last_insert_id` int(11) NOT NULL, + `insert_id` int(11) NOT NULL, + `server_id` int(10) unsigned NOT NULL, + `sql_text` mediumtext NOT NULL, + `thread_id` bigint(21) unsigned NOT NULL, + `rows_affected` int(11) NOT NULL +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + # End of 10.2 tests diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 4478406b395..8249810d1e5 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -2735,4 +2735,27 @@ INSERT INTO t1 (a) VALUES (1),(2),(3); --exec $MYSQL_DUMP --default-character-set=utf8mb4 --triggers --no-data --no-create-info --add-drop-trigger --skip-comments --databases test DROP TABLE t1; +--echo # +--echo # MDEV-20939: Race condition between mysqldump import and InnoDB +--echo # persistent statistics calculation +--echo # + +--let $ignore= --ignore-table=mysql.proxies_priv --ignore-table=mysql.user --ignore-table=mysql.column_stats --ignore-table=mysql.columns_priv --ignore-table=mysql.db --ignore-table=mysql.event --ignore-table=mysql.func --ignore-table=mysql.gtid_slave_pos --ignore-table=mysql.help_category --ignore-table=mysql.help_keyword --ignore-table=mysql.help_relation --ignore-table=mysql.help_topic --ignore-table=mysql.host --ignore-table=mysql.index_stats --ignore-table=mysql.plugin --ignore-table=mysql.proc --ignore-table=mysql.procs_priv --ignore-table=mysql.roles_mapping --ignore-table=mysql.servers --ignore-table=mysql.table_stats --ignore-table=mysql.tables_priv --ignore-table=mysql.time_zone --ignore-table=mysql.time_zone_leap_second --ignore-table=mysql.time_zone_name --ignore-table=mysql.time_zone_transition --ignore-table=mysql.time_zone_transition_type --ignore-table=mysql.general_log --ignore-table=mysql.slow_log +--let $skip_opts= --skip-dump-date --skip-comments + +--echo # +--echo # Without --replace and --insert-ignore +--echo # +--exec $MYSQL_DUMP $ignore $skip_opts mysql + +--echo # +--echo # With --replace +--echo # +--exec $MYSQL_DUMP $ignore $skip_opts --replace mysql + +--echo # +--echo # With --insert-ignore +--echo # +--exec $MYSQL_DUMP $ignore $skip_opts --insert-ignore mysql + --echo # End of 10.2 tests -- cgit v1.2.1 From dd0b844a9cb30cc5adc1cfb57e75755d339323bf Mon Sep 17 00:00:00 2001 From: Stepan Patryshev Date: Wed, 27 Jan 2021 17:11:49 +0200 Subject: MDEV-24699: Added wait condition to make sure table t2 is replicated to node_1. --- mysql-test/suite/galera/t/galera_truncate.test | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/t/galera_truncate.test b/mysql-test/suite/galera/t/galera_truncate.test index 3c3ee56a23f..f490943db7c 100644 --- a/mysql-test/suite/galera/t/galera_truncate.test +++ b/mysql-test/suite/galera/t/galera_truncate.test @@ -32,6 +32,9 @@ CREATE TABLE t2 (f1 VARCHAR(255)) Engine=InnoDB; INSERT INTO t2 VALUES ('abc'); --connection node_1 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t2'; +--source include/wait_condition.inc + TRUNCATE TABLE t2; --connection node_2 -- cgit v1.2.1 From 33ede50f207552df835d7606f990fa9ccc4e0d12 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Thu, 28 Jan 2021 20:46:13 +0300 Subject: MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value Apply the patch based on the patch by Varun Gupta: PARAM::is_ror_scan might be used unitialized when check_quick_select() is invoked for a "degenerate" SEL_ARG tree (e.g. one having type SEL_ARG::IMPOSSIBLE). Make check_quick_select() always initialize PARAM::is_ror_scan. --- mysql-test/r/range.result | 17 +++++++++++++++++ mysql-test/r/range_mrr_icp.result | 17 +++++++++++++++++ mysql-test/t/range.test | 14 ++++++++++++++ 3 files changed, 48 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 1d07cb04c06..6a3850c0ed9 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -3184,5 +3184,22 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR id a b code num DROP TABLE t1, t2; # +# MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value +# +create table t1 (pk int, i int, v int, primary key (pk), key(v)); +insert into t1 (pk,i,v) values (1,1,2),(2,2,4),(3,3,6),(4,4,8),(5,5,10),(6,6,12),(7,7,14),(8,8,16); +create table t2 (a int, b int); +insert into t2 values (1,2),(2,4); +EXPLAIN +select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t1 ALL PRIMARY,v NULL NULL NULL 8 Range checked for each record (index map: 0x3) +select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk); +pk i v a b +1 1 2 1 2 +2 2 4 2 4 +drop table t1, t2; +# # End of 10.2 tests # diff --git a/mysql-test/r/range_mrr_icp.result b/mysql-test/r/range_mrr_icp.result index f3203fea73d..24f42f34ce5 100644 --- a/mysql-test/r/range_mrr_icp.result +++ b/mysql-test/r/range_mrr_icp.result @@ -3196,6 +3196,23 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR id a b code num DROP TABLE t1, t2; # +# MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value +# +create table t1 (pk int, i int, v int, primary key (pk), key(v)); +insert into t1 (pk,i,v) values (1,1,2),(2,2,4),(3,3,6),(4,4,8),(5,5,10),(6,6,12),(7,7,14),(8,8,16); +create table t2 (a int, b int); +insert into t2 values (1,2),(2,4); +EXPLAIN +select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t1 ALL PRIMARY,v NULL NULL NULL 8 Range checked for each record (index map: 0x3) +select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk); +pk i v a b +1 1 2 1 2 +2 2 4 2 4 +drop table t1, t2; +# # End of 10.2 tests # set optimizer_switch=@mrr_icp_extra_tmp; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 2f55889afec..890377ed977 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -2217,6 +2217,20 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR DROP TABLE t1, t2; + +--echo # +--echo # MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value +--echo # + +create table t1 (pk int, i int, v int, primary key (pk), key(v)); +insert into t1 (pk,i,v) values (1,1,2),(2,2,4),(3,3,6),(4,4,8),(5,5,10),(6,6,12),(7,7,14),(8,8,16); +create table t2 (a int, b int); +insert into t2 values (1,2),(2,4); +EXPLAIN +select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk); +select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk); +drop table t1, t2; + --echo # --echo # End of 10.2 tests --echo # -- cgit v1.2.1 From ff5186fd2b1ed06ed40fe3d817b41326e3f943d5 Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Fri, 29 Jan 2021 19:31:07 +0200 Subject: List of unstable tests for 10.2.37 release Test code modifications and new failures from buildbot only registered for the main suite. The rest was updated partially, based on the status of existing JIRA items --- mysql-test/unstable-tests | 294 +++++++++++++++++----------------------------- 1 file changed, 111 insertions(+), 183 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 7eac636dc5d..286c99cba14 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,28 +23,31 @@ # ############################################################################## # -# Based on bb-10.2-release 72eea39d4c4a8bcadccfdac457e61abc7b618ff8 -# Fri Oct 30 12:58:16 2020 +0200 -# MDEV-23991 fixup: Initialize the memory +# Based on 10.2 9c84852809214e97cf91327a798204c1b745881e +# for main suite changes and failures, and +# bb-10.2-release 72eea39d4c4a8bcadccfdac457e61abc7b618ff8 +# for the rest -main.alter_table : Modified in 10.2.35 -main.alter_table_trans : MDEV-12084 - timeout +main.alter_table_trans : MDEV-12084 - Timeout main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result -main.aria_icp_debug : Added in 10.2.35 main.auth_named_pipe : MDEV-14724 - System error 2 -main.blackhole : Modified in 10.2.35 -main.bootstrap_innodb : Added in 10.2.35 main.connect : MDEV-17282 - Wrong result main.connect2 : MDEV-13885 - Server crash -main.count_distinct2 : MDEV-11768 - timeout +main.create : Modified in 10.2.37 main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result +main.cte_nonrecursive : Modified in 10.2.37 +main.cte_nonrecursive_not_embedded : Added in 10.2.37 +main.cte_recursive : Modified in 10.2.37 main.ctype_ucs : MDEV-17681 - Data too long for column main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade main.ctype_utf16 : MDEV-10675: timeout or extra warnings -main.ctype_utf8 : Modified in 10.2.35 +main.ctype_utf8mb4 : Modified in 10.2.37 +main.ctype_utf8mb4_heap : Include file modified in 10.2.37 +main.ctype_utf8mb4_innodb : Include file modified in 10.2.37 +main.ctype_utf8mb4_myisam : Include file modified in 10.2.37 main.debug_sync : MDEV-10607 - internal error -main.derived_opt : MDEV-11768 - timeout +main.derived_cond_pushdown : Modified in 10.2.37 main.dirty_close : MDEV-19368 - mysqltest failed but provided no output main.distinct : MDEV-14194 - Crash main.drop_bad_db_type : MDEV-15676 - Wrong result @@ -52,104 +55,92 @@ main.events_2 : MDEV-13277 - Crash main.events_bugs : MDEV-12892 - Crash main.events_restart : MDEV-12236 - Server shutdown problem main.events_slowlog : MDEV-12821 - Wrong result -main.fast_prefix_index_fetch_innodb : Modified in 10.2.35 main.flush : MDEV-19368 - mysqltest failed but provided no output -main.func_gconcat : MDEV-21379 - Valgrind warnings -main.func_json : Modified in 10.2.35 -main.func_test : Modified in 10.2.35 +main.func_gconcat : MDEV-21379 - Valgrind warnings; modified in 10.2.37 +main.func_like : Modified in 10.2.37 main.gis : MDEV-13411 - wrong result on P8 +main.gis-json : Modified in 10.2.37 main.gis_notembedded : MDEV-21264 - Wrong result with different default charset -main.grant : Modified in 10.2.35 -main.grant5 : Modified in 10.2.35 +main.group_by : Modified in 10.2.37 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Plan mismatch -main.information_schema : Modified in 10.2.35 -main.innodb_ext_key : Modified in 10.2.35 -main.innodb_icp_debug : Added in 10.2.35 +main.information_schema : Modified in 10.2.37 +main.innodb_mrr_cpk : MDEV-24737 - Server crash main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure (Fixed in 10.3+, MDEV-22947) +main.kill : Modified in 10.2.37 main.kill-2 : MDEV-13257 - Wrong result main.kill_processlist-6619 : MDEV-10793 - Wrong result -main.limit_rows_examined : Modified in 10.2.35 main.loaddata : MDEV-19368 - mysqltest failed but provided no output main.locale : MDEV-20521 - Missing warning -main.lock_view : Added in 10.2.35 +main.lock_tables_lost_commit : MDEV-24624 - Timeout +main.lock_view : Modified in 10.2.37 main.log_slow : MDEV-13263 - Wrong result -main.log_tables : Modified in 10.2.35 main.log_tables-big : MDEV-13408 - wrong result main.mdev-504 : MDEV-15171 - warning main.mdev375 : MDEV-10607 - sporadic "can't connect" main.merge : MDEV-10607 - sporadic "can't connect" -main.multi_update_big : Modified in 10.2.35 -main.myisam_icp_debug : Added in 10.2.35 +main.myisam : Modified in 10.2.37 main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2 main.mysql_client_test_comp : MDEV-16641 - Error in exec main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed -main.mysql_upgrade : Modified in 10.2.35 +main.mysql_upgrade : Modified in 10.2.37 main.mysql_upgrade_noengine : MDEV-14355 - Wrong result -main.mysqlbinlog_row_minimal : Modified in 10.2.35 -main.mysqld--help : Modified in 10.2.35 main.mysqld_option_err : MDEV-21571 - Crash on bootstrap -main.mysqldump : MDEV-14800 - Stack smashing detected -main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug +main.mysqldump : Modified in 10.2.37 +main.mysqldump-system : Added in 10.2.37 main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-9269 - fails on Alpha; MDEV-13887 - Wrong result main.old-mode : MDEV-19373 - Wrong result main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.order_by : Modified in 10.2.35 +main.order_by : Modified in 10.2.37 main.order_by_optimizer_innodb : MDEV-10683 - Wrong result -main.parser : Modified in 10.2.35 -main.partition : Modified in 10.2.35 main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 -main.plugin_innodb : Modified in 10.2.35 -main.pool_of_threads : Modified in 10.2.35 -main.precedence : Added in 10.2.35 -main.precedence_bugs : Added in 10.2.35 -main.processlist_notembedded : Modified in 10.2.35 +main.precedence : Modified in 10.2.37 +main.processlist_notembedded : MDEV-23752 - Not explainable command main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count -main.query_cache : MDEV-16180 - Wrong result +main.ps_show_log : Added in 10.2.37 +main.query_cache : MDEV-16180 - Wrong result; modified in 10.2.37 main.query_cache_debug : MDEV-15281 - Query cache is disabled -main.range : Modified in 10.2.35 +main.range : Modified in 10.2.37 main.range_innodb : MDEV-23371 - Server crash main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away main.set_statement : MDEV-13183 - Wrong result main.set_statement_notembedded : MDEV-19414 - Wrong result main.shm : MDEV-12727 - Mismatch, ERROR 2013 main.show_explain : MDEV-10674 - Wrong result code +main.skip_grants : Modified in 10.2.37 +main.sp : Modified in 10.2.37 main.sp-security : MDEV-10607 - sporadic "can't connect" +main.sp-ucs2 : Modified in 10.2.37 main.sp_notembedded : MDEV-10607 - internal error main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 main.ssl_ca : MDEV-10895 - SSL connection error on Power main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 main.ssl_timeout : MDEV-11244 - Crash +main.stat_tables : Modified in 10.2.37 main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding main.status : MDEV-13255 - Wrong result -main.subselect4 : Modified in 10.2.35 -main.subselect_innodb : MDEV-10614 - Sporadic wrong results; modified in 10.2.35 -main.sum_distinct-big : Modified in 10.2.35 +main.subselect_innodb : MDEV-10614 - Sporadic wrong results main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.temp_table_symlink : MDEV-24058 - Wrong error code; added in 10.2.35 +main.temp_table_symlink : MDEV-24058 - Wrong error code main.type_blob : MDEV-15195 - Wrong result -main.type_date : Modified in 10.2.35 -main.type_datetime : Modified in 10.2.35 main.type_datetime_hires : MDEV-10687 - Timeout -main.type_newdecimal : Modified in 10.2.35 main.type_temporal_innodb : MDEV-24025 - Wrong result -main.udf : Modified in 10.2.35 +main.type_year : Modified in 10.2.37 +main.user_limits : Modified in 10.2.37 main.userstat : MDEV-12904 - SSL errors -main.view : Modified in 10.2.35 +main.view : Modified in 10.2.37 main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query -main.win : Modified in 10.2.35 -main.xa : MDEV-11769 - lock wait timeout +main.xa : MDEV-11769 - lock wait timeout; modified in 10.2.37 #----------------------------------------------------------------------- -archive.archive_bitfield : MDEV-11771 - table is marked as crashed -archive.archive_symlink : MDEV-12170 - unexpected error on rmdir -archive.discover : MDEV-10510 - Table is marked as crashed -archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug +archive.archive_bitfield : MDEV-11771 - table is marked as crashed +archive.archive_symlink : MDEV-12170 - unexpected error on rmdir +archive.discover : MDEV-10510 - Table is marked as crashed #----------------------------------------------------------------------- @@ -157,18 +148,14 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed #----------------------------------------------------------------------- -binlog.binlog_commit_wait : MDEV-10150 - Mismatch -binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown -binlog.binlog_mysqlbinlog_row : Modified in 10.2.35 -binlog.binlog_mysqlbinlog_row_frag : Modified in 10.2.35 -binlog.binlog_no_uniqfile_crash : MDEV-24078 - Server crash upon shutdown -binlog.binlog_recover_checksum_error : Added in 10.2.35 -binlog.binlog_show_binlog_event_random_pos : Modified in 10.2.35 -binlog.binlog_stm_mix_innodb_myisam : MDEV-24057 - Wrong result -binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint -binlog.flashback-largebinlog : MDEV-19764 - Out of memory -binlog.load_data_stm_view : MDEV-16948 - Wrong result +binlog.binlog_commit_wait : MDEV-10150 - Mismatch +binlog.binlog_killed : MDEV-12925 - Wrong result +binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown +binlog.binlog_no_uniqfile_crash : MDEV-24078 - Server crash upon shutdown +binlog.binlog_stm_mix_innodb_myisam : MDEV-24057 - Wrong result +binlog.binlog_xa_recover : MDEV-12908 - Extra checkpoint +binlog.flashback-largebinlog : MDEV-19764 - Out of memory +binlog.load_data_stm_view : MDEV-16948 - Wrong result #----------------------------------------------------------------------- @@ -193,10 +180,9 @@ binlog_encryption.rpl_typeconv : MDEV-14362 - Lost con #----------------------------------------------------------------------- -connect.pivot : MDEV-14803 - Failed to discover table -connect.updelx : Modified in 10.2.35 -connect.vcol : MDEV-12374 - Fails on Windows -connect.zip : MDEV-13884 - Wrong result +connect.pivot : MDEV-14803 - Failed to discover table +connect.vcol : MDEV-12374 - Fails on Windows +connect.zip : MDEV-13884 - Wrong result #----------------------------------------------------------------------- @@ -204,40 +190,34 @@ disks.disks_notembedded : MDEV-21587 - Wrong result #----------------------------------------------------------------------- -encryption.create_or_replace : Modified in 10.2.35 -encryption.create_or_replace_big : Added in 10.2.35 -encryption.debug_key_management : MDEV-13841 - Timeout -encryption.encrypt_and_grep : MDEV-13765 - Wrong result -encryption.innochecksum : MDEV-13644 - Assertion failure -encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect through socket -encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate -encryption.innodb-discard-import : MDEV-19113 - Timeout -encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout -encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait condition -encryption.innodb-force-corrupt : MDEV-17286 - SSL error -encryption.innodb-missing-key : MDEV-17286 - SSL error -encryption.innodb-page_encryption : MDEV-10641 - mutex problem -encryption.innodb-page_encryption_compression : Modified in 10.2.35 -encryption.innodb-page_encryption_log_encryption : Modified in 10.2.35 -encryption.innodb-read-only : MDEV-16563 - Crash on startup -encryption.innodb-redo-badkey : MDEV-12898 - Server hang on startup -encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition -encryption.innodb-spatial-index : MDEV-13746 - Wrong result -encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout -encryption.innodb_encrypt_log : MDEV-13725 - Wrong result -encryption.innodb_encrypt_log_corruption : MDEV-14379 - Server crash -encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result -encryption.innodb_encryption : MDEV-14728 - Unable to get certificate; MDEV-15675 - Timeout -encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure -encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result -encryption.innodb_encryption_is : MDEV-12898 - Server hang on startup -encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash -encryption.innodb_first_page : MDEV-10689 - Crash -encryption.innodb_onlinealter_encryption : MDEV-17287 - SIGABRT on server restart -encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing (Fixed in 10.5+) -encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing (Fixed in 10.5+) -encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing (Fixed in 10.5+) -encryption.tempfiles_encrypted : Added in 10.2.35 +encryption.create_or_replace : MDEV-24081 - Lock wait timeout exceeded +encryption.debug_key_management : MDEV-13841 - Timeout +encryption.encrypt_and_grep : MDEV-13765 - Wrong result +encryption.innochecksum : MDEV-13644 - Assertion failure +encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect through socket +encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate +encryption.innodb-discard-import : MDEV-19113 - Timeout +encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout +encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait condition +encryption.innodb-force-corrupt : MDEV-17286 - SSL error +encryption.innodb-missing-key : MDEV-17286 - SSL error +encryption.innodb-page_encryption : MDEV-10641 - mutex problem +encryption.innodb-read-only : MDEV-16563 - Crash on startup +encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition +encryption.innodb-spatial-index : MDEV-13746 - Wrong result +encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout +encryption.innodb_encrypt_log : MDEV-13725 - Wrong result +encryption.innodb_encrypt_log_corruption : MDEV-14379 - Server crash +encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result +encryption.innodb_encryption : MDEV-14728 - Unable to get certificate; MDEV-15675 - Timeout +encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure +encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result +encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash +encryption.innodb_first_page : MDEV-10689 - Crash +encryption.innodb_onlinealter_encryption : MDEV-17287 - SIGABRT on server restart +encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing (Fixed in 10.5+) +encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing (Fixed in 10.5+) +encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing (Fixed in 10.5+) #----------------------------------------------------------------------- @@ -285,33 +265,20 @@ galera_3nodes.* : Suite is not stable yet #----------------------------------------------------------------------- -gcol.gcol_keys_innodb : Include file modified in 10.2.35 -gcol.gcol_keys_myisam : Include file modified in 10.2.35 -gcol.gcol_partition_innodb : Include file modified in 10.2.35 -gcol.gcol_update : Include file modified in 10.2.35 -gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion -gcol.innodb_virtual_debug : MDEV-23111 - Server crash -gcol.innodb_virtual_debug_purge : Include file modified in 10.2.35 -gcol.innodb_virtual_fk : Modified in 10.2.35 -gcol.innodb_virtual_index : Modified in 10.2.35 -gcol.innodb_virtual_purge : Include file modified in 10.2.35 +gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion +gcol.innodb_virtual_debug : MDEV-23111 - Server crash #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result innodb.alter_copy : MDEV-16181 - Assertion failure innodb.alter_crash : MDEV-16944 - The process cannot access the file -innodb.alter_table : Modified in 10.2.35 innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.blob-crash : MDEV-20481 - Failures upon recovery innodb.doublewrite : MDEV-12905 - Server crash -innodb.foreign-keys : Modified in 10.2.35 -innodb.foreign_key : Modified in 10.2.35 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-11770 - Checksum mismatch innodb.ibuf_not_empty : MDEV-19021 - Wrong result -innodb.innodb : Modified in 10.2.35 -innodb.innodb-64k : Modified in 10.2.35 innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS innodb.innodb-alter-table : MDEV-10619 - Testcase timeout @@ -319,18 +286,15 @@ innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown innodb.innodb-get-fk : MDEV-13276 - Server crash -innodb.innodb-index : Include file modified in 10.2.35 -innodb.innodb-index-debug : Include file modified in 10.2.35 innodb.innodb-index-online : MDEV-14809 - Cannot save statistics innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem innodb.innodb-table-online : MDEV-13894 - Wrong result +innodb.innodb-ucs2 : MDEV-24505 - Assertion failure innodb.innodb-wl5522-1 : MDEV-22945 - Server crash innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc -innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure -innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt innodb.innodb_bug30423 : MDEV-7311 - Wrong result innodb.innodb_bug47167 : MDEV-20524 - Table 'user' is marked as crashed and should be repaired innodb.innodb_bug48024 : MDEV-14352 - Assertion failure @@ -339,14 +303,11 @@ innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full innodb.innodb_information_schema : MDEV-8851 - Wrong result innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result -innodb.innodb_monitor : MDEV-10939 - Testcase timeout innodb.innodb_mysql : MDEV-19873 - Wrong result innodb.innodb_stats : MDEV-10682 - wrong result -innodb.innodb_stats_drop_locked : Modified in 10.2.35 innodb.innodb_stats_persistent : MDEV-21567 - Wrong result in execution plan innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait -innodb.innodb_trx_weight : Configuration deleted in 10.2.35 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start @@ -357,24 +318,19 @@ innodb.purge_secondary : MDEV-15681 - Wrong result innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.read_only_recovery : MDEV-13886 - Server crash innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile -innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace; modified in 10.2.35 -innodb.stats_persistent : Added in 10.2.35 +innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.temp_table_savepoint : MDEV-24077 - Assertion failure innodb.temporary_table : MDEV-13265 - Wrong result -innodb.truncate : Modified in 10.2.35 innodb.undo_truncate : MDEV-17340 - Server hung innodb.undo_truncate_recover : MDEV-17679 - MySQL server has gone away -innodb.update-cascade : Combinations added in 10.2.35 innodb.update_time : MDEV-14804 - Wrong result innodb.xa_recovery : MDEV-15279 - mysqld got exception #----------------------------------------------------------------------- -innodb_fts.basic : Modified in 10.2.35 innodb_fts.fulltext2 : MDEV-24074 - Server crash -innodb_fts.innodb_fts_misc_1 : Modified in 10.2.35 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed @@ -383,13 +339,11 @@ innodb_fts.sync_ddl : MDEV-21568 - Errno: 2000 #----------------------------------------------------------------------- innodb_gis.gis_split_nan : MDEV-21678 - Cannot get geometry object -innodb_gis.rtree_add_index : Include file modified in 10.2.35 -innodb_gis.rtree_compress : Include file modified in 10.2.35 innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded -innodb_gis.rtree_purge : MDEV-15275 - Timeout; include file modified in 10.2.35 +innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_recovery : MDEV-15274 - Error on check innodb_gis.rtree_split : MDEV-14208 - Too many arguments -innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file; include file modified in 10.2.35 +innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file innodb_gis.types : MDEV-15679 - Table is marked as crashed #----------------------------------------------------------------------- @@ -412,24 +366,18 @@ maria.maria : MDEV-14430 - Extra warning #----------------------------------------------------------------------- -mariabackup.apply-log-only : MDEV-20135 - Timeout -mariabackup.backup_ssl : MDEV-24073 - Server crash upon shutdown -mariabackup.data_directory : MDEV-15270 - Error on exec -mariabackup.ddl_incremental_encrypted : Added in 10.2.35 -mariabackup.full_backup : MDEV-16571 - Wrong result -mariabackup.huge_lsn : MDEV-17286 - SSL error -mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure -mariabackup.incremental_ddl_during_backup : Modified in 10.2.35 -mariabackup.incremental_encrypted : MDEV-15667 - Timeout -mariabackup.innodb_redo_overwrite : Added in 10.2.35 -mariabackup.mdev-14447 : MDEV-15201 - Timeout -mariabackup.mlog_index_load : Modified in 10.2.35 -mariabackup.partial_exclude : MDEV-15270 - Error on exec -mariabackup.rpl_slave_info : Added in 10.2.35 -mariabackup.unencrypted_page_compressed : Include file modified in 10.2.35 -mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault -mariabackup.xb_page_compress : MDEV-14810 - status: 1, errno: 11 -mariabackup.xb_partition : MDEV-17584 - Crash on shutdown +mariabackup.apply-log-only : MDEV-20135 - Timeout +mariabackup.backup_ssl : MDEV-24073 - Server crash upon shutdown +mariabackup.data_directory : MDEV-15270 - Error on exec +mariabackup.full_backup : MDEV-16571 - Wrong result +mariabackup.huge_lsn : MDEV-17286 - SSL error +mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure +mariabackup.incremental_encrypted : MDEV-15667 - Timeout +mariabackup.mdev-14447 : MDEV-15201 - Timeout +mariabackup.partial_exclude : MDEV-15270 - Error on exec +mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault +mariabackup.xb_page_compress : MDEV-14810 - status: 1, errno: 11 +mariabackup.xb_partition : MDEV-17584 - Crash on shutdown #----------------------------------------------------------------------- @@ -453,8 +401,6 @@ multi_source.info_logs : MDEV-12629 - Valgrind, MDEV-10042 - Wrong result, MDE multi_source.mdev-8874 : MDEV-19415 - AddressSanitizer: heap-use-after-free multi_source.mdev-9544 : MDEV-19415 - AddressSanitizer: heap-use-after-free multi_source.multisource : MDEV-10417 - Fails on Mips -multi_source.reset_slave : MDEV-10690 - Wrong result -multi_source.simple : MDEV-4633 - Wrong result multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_heartbeats #----------------------------------------------------------------------- @@ -503,7 +449,7 @@ perfschema_stress.* : MDEV-10996 - Not maintained plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such plugins.processlist : MDEV-16574 - Wrong result -plugins.server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.2.35 +plugins.server_audit : MDEV-9562 - crashes on sol10-sparc plugins.thread_pool_server_audit : MDEV-14295 - Wrong result #----------------------------------------------------------------------- @@ -553,7 +499,6 @@ rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log rpl.rpl_binlog_errors : MDEV-12742 - Crash -rpl.rpl_binlog_index : Modified in 10.2.35 rpl.rpl_checksum_cache : MDEV-22510 - Server crash rpl.rpl_colSize : MDEV-16112 - Server crash rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac @@ -563,13 +508,10 @@ rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Warnings/errors rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning -rpl.rpl_filter_tables_dynamic : Modified in 10.2.35 -rpl.rpl_filter_wild_tables_dynamic : Modified in 10.2.35 rpl.rpl_flushlog_loop : MDEV-21570 - Server crash rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output rpl.rpl_gtid_basic : MDEV-10681 - server startup problem -rpl.rpl_gtid_crash : MDEV-13643 - Lost connection; modified in 10.2.35 -rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout; MDEV-23103 - Could not delete gtid domain; modified in 10.2.35 +rpl.rpl_gtid_crash : MDEV-13643 - Lost connection rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings rpl.rpl_gtid_reconnect : MDEV-14497 - Crash @@ -587,12 +529,9 @@ rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog rpl.rpl_mdev12179 : MDEV-19043 - Warnings/errors rpl.rpl_mdev6020 : MDEV-23426 - Server crash, ASAN failures; MDEV-15272 - Server crash rpl.rpl_mixed_mixing_engines : MDEV-21266 - Timeout -rpl.rpl_mysql_upgrade : Modified in 10.2.35 rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait rpl.rpl_parallel : MDEV-10653 - Timeouts -rpl.rpl_parallel2 : Modified in 10.2.35 rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash -rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master rpl.rpl_parallel_optimistic_nobinlog : MDEV-15278 - Failed to sync with master @@ -613,19 +552,15 @@ rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed rpl.rpl_row_index_choice : MDEV-15196 - Slave crash rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum -rpl.rpl_semi_sync : MDEV-11220 - Wrong result -rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result -rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings -rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures +rpl.rpl_semi_sync_uninstall_plugin : MDEV-24561 - Wrong usage of mutex; MDEV-7140 - Assorted failures rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_show_slave_hosts : MDEV-10681 - Crash rpl.rpl_skip_replication : MDEV-23372 - Extra warning -rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock; ; modified in 10.2.35 rpl.rpl_slave_load_tmpdir_not_exist : MDEV-23372 - Extra warning rpl.rpl_slow_query_log : MDEV-13250 - Test abort rpl.rpl_sp_effects : MDEV-13249 - Crash -rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout; modified in 10.2.35 +rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash rpl.rpl_sync : MDEV-10633 - Database page corruption @@ -635,7 +570,6 @@ rpl.rpl_trigger : MDEV-18055 - Wrong result rpl.rpl_truncate_3innodb : MDEV-19454 - Sporadic syntax error rpl.rpl_user_variables : MDEV-20522 - Wrong result rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result -rpl.show_status_stop_slave_race-7126 : Modified in 10.2.35 #----------------------------------------------------------------------- @@ -682,14 +616,9 @@ sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected err sys_vars.innodb_checksum_algorithm_basic : MDEV-21568 - Errno: 2000 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash -sys_vars.replicate_do_db_basic : Modified in 10.2.35 -sys_vars.rpl_init_slave_func : Modified in 10.2.35 -sys_vars.session_track_system_variables_basic : Modified in 10.2.35 sys_vars.slow_query_log_func : MDEV-14273 - Wrong result sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result sys_vars.wait_timeout_func : MDEV-12896 - Wrong result -sys_vars.wsrep_cluster_address_basic : Modified in 10.2.35 -sys_vars.wsrep_on_basic : Configuration deleted in 10.2.35 #----------------------------------------------------------------------- @@ -721,7 +650,7 @@ tokudb_alter_table.hcad_all_add2 : MDEV-15269 - Timeout #----------------------------------------------------------------------- -tokudb_backup.* : MDEV-11001 - Missing include file +tokudb_backup.* : MDEV-11001 - Missing include file (Won't fix) #----------------------------------------------------------------------- @@ -738,11 +667,11 @@ tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection #----------------------------------------------------------------------- -tokudb_rpl.* : MDEV-11001 - Missing include file +tokudb_rpl.* : MDEV-11001 - Missing include file (Won't fix) #----------------------------------------------------------------------- -tokudb_sys_vars.* : MDEV-11001 - Missing include file +tokudb_sys_vars.* : MDEV-11001 - Missing include file (Won't fix) #----------------------------------------------------------------------- @@ -760,14 +689,13 @@ unit.mf_iocache : MDEV-20952 - Buffer overflow vcol.not_supported : MDEV-10639 - Testcase timeout vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout -vcol.vcol_misc : MDEV-16651 - Wrong error message; modified in 10.2.35 +vcol.vcol_misc : MDEV-16651 - Wrong error message #----------------------------------------------------------------------- wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node wsrep.mdev_6832 : MDEV-14195 - Check testcase failed wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use -wsrep.variables : Modified in 10.2.35 #----------------------------------------------------------------------- -- cgit v1.2.1 From 251b52190070095e4c65ffb0ae545d49330a02b2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 1 Feb 2021 13:44:50 +0100 Subject: main.mysqldump test isn't that big and it is that important to be run every time --- mysql-test/main/mysqldump.result | 6 +----- mysql-test/main/mysqldump.test | 14 -------------- 2 files changed, 1 insertion(+), 19 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index d8b24e4f5e7..76105ab0236 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -1,14 +1,10 @@ call mtr.add_suppression("@003f.frm' \\(errno: 22\\)"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); # Bug#37938 Test "mysqldump" lacks various insert statements # Turn off concurrent inserts to avoid random errors # NOTE: We reset the variable back to saved value at the end of test SET @OLD_CONCURRENT_INSERT = @@GLOBAL.CONCURRENT_INSERT; SET @@GLOBAL.CONCURRENT_INSERT = 0; -DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3; -drop database if exists mysqldump_test_db; -drop database if exists db1; -drop database if exists db2; -drop view if exists v1, v2, v3; CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024; INSERT INTO t1 VALUES (1), (2); diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test index 7362c0d1aea..3e88ff3bc39 100644 --- a/mysql-test/main/mysqldump.test +++ b/mysql-test/main/mysqldump.test @@ -19,12 +19,7 @@ let collation=utf8_unicode_ci; # There are tables in 'mysql' database of type innodb --source include/have_innodb.inc -# This test is slow on buildbot. ---source include/big_test.inc - -disable_query_log; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -enable_query_log; --echo # Bug#37938 Test "mysqldump" lacks various insert statements --echo # Turn off concurrent inserts to avoid random errors @@ -32,15 +27,6 @@ enable_query_log; SET @OLD_CONCURRENT_INSERT = @@GLOBAL.CONCURRENT_INSERT; SET @@GLOBAL.CONCURRENT_INSERT = 0; - ---disable_warnings -DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3; -drop database if exists mysqldump_test_db; -drop database if exists db1; -drop database if exists db2; -drop view if exists v1, v2, v3; ---enable_warnings - # XML output CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024; -- cgit v1.2.1