diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-12-13 14:39:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-12-13 14:39:18 +0200 |
commit | 1dc2f35598193fc52b79061c286b61f01c617374 (patch) | |
tree | 30e3972564ec174de0432e429f5f0897bf0b41a7 /mysql-test/suite | |
parent | da5d3499353036d39c3a4bcd1f0466f7de3fc263 (diff) | |
parent | fdf43b5c78c4aeb26efdbef3172746e007ab6f1d (diff) | |
download | mariadb-git-1dc2f35598193fc52b79061c286b61f01c617374.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/suite')
65 files changed, 692 insertions, 100 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index 7071cb3ba43..e4041b16306 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -1,3 +1,4 @@ +reset master; create table t1 (a int, b int) engine=innodb; begin; insert into t1 values (1,2); diff --git a/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result b/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result index 0c3e72133b8..ade3e8acf10 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result +++ b/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result @@ -1,3 +1,4 @@ +reset master; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # GTID #-#-# diff --git a/mysql-test/suite/binlog/r/binlog_stm_do_db.result b/mysql-test/suite/binlog/r/binlog_stm_do_db.result index 3d23594135d..c39404aef55 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_do_db.result +++ b/mysql-test/suite/binlog/r/binlog_stm_do_db.result @@ -1,3 +1,4 @@ +RESET MASTER; SET @old_isolation_level= @@session.tx_isolation; SET @@session.tx_isolation= 'READ-COMMITTED'; CREATE DATABASE b42829; diff --git a/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result b/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result index d0132931968..021b5b9af43 100644 --- a/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result +++ b/mysql-test/suite/binlog/r/innodb_autoinc_lock_mode_binlog.result @@ -1,3 +1,4 @@ +reset master; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); select @@innodb_autoinc_lock_mode; @@innodb_autoinc_lock_mode diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog.test b/mysql-test/suite/binlog/t/binlog_stm_binlog.test index e9c8e0ed874..a87fc8b8463 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_binlog.test +++ b/mysql-test/suite/binlog/t/binlog_stm_binlog.test @@ -3,6 +3,7 @@ let collation=utf8_unicode_ci; --source include/have_collation.inc +reset master; # clear up binlogs # REQUIREMENT # replace_regex should replace output of SHOW BINLOG EVENTS diff --git a/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test b/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test index ae4cab62fec..d277db979fb 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test +++ b/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test @@ -1,6 +1,6 @@ --source include/not_embedded.inc --source include/have_binlog_format_statement.inc - +reset master; # clear up binlogs --exec $MYSQL_CLIENT_TEST test_datetime_ranges_mdev15289 > $MYSQLTEST_VARDIR/log/binlog_stm_datetime_ranges_mysql_client_test.out.log 2>&1 --let $binlog_file = LAST diff --git a/mysql-test/suite/binlog/t/binlog_stm_do_db.test b/mysql-test/suite/binlog/t/binlog_stm_do_db.test index 991fdef1bea..3ed1734f18d 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_do_db.test +++ b/mysql-test/suite/binlog/t/binlog_stm_do_db.test @@ -37,7 +37,7 @@ -- source include/have_log_bin.inc -- source include/have_innodb.inc -- source include/have_binlog_format_statement.inc - +RESET MASTER; # clear up binlogs SET @old_isolation_level= @@session.tx_isolation; SET @@session.tx_isolation= 'READ-COMMITTED'; diff --git a/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test b/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test index a7d43db4c1b..283862ec3be 100644 --- a/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test +++ b/mysql-test/suite/binlog/t/innodb_autoinc_lock_mode_binlog.test @@ -1,6 +1,6 @@ --source include/have_innodb.inc --source include/have_binlog_format_mixed.inc - +reset master; #clear up binlogs call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); select @@innodb_autoinc_lock_mode; diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result index c96974ad3e7..3799b4dc087 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result @@ -50,7 +50,6 @@ restore: t1 .ibd and .cfg files # restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt ALTER TABLE t1 DISCARD TABLESPACE; Warnings: -Warning 1814 Tablespace has been discarded for table `t1` Warning 1812 Tablespace is missing for table 'test/t1' restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; diff --git a/mysql-test/suite/encryption/r/innodb_import.result b/mysql-test/suite/encryption/r/innodb_import.result index 169af37f404..54b95ab26d4 100644 --- a/mysql-test/suite/encryption/r/innodb_import.result +++ b/mysql-test/suite/encryption/r/innodb_import.result @@ -11,9 +11,10 @@ UNLOCK TABLES; ALTER TABLE t2 IMPORT TABLESPACE; ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t2 when .cfg file is missing. ALTER TABLE t2 DROP KEY idx; -ALTER TABLE t2 IMPORT TABLESPACE; Warnings: Warning 1814 Tablespace has been discarded for table `t2` +ALTER TABLE t2 IMPORT TABLESPACE; +Warnings: Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification SELECT * FROM t2; f1 f2 diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result index f52585cfc45..33fdfe38f87 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result @@ -391,7 +391,7 @@ connection no_privs_424d; show grants; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4d_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1d'; @@ -413,7 +413,7 @@ connection yes_privs_424d; show grants; Grants for test_yesprivs@localhost GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4d_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2d'; @@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -633,7 +633,7 @@ connection no_privs_425d; show grants; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5d_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -649,7 +649,7 @@ connection yes_privs_425d; show grants; Grants for test_yesprivs@localhost GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5d_2 before INSERT on t1 for each row set @test_var= new.f1; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result index 6ec5240792c..457d98d572f 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result @@ -1541,8 +1541,8 @@ show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1692,8 +1692,8 @@ to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1735,8 +1735,8 @@ to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result index ae9820b2c70..3a8fbac9170 100644 --- a/mysql-test/suite/funcs_1/r/is_check_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result @@ -134,7 +134,7 @@ GRANT SELECT (a) ON t1 TO foo; SHOW GRANTS FOR foo; Grants for foo@% GRANT USAGE ON *.* TO `foo`@`%` -GRANT SELECT (a) ON `db`.`t1` TO `foo`@`%` +GRANT SELECT (`a`) ON `db`.`t1` TO `foo`@`%` SELECT * FROM information_schema.check_constraints; CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME LEVEL CHECK_CLAUSE def db t1 CONSTRAINT_1 Table `b` > 0 diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result index d5d42a84f30..70effc9e5ed 100644 --- a/mysql-test/suite/funcs_1/r/is_column_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result @@ -219,7 +219,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -231,7 +231,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection default; ALTER TABLE db_datadict.my_table DROP COLUMN f3; GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost'; @@ -246,7 +246,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -259,7 +259,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` SELECT f1, f3 FROM db_datadict.my_table; ERROR 42S22: Unknown column 'f3' in 'field list' connection default; @@ -275,7 +275,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -288,7 +288,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection default; DROP TABLE db_datadict.my_table; SELECT * FROM information_schema.column_privileges @@ -302,7 +302,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -315,7 +315,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` +GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection default; REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost'; SELECT * FROM information_schema.column_privileges diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result index b6581e5825d..9e7cc358d2d 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics.result +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -239,7 +239,7 @@ def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` +GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost @@ -258,7 +258,7 @@ def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` +GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION SHOW GRANTS FOR 'testuser2'@'localhost'; ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' @@ -277,7 +277,7 @@ REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost'; SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` +GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.statistics WHERE table_schema LIKE 'db_datadict%' @@ -290,7 +290,7 @@ def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` +GRANT SELECT (`f5`, `f1`) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` connection default; disconnect testuser1; disconnect testuser2; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result index b254f2a25d5..73aa5e5633d 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result @@ -110,7 +110,7 @@ GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost'; SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT (f5) ON `db_datadict`.`t1` TO `testuser1`@`localhost` +GRANT SELECT (`f5`) ON `db_datadict`.`t1` TO `testuser1`@`localhost` SELECT * FROM information_schema.table_constraints WHERE table_schema = 'db_datadict' ORDER BY table_schema,table_name, constraint_name; @@ -134,7 +134,7 @@ connect testuser1, localhost, testuser1, , db_datadict; SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT (f5) ON `db_datadict`.`t1` TO `testuser1`@`localhost` +GRANT SELECT (`f5`) ON `db_datadict`.`t1` TO `testuser1`@`localhost` SELECT * FROM information_schema.table_constraints WHERE table_schema = 'db_datadict' ORDER BY table_schema,table_name, constraint_name; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result index 8d24426ac75..07a312e992d 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result @@ -391,7 +391,7 @@ connection no_privs_424d; show grants; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4d_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1d'; @@ -413,7 +413,7 @@ connection yes_privs_424d; show grants; Grants for test_yesprivs@localhost GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4d_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2d'; @@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -633,7 +633,7 @@ connection no_privs_425d; show grants; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5d_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -649,7 +649,7 @@ connection yes_privs_425d; show grants; Grants for test_yesprivs@localhost GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5d_2 before INSERT on t1 for each row set @test_var= new.f1; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result index c40cbd0ab72..684685480c2 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result @@ -1480,8 +1480,8 @@ show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1631,8 +1631,8 @@ to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1674,8 +1674,8 @@ to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result index 8d24426ac75..07a312e992d 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result @@ -391,7 +391,7 @@ connection no_privs_424d; show grants; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4d_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1d'; @@ -413,7 +413,7 @@ connection yes_privs_424d; show grants; Grants for test_yesprivs@localhost GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4d_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2d'; @@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -633,7 +633,7 @@ connection no_privs_425d; show grants; Grants for test_noprivs@localhost GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5d_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -649,7 +649,7 @@ connection yes_privs_425d; show grants; Grants for test_yesprivs@localhost GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5d_2 before INSERT on t1 for each row set @test_var= new.f1; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result index 71cf064d201..b44cdb7a007 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result @@ -1480,8 +1480,8 @@ show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1631,8 +1631,8 @@ to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1674,8 +1674,8 @@ to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` +GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result index 143dee3e6e4..87f61e2be62 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result +++ b/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result @@ -9,6 +9,14 @@ connection node_2; Cleaning grastate.dat file ... Starting server ... connection node_1; +connection node_2; +connection node_2; +Shutting down server ... +connection node_1; +connection node_2; +Cleaning grastate.dat file ... +Starting server ... +connection node_1; SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE Primary diff --git a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test index 94ea008cb16..3fff51fa26d 100644 --- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test +++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test @@ -34,6 +34,34 @@ --source include/start_mysqld.inc --source include/wait_until_ready.inc +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--connection node_2 +--echo Shutting down server ... +--source include/shutdown_mysqld.inc + +--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 + +--connection node_2 + +# +# Delete grastate.dat with safe_to_bootstrap: 0 +# +--echo Cleaning grastate.dat file ... +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat + +--echo Starting server ... +--let $restart_noprint=2 +--let $start_mysqld_params="--wsrep-new-cluster" +--source include/start_mysqld.inc +--source include/wait_until_ready.inc + --connection node_1 --let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; diff --git a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc index 9435551ce6f..879e2fe857d 100644 --- a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc +++ b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc @@ -247,3 +247,7 @@ create table t1 (a int); alter table t1 add column r blob generated always as (match(a) against ('' in boolean mode)) virtual; drop table t1; + +--echo # +--echo # End of 10.3 tests +--echo # 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 31923f25f01..f4f654c9f46 100644 --- a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc +++ b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc @@ -49,18 +49,18 @@ alter table t1 add column (h int generated always as (a+1) virtual, i int as(5) drop table t1; --echo # DEFAULT ---error 1064 +--error ER_PARSE_ERROR create table t1 (a int, b int generated always as (a+1) virtual default 0); create table t1 (a int); ---error 1064 +--error ER_PARSE_ERROR alter table t1 add column b int generated always as (a+1) virtual default 0; drop table t1; --echo # AUTO_INCREMENT ---error 1064 +--error ER_PARSE_ERROR create table t1 (a int, b int generated always as (a+1) virtual AUTO_INCREMENT); create table t1 (a int); ---error 1064 +--error ER_PARSE_ERROR alter table t1 add column b int generated always as (a+1) virtual AUTO_INCREMENT; drop table t1; @@ -203,6 +203,13 @@ create table t1 (a int, b int generated always as(-b) virtual, c int generated a create table t1 (a int, b int generated always as(-c) virtual, c int generated always as (b + 1) virtual); --error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int); +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) unique, col_int_key int); +create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key), col_int_key int); +show create table t1; +insert t1 (col_int_key) values (10),(20),(30); +select * from t1; +drop table t1; --echo # Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE create table t1 (a int, b int generated always as(-a) virtual, c int generated always as (b + 1) stored); diff --git a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result index fa8f2660aef..b9fe877b0f2 100644 --- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_innodb.result @@ -170,6 +170,9 @@ alter table t1 add column r blob generated always as (match(a) against ('' in boolean mode)) virtual; ERROR HY000: Function or expression 'match ... against()' cannot be used in the GENERATED ALWAYS AS clause of `r` drop table t1; +# +# End of 10.3 tests +# DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; diff --git a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result index b777bb485de..23fdea42488 100644 --- a/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_blocked_sql_funcs_myisam.result @@ -172,6 +172,9 @@ alter table t1 add column r blob generated always as (match(a) against ('' in boolean mode)) virtual; ERROR HY000: Function or expression 'match ... against()' cannot be used in the GENERATED ALWAYS AS clause of `r` drop table t1; +# +# End of 10.3 tests +# DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; 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 09b502a9246..25d2b50951b 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 @@ -264,6 +264,24 @@ create table t1 (a int, b int generated always as(-c) virtual, c int generated a ERROR 01000: Expression for field `b` is referring to uninitialized field `c` create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int); ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk` +create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) unique, col_int_key int); +ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk` +create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key), col_int_key int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk` int(11) NOT NULL AUTO_INCREMENT, + `col_int_nokey` int(11) GENERATED ALWAYS AS (`pk` + `col_int_key`) VIRTUAL, + `col_int_key` int(11) DEFAULT NULL, + PRIMARY KEY (`pk`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +insert t1 (col_int_key) values (10),(20),(30); +select * from t1; +pk col_int_nokey col_int_key +1 11 10 +2 22 20 +3 33 30 +drop table t1; # Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE create table t1 (a int, b int generated always as(-a) virtual, c int generated always as (b + 1) stored); insert into t1(a) values(1),(2); 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 df914904b88..4339deac5a2 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 @@ -264,6 +264,24 @@ create table t1 (a int, b int generated always as(-c) virtual, c int generated a ERROR 01000: Expression for field `b` is referring to uninitialized field `c` create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) stored, col_int_key int); ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk` +create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key) unique, col_int_key int); +ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk` +create table t1 (pk int auto_increment primary key, col_int_nokey int generated always as (pk + col_int_key), col_int_key int); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk` int(11) NOT NULL AUTO_INCREMENT, + `col_int_nokey` int(11) GENERATED ALWAYS AS (`pk` + `col_int_key`) VIRTUAL, + `col_int_key` int(11) DEFAULT NULL, + PRIMARY KEY (`pk`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +insert t1 (col_int_key) values (10),(20),(30); +select * from t1; +pk col_int_nokey col_int_key +1 11 10 +2 22 20 +3 33 30 +drop table t1; # Bug#20339347: FAIL TO USE CREATE ....SELECT STATEMENT TO CREATE A NEW TABLE create table t1 (a int, b int generated always as(-a) virtual, c int generated always as (b + 1) stored); insert into t1(a) values(1),(2); diff --git a/mysql-test/suite/innodb/r/deadlock_in_subqueries_join.result b/mysql-test/suite/innodb/r/deadlock_in_subqueries_join.result new file mode 100644 index 00000000000..2e82b0662f8 --- /dev/null +++ b/mysql-test/suite/innodb/r/deadlock_in_subqueries_join.result @@ -0,0 +1,50 @@ +CREATE TABLE t1 ( +pkey int NOT NULL PRIMARY KEY, +c int +) ENGINE=InnoDB; +INSERT INTO t1 VALUES(1,1); +CREATE TABLE t2 ( +pkey int NOT NULL PRIMARY KEY, +c int +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t2 VALUES (2, NULL); +CREATE TABLE t3 (c int) engine = InnoDB; +INSERT INTO t3 VALUES (10), (20), (30), (40), (50); +connect con1, localhost,root,,; +connection default; +START TRANSACTION; +UPDATE t3 SET c=c+1000; +SELECT * FROM t1 FOR UPDATE; +pkey c +1 1 +connection con1; +START TRANSACTION; +DELETE FROM t2 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey); +connection default; +SELECT * FROM t2 FOR UPDATE; +pkey c +2 NULL +COMMIT; +connection con1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +COMMIT; +connection default; +START TRANSACTION; +UPDATE t3 SET c=c+1000; +SELECT * FROM t1 FOR UPDATE; +pkey c +1 1 +connection con1; +START TRANSACTION; +UPDATE t2 SET pkey=pkey+10 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey); +connection default; +SELECT * FROM t2 FOR UPDATE; +pkey c +2 NULL +COMMIT; +connection con1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +COMMIT; +disconnect con1; +connection default; +DROP TABLE t1,t2,t3; diff --git a/mysql-test/suite/innodb/r/full_crc32_import.result b/mysql-test/suite/innodb/r/full_crc32_import.result index f08cc9a5e53..99f11548420 100644 --- a/mysql-test/suite/innodb/r/full_crc32_import.result +++ b/mysql-test/suite/innodb/r/full_crc32_import.result @@ -38,6 +38,8 @@ restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing. ALTER TABLE t1 DROP INDEX b; +Warnings: +Warning 1814 Tablespace has been discarded for table `t1` ALTER TABLE t1 IMPORT TABLESPACE; SHOW CREATE TABLE t1; Table Create Table @@ -116,9 +118,10 @@ restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; ERROR HY000: Internal error: Drop all secondary indexes before importing table test/t1 when .cfg file is missing. ALTER TABLE t1 DROP INDEX idx1; -ALTER TABLE t1 IMPORT TABLESPACE; Warnings: Warning 1814 Tablespace has been discarded for table `t1` +ALTER TABLE t1 IMPORT TABLESPACE; +Warnings: Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/suite/innodb/r/import_tablespace_race.result b/mysql-test/suite/innodb/r/import_tablespace_race.result new file mode 100644 index 00000000000..786b8cbd261 --- /dev/null +++ b/mysql-test/suite/innodb/r/import_tablespace_race.result @@ -0,0 +1,26 @@ +# +# MDEV-29144 ER_TABLE_SCHEMA_MISMATCH or crash on DISCARD/IMPORT +# +CREATE TABLE t (pk int PRIMARY KEY, c varchar(1024)) +ENGINE=InnoDB CHARSET latin1; +INSERT INTO t SELECT seq, 'x' FROM seq_1_to_100; +connect con1,localhost,root,,test; +BEGIN NOT ATOMIC +DECLARE a INT DEFAULT 0; +REPEAT +SET a= a+1; +UPDATE t SET c = 'xx' WHERE pk = a; +UNTIL a = 100 +END REPEAT; +END +$ +connection default; +ALTER TABLE t NOWAIT ADD INDEX (c); +connection con1; +connection default; +FLUSH TABLE t FOR EXPORT; +UNLOCK TABLES; +DROP TABLE t; +ALTER TABLE t DISCARD TABLESPACE; +ALTER TABLE t IMPORT TABLESPACE; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result index 3e977cdde2f..1609812ed30 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-timestamp.result +++ b/mysql-test/suite/innodb/r/innodb-alter-timestamp.result @@ -146,6 +146,8 @@ CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB; ALTER TABLE t DISCARD TABLESPACE; SET sql_mode='NO_ZERO_DATE'; ALTER TABLE t ADD c DATE NOT NULL; +Warnings: +Warning 1814 Tablespace has been discarded for table `t` SET sql_mode=DEFAULT; DROP TABLE t; # End of 10.3 tests diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index 6487264ef68..8078daad633 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -460,10 +460,26 @@ SET DEBUG_SYNC = 'now WAIT_FOR created'; UPDATE t1 SET f = REPEAT('a', 20000); SET DEBUG_SYNC = 'now SIGNAL updated'; connection con1; -disconnect con1; connection default; DROP TABLE t1; -SET DEBUG_SYNC = 'RESET'; +# +# MDEV-29977 Memory leak in row_log_table_apply_update +# +CREATE TABLE t1(f1 longtext, f2 int, KEY(f1(1024)), KEY(f2, f1(20))) ENGINE=InnoDB; +INSERT INTO t1 VALUES('a', 1); +connection con1; +set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con_default WAIT_FOR con1_signal"; +ALTER TABLE t1 FORCE; +connection default; +SET DEBUG_SYNC="now WAIT_FOR con_default"; +UPDATE t1 SET f1 = NULL; +UPDATE t1 SET f1 = REPEAT('b', 9000); +SET DEBUG_SYNC="now SIGNAL con1_signal"; +connection con1; +DROP TABLE t1; +connection default; +SET DEBUG_SYNC=RESET; +disconnect con1; SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig; SET GLOBAL innodb_monitor_enable = default; SET GLOBAL innodb_monitor_disable = default; diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-1.result b/mysql-test/suite/innodb/r/innodb-wl5522-1.result index 55557a8fb99..204d6bc8b78 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-1.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-1.result @@ -795,3 +795,19 @@ DROP DATABASE testdb_wl5522; call mtr.add_suppression("Got error -1 when reading table '.*'"); call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); +# +# MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message +# +# +CREATE TABLE `t1` (`i` int(11) NOT NULL, PRIMARY KEY (`i`) ) ENGINE=InnoDB; +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +ALTER TABLE t1 DISCARD TABLESPACE; +call mtr.add_suppression("InnoDB: unsupported MySQL tablespace"); +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR 42000: Table 't1' uses an extension that doesn't exist in this MariaDB version +DROP TABLE t1; +# +# End of 10.3 tests +# diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result index d9766db4c86..92ba8ac7147 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -449,7 +449,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Too many concurrent transactions +ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Too many concurrent transactions restore: t1 .ibd and .cfg files SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; @@ -851,7 +851,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption +ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; unlink: t1.ibd @@ -863,7 +863,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption +ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; unlink: t1.ibd @@ -901,6 +901,8 @@ ALTER TABLE t1 DISCARD TABLESPACE; SELECT COUNT(*) FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` ALTER TABLE t1 ADD INDEX idx(c1); +Warnings: +Warning 1814 Tablespace has been discarded for table `t1` DROP TABLE t1; unlink: t1.ibd unlink: t1.cfg diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result index e9edd371a7c..d5ebfe2b959 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522.result @@ -251,13 +251,15 @@ ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.) select count(*) from t1; ERROR HY000: Tablespace has been discarded for table `t1` ALTER TABLE t1 DROP INDEX x; +Warnings: +Warning 1814 Tablespace has been discarded for table `t1` ALTER TABLE t1 DROP INDEX x, ALGORITHM=copy; ERROR 42000: Can't DROP INDEX `x`; check that it exists ALTER TABLE t1 ADD INDEX idx(c2); -restore: t1 .ibd and .cfg files -ALTER TABLE t1 IMPORT TABLESPACE; Warnings: Warning 1814 Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result index db98a6a5fcf..f56938550ac 100644 --- a/mysql-test/suite/innodb/r/instant_alter_bugs.result +++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result @@ -193,8 +193,6 @@ Warnings: Warning 1814 Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -Warnings: -Warning 1814 Tablespace has been discarded for table `t1` SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/innodb/r/instant_alter_import.result b/mysql-test/suite/innodb/r/instant_alter_import.result index 9b14930b12d..d8c9a793a2e 100644 --- a/mysql-test/suite/innodb/r/instant_alter_import.result +++ b/mysql-test/suite/innodb/r/instant_alter_import.result @@ -147,8 +147,6 @@ INSERT INTO t1 VALUES(1); FLUSH TABLE t1 FOR EXPORT; unlock tables; ALTER TABLE t IMPORT tablespace; -Warnings: -Warning 1814 Tablespace has been discarded for table `t` check table t; Table Op Msg_type Msg_text test.t check status OK diff --git a/mysql-test/suite/innodb/r/restart.result b/mysql-test/suite/innodb/r/restart.result index 2c786572cd8..9e3307eccf8 100644 --- a/mysql-test/suite/innodb/r/restart.result +++ b/mysql-test/suite/innodb/r/restart.result @@ -3,6 +3,8 @@ # # FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files # of tables with .isl file or DATA DIRECTORY attribute. +call mtr.add_suppression("\\[ERROR\\] InnoDB: MySQL-8\\.0 tablespace in "); +call mtr.add_suppression("\\[ERROR\\] InnoDB: Restart in MySQL for migration/recovery\\."); # FIXME: This is much more noisy than MariaDB 10.1! call mtr.add_suppression("\\[ERROR\\] InnoDB: Tablespace flags are invalid in datafile: .*test.t[rcd]\\.ibd"); call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\."); @@ -41,3 +43,11 @@ Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_si Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; +# +# MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message +# +FOUND 1 /InnoDB: MySQL-8\.0 tablespace in \./ibdata1/ in attempted_start.err +# restart +# +# End of 10.3 tests +# diff --git a/mysql-test/suite/innodb/t/create_isl_with_direct.test b/mysql-test/suite/innodb/t/create_isl_with_direct.test index 2092d03b72f..45d7fbf4ea5 100644 --- a/mysql-test/suite/innodb/t/create_isl_with_direct.test +++ b/mysql-test/suite/innodb/t/create_isl_with_direct.test @@ -2,13 +2,6 @@ --source include/have_innodb.inc --source include/have_symlink.inc ---disable_query_log -CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*"); - -# The below mtr suppression to avoid failure in solaris platform. -CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to set DIRECTIO_ON on file.*"); ---enable_query_log - SHOW VARIABLES LIKE 'innodb_flush_method'; let MYSQLD_DATADIR=`SELECT @@datadir`; diff --git a/mysql-test/suite/innodb/t/deadlock_in_subqueries_join.test b/mysql-test/suite/innodb/t/deadlock_in_subqueries_join.test new file mode 100644 index 00000000000..b3adfb3b02d --- /dev/null +++ b/mysql-test/suite/innodb/t/deadlock_in_subqueries_join.test @@ -0,0 +1,81 @@ +--source include/have_innodb.inc +--source include/count_sessions.inc + +CREATE TABLE t1 ( + pkey int NOT NULL PRIMARY KEY, + c int +) ENGINE=InnoDB; + +INSERT INTO t1 VALUES(1,1); + +CREATE TABLE t2 ( + pkey int NOT NULL PRIMARY KEY, + c int +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +INSERT INTO t2 VALUES (2, NULL); + +# The following table is to increase tansaction weight on deadlock resolution +CREATE TABLE t3 (c int) engine = InnoDB; +INSERT INTO t3 VALUES (10), (20), (30), (40), (50); + +--let $i= 2 +--let $delete= 2 +--let $update= 1 +--connect(con1, localhost,root,,) + +while($i) { +--connection default +START TRANSACTION; # trx 1 +# The following update is necessary to increase the transaction weight, which is +# calculated as the number of locks + the number of undo records during deadlock +# report. Victim's transaction should have minimum weight. We need trx 2 to be +# choosen as victim, that's why we need to increase the current transaction +# weight. +UPDATE t3 SET c=c+1000; +SELECT * FROM t1 FOR UPDATE; + +--connection con1 +START TRANSACTION; # trx 2 +# 1) read record from t2, lock it +# 2) check if the read record should be deleted, i.e. read record from t1, +# as the record from t1 is locked by trx 1, the subselect will be suspended. +# see 'while' loop in mysql_delete() or mysql_update() and +# select->skip_record(thd) call for details. +if ($i == $delete) { +--send DELETE FROM t2 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey) +} +if ($i == $update) { +--send UPDATE t2 SET pkey=pkey+10 WHERE c NOT IN (SELECT ref_0.pkey FROM t1 AS ref_0 INNER JOIN t1 AS ref_1 ON ref_0.c = ref_0.pkey) +} + +--connection default +let $wait_condition= + SELECT count(*) = 1 FROM information_schema.processlist + WHERE (state = 'Sending data' OR state = "Updating") + AND (info LIKE 'delete from t2 where%' OR + info LIKE 'UPDATE t2 SET pkey=pkey+10 WHERE%'); +--source include/wait_condition.inc + +# The record from t2 is locked by the previous delete, so trx 2 is waiting for +# trx 1, and trx 1 will be blocked by trx 2 with the following SELECT. So we +# have deadlock here. And trx 2 is chosen as deadlock victim as trx 1 has +# greater weight. +SELECT * FROM t2 FOR UPDATE; +COMMIT; + +--connection con1 +# If the bug is not fixed, there will be assertion failure as +# mysql_delete()/mysql_update() will continue execution despite its subselect +# got deadlock error +--error ER_LOCK_DEADLOCK +--reap +COMMIT; +--dec $i +} + +--disconnect con1 + +--connection default +DROP TABLE t1,t2,t3; +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/import_tablespace_race.test b/mysql-test/suite/innodb/t/import_tablespace_race.test new file mode 100644 index 00000000000..532c2684dde --- /dev/null +++ b/mysql-test/suite/innodb/t/import_tablespace_race.test @@ -0,0 +1,54 @@ +--source include/have_innodb.inc +--source include/have_sequence.inc + +--echo # +--echo # MDEV-29144 ER_TABLE_SCHEMA_MISMATCH or crash on DISCARD/IMPORT +--echo # + +CREATE TABLE t (pk int PRIMARY KEY, c varchar(1024)) +ENGINE=InnoDB CHARSET latin1; +INSERT INTO t SELECT seq, 'x' FROM seq_1_to_100; + +--connect (con1,localhost,root,,test) +--delimiter $ +--send + BEGIN NOT ATOMIC + DECLARE a INT DEFAULT 0; + REPEAT + SET a= a+1; + UPDATE t SET c = 'xx' WHERE pk = a; + UNTIL a = 100 + END REPEAT; + END +$ +--delimiter ; + +--connection default +--error 0,ER_LOCK_WAIT_TIMEOUT +ALTER TABLE t NOWAIT ADD INDEX (c); + +--connection con1 +--reap + +--connection default + +--let $datadir= `select @@datadir` + +FLUSH TABLE t FOR EXPORT; +--let $create= query_get_value(SHOW CREATE TABLE t, Create Table, 1) +--copy_file $datadir/test/t.cfg $MYSQL_TMP_DIR/t.cfg +--copy_file $datadir/test/t.ibd $MYSQL_TMP_DIR/t.ibd +UNLOCK TABLES; + +DROP TABLE t; +--disable_query_log +eval $create; +--enable_query_log + +ALTER TABLE t DISCARD TABLESPACE; +--move_file $MYSQL_TMP_DIR/t.cfg $datadir/test/t.cfg +--move_file $MYSQL_TMP_DIR/t.ibd $datadir/test/t.ibd +ALTER TABLE t IMPORT TABLESPACE; + +# Cleanup +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index 997b0a5bf10..a89073db4f7 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -413,11 +413,28 @@ SET DEBUG_SYNC = 'now SIGNAL updated'; connection con1; reap; -disconnect con1; connection default; DROP TABLE t1; -SET DEBUG_SYNC = 'RESET'; +--echo # +--echo # MDEV-29977 Memory leak in row_log_table_apply_update +--echo # +CREATE TABLE t1(f1 longtext, f2 int, KEY(f1(1024)), KEY(f2, f1(20))) ENGINE=InnoDB; +INSERT INTO t1 VALUES('a', 1); +connection con1; +set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con_default WAIT_FOR con1_signal"; +send ALTER TABLE t1 FORCE; +connection default; +SET DEBUG_SYNC="now WAIT_FOR con_default"; +UPDATE t1 SET f1 = NULL; +UPDATE t1 SET f1 = REPEAT('b', 9000); +SET DEBUG_SYNC="now SIGNAL con1_signal"; +connection con1; +reap; +DROP TABLE t1; +connection default; +SET DEBUG_SYNC=RESET; +disconnect con1; # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-1.test b/mysql-test/suite/innodb/t/innodb-wl5522-1.test index 0d59df11c44..dbd58835ec6 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522-1.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522-1.test @@ -932,3 +932,34 @@ call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tabl --remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd --remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.cfg --remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.ibd + +--echo # +--echo # MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message +--echo # +--echo # + +CREATE TABLE `t1` (`i` int(11) NOT NULL, PRIMARY KEY (`i`) ) ENGINE=InnoDB; +FLUSH TABLES t1 FOR EXPORT; + +# We use the cfg file of ours. +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; +ALTER TABLE t1 DISCARD TABLESPACE; + +--move_file $MYSQLTEST_VARDIR/tmp/t1.cfg $MYSQLD_DATADIR/test/t1.cfg +--copy_file std_data/mysql80/t1.ibd $MYSQLD_DATADIR/test/t1.ibd + +call mtr.add_suppression("InnoDB: unsupported MySQL tablespace"); +--error ER_UNSUPPORTED_EXTENSION +ALTER TABLE t1 IMPORT TABLESPACE; + +DROP TABLE t1; +--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd + +--echo # +--echo # End of 10.3 tests +--echo # diff --git a/mysql-test/suite/innodb/t/restart.test b/mysql-test/suite/innodb/t/restart.test index cd5e7532354..32058b3abf5 100644 --- a/mysql-test/suite/innodb/t/restart.test +++ b/mysql-test/suite/innodb/t/restart.test @@ -15,6 +15,9 @@ let page_size= `select @@innodb_page_size`; --echo # FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files --echo # of tables with .isl file or DATA DIRECTORY attribute. +call mtr.add_suppression("\\[ERROR\\] InnoDB: MySQL-8\\.0 tablespace in "); +call mtr.add_suppression("\\[ERROR\\] InnoDB: Restart in MySQL for migration/recovery\\."); + --echo # FIXME: This is much more noisy than MariaDB 10.1! call mtr.add_suppression("\\[ERROR\\] InnoDB: Tablespace flags are invalid in datafile: .*test.t[rcd]\\.ibd"); call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\."); @@ -47,7 +50,7 @@ die unless open OUT, ">", "$ENV{datadir}/test/tc.ibd"; print OUT "bar " x $ENV{page_size}; close OUT or die; die unless open OUT, ">", "$ENV{MYSQL_TMP_DIR}/test/td.ibd"; -print OUT "xyz " x $ENV{page_size}; +print OUT "Xyz " x $ENV{page_size}; close OUT or die; EOF @@ -101,3 +104,60 @@ EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size --source include/wait_condition.inc SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; + +--echo # +--echo # MDEV-27882 Innodb - recognise MySQL-8.0 innodb flags and give a specific error message +--echo # + +--let MYSQLD_DATADIR= `SELECT @@datadir` +--let SERVER_ID= `SELECT @@server_id` +--let EXPECT_FILE_NAME= $MYSQLTEST_VARDIR/tmp/mysqld.$SERVER_ID.expect + +--source include/shutdown_mysqld.inc + +--move_file $MYSQLD_DATADIR/ibdata1 $MYSQLD_DATADIR/ibdata1.bak +--copy_file std_data/mysql80/ibdata1_$page_size $MYSQLD_DATADIR/ibdata1 + +perl; +use IO::Handle; +my $size = 9 * 1048576; +if ($ENV{MTR_COMBINATION_32K}) { + $size *= 2; +} +if ($ENV{MTR_COMBINATION_64K}) { + $size *= 4; +} +$size -= $ENV{page_size}; +die unless open(FILE, ">>", "$ENV{MYSQLD_DATADIR}/ibdata1"); +binmode FILE; + +print FILE chr(0) x $size; +close(FILE); +EOF + +--let ibdata_size='9M' +if ($MTR_COMBINATION_32K) +{ +--let ibdata_size='18M' +} +if ($MTR_COMBINATION_64K) +{ +--let ibdata_size='36M' +} + +--error 1 +exec $MYSQLD --no-defaults --skip-networking --innodb_data_file_path=ibdata1:$ibdata_size --innodb-page-size=$page_size --datadir=$MYSQLD_DATADIR --log-error=$MYSQL_TMP_DIR/attempted_start.err; + +let SEARCH_FILE= $MYSQL_TMP_DIR/attempted_start.err; +let SEARCH_PATTERN= InnoDB: MySQL-8\.0 tablespace in \./ibdata1; +source include/search_pattern_in_file.inc; + +--remove_file $MYSQL_TMP_DIR/attempted_start.err +--remove_file $MYSQLD_DATADIR/ibdata1 +--move_file $MYSQLD_DATADIR/ibdata1.bak $MYSQLD_DATADIR/ibdata1 + +--source include/start_mysqld.inc + +--echo # +--echo # End of 10.3 tests +--echo # diff --git a/mysql-test/suite/innodb_fts/r/fulltext2.result b/mysql-test/suite/innodb_fts/r/fulltext2.result index 7ec2df8ee46..10fee848849 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext2.result +++ b/mysql-test/suite/innodb_fts/r/fulltext2.result @@ -279,3 +279,20 @@ ALTER TABLE t1 ADD d INT NULL; ALTER TABLE t1 ADD FULLTEXT(b); ERROR HY000: Index 'FTS_DOC_ID_INDEX' is of wrong type for an InnoDB FULLTEXT index DROP TABLE t1; +# +# MDEV-29169 Using MATCH returns NULL for Virtual Column +# +CREATE TABLE t (a TEXT DEFAULT NULL, +b TEXT AS (a), +c TEXT AS (concat(a, '1')), +d int AS (111) VIRTUAL, +FULLTEXT KEY `a` (`a`) +) ENGINE=InnoDB; +INSERT INTO t (a) VALUES ('test'); +SELECT * FROM t; +a b c d +test test test1 111 +SELECT * FROM t WHERE MATCH(a) AGAINST('test'); +a b c d +test test test1 111 +DROP TABLE t; diff --git a/mysql-test/suite/innodb_fts/t/fulltext2.test b/mysql-test/suite/innodb_fts/t/fulltext2.test index 1e3894644a0..25a4d5b24f9 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext2.test +++ b/mysql-test/suite/innodb_fts/t/fulltext2.test @@ -268,3 +268,19 @@ ALTER TABLE t1 ADD d INT NULL; --error ER_INNODB_FT_WRONG_DOCID_INDEX ALTER TABLE t1 ADD FULLTEXT(b); DROP TABLE t1; + +--echo # +--echo # MDEV-29169 Using MATCH returns NULL for Virtual Column +--echo # +CREATE TABLE t (a TEXT DEFAULT NULL, + b TEXT AS (a), + c TEXT AS (concat(a, '1')), + d int AS (111) VIRTUAL, + FULLTEXT KEY `a` (`a`) +) ENGINE=InnoDB; + +INSERT INTO t (a) VALUES ('test'); +SELECT * FROM t; +SELECT * FROM t WHERE MATCH(a) AGAINST('test'); + +DROP TABLE t; diff --git a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result index cecb313640d..a257ad44760 100644 --- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result @@ -84,7 +84,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Too many concurrent transactions +ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Too many concurrent transactions restore: t1 .ibd and .cfg files SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; @@ -313,7 +313,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption +ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; unlink: t1.ibd @@ -326,7 +326,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption +ERROR HY000: Internal error: Error importing tablespace for table `test`.`t1` : Data structure corruption SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; unlink: t1.ibd @@ -364,6 +364,8 @@ SELECT COUNT(*) FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` SET SESSION debug_dbug="+d,ib_import_create_index_failure_1"; ALTER TABLE t1 ADD INDEX idx(c1); +Warnings: +Warning 1814 Tablespace has been discarded for table `t1` SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; unlink: t1.ibd diff --git a/mysql-test/suite/innodb_zip/r/wl5522_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_zip.result index a6810ab5af7..e1e48b02319 100644 --- a/mysql-test/suite/innodb_zip/r/wl5522_zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_zip.result @@ -231,13 +231,13 @@ restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.) ALTER TABLE t1 DROP INDEX x; +Warnings: +Warning 1814 Tablespace has been discarded for table `t1` ALTER TABLE t1 ADD INDEX idx(c2); Warnings: Warning 1814 Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -Warnings: -Warning 1814 Tablespace has been discarded for table `t1` CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc index fcfd5bce746..974e4fe559d 100644 --- a/mysql-test/suite/parts/inc/partition_auto_increment.inc +++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc @@ -873,6 +873,19 @@ eval CREATE OR REPLACE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=$ INSERT INTO t1 VALUES (1,1),(2,2); UPDATE t1 SET pk = 0; DROP TABLE t1; + +--echo # +--echo # MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' +--echo # failed in ha_partition::set_auto_increment_if_higher upon REPLACE +--echo # with partition pruning +--echo # +eval CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE=$engine +PARTITION BY RANGE (a) ( + PARTITION p0 VALUES LESS THAN (10), + PARTITION pn VALUES LESS THAN MAXVALUE +); +REPLACE INTO t1 PARTITION (p0) SELECT 1; +DROP TABLE t1; } if (!$skip_delete) diff --git a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result index 94e4a64ab6a..8c82541b988 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result @@ -704,6 +704,18 @@ INSERT INTO t1 VALUES (1,1),(2,2); UPDATE t1 SET pk = 0; DROP TABLE t1; # +# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' +# failed in ha_partition::set_auto_increment_if_higher upon REPLACE +# with partition pruning +# +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Blackhole' +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (10), +PARTITION pn VALUES LESS THAN MAXVALUE +); +REPLACE INTO t1 PARTITION (p0) SELECT 1; +DROP TABLE t1; +# # MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' # ha_partition::set_auto_increment_if_higher # diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result index a10eee73a2e..48b0d06575a 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result @@ -1111,6 +1111,18 @@ INSERT INTO t1 VALUES (1,1),(2,2); UPDATE t1 SET pk = 0; DROP TABLE t1; # +# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' +# failed in ha_partition::set_auto_increment_if_higher upon REPLACE +# with partition pruning +# +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='InnoDB' +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (10), +PARTITION pn VALUES LESS THAN MAXVALUE +); +REPLACE INTO t1 PARTITION (p0) SELECT 1; +DROP TABLE t1; +# # MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' # ha_partition::set_auto_increment_if_higher # diff --git a/mysql-test/suite/parts/r/partition_auto_increment_maria.result b/mysql-test/suite/parts/r/partition_auto_increment_maria.result index d9bc3b77ed5..3767a278503 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_maria.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_maria.result @@ -1158,6 +1158,18 @@ INSERT INTO t1 VALUES (1,1),(2,2); UPDATE t1 SET pk = 0; DROP TABLE t1; # +# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' +# failed in ha_partition::set_auto_increment_if_higher upon REPLACE +# with partition pruning +# +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Aria' +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (10), +PARTITION pn VALUES LESS THAN MAXVALUE +); +REPLACE INTO t1 PARTITION (p0) SELECT 1; +DROP TABLE t1; +# # MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' # ha_partition::set_auto_increment_if_higher # diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result index c265ffeeed6..936e3e9e1cb 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result @@ -1139,6 +1139,18 @@ INSERT INTO t1 VALUES (1,1),(2,2); UPDATE t1 SET pk = 0; DROP TABLE t1; # +# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' +# failed in ha_partition::set_auto_increment_if_higher upon REPLACE +# with partition pruning +# +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='Memory' +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (10), +PARTITION pn VALUES LESS THAN MAXVALUE +); +REPLACE INTO t1 PARTITION (p0) SELECT 1; +DROP TABLE t1; +# # MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' # ha_partition::set_auto_increment_if_higher # diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result index a0befe8ef2c..475533ceb76 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result @@ -1158,6 +1158,18 @@ INSERT INTO t1 VALUES (1,1),(2,2); UPDATE t1 SET pk = 0; DROP TABLE t1; # +# MDEV-29636 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' +# failed in ha_partition::set_auto_increment_if_higher upon REPLACE +# with partition pruning +# +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY) ENGINE='MyISAM' +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (10), +PARTITION pn VALUES LESS THAN MAXVALUE +); +REPLACE INTO t1 PARTITION (p0) SELECT 1; +DROP TABLE t1; +# # MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' # ha_partition::set_auto_increment_if_higher # diff --git a/mysql-test/suite/parts/t/partition_special_myisam.test b/mysql-test/suite/parts/t/partition_special_myisam.test index 5a573259373..b6f25484f3a 100644 --- a/mysql-test/suite/parts/t/partition_special_myisam.test +++ b/mysql-test/suite/parts/t/partition_special_myisam.test @@ -74,6 +74,7 @@ COMMIT; --connection con3 --reap +--remove_file $MYSQLD_DATADIR/test/load.in DROP TABLE t1; --disconnect con3 diff --git a/mysql-test/suite/roles/recursive.result b/mysql-test/suite/roles/recursive.result index 05f28745f02..daacd2ed250 100644 --- a/mysql-test/suite/roles/recursive.result +++ b/mysql-test/suite/roles/recursive.result @@ -202,7 +202,7 @@ count(concat(User)) 22 show grants; Grants for foo@localhost -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1` GRANT USAGE ON *.* TO `foo`@`localhost` GRANT USAGE ON *.* TO `role10` GRANT USAGE ON *.* TO `role1` @@ -236,8 +236,8 @@ count(concat(User,Host)) 22 show grants; Grants for foo@localhost -GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO `role3` -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT SELECT (`Host`) ON `mysql`.`roles_mapping` TO `role3` +GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1` GRANT USAGE ON *.* TO `foo`@`localhost` GRANT USAGE ON *.* TO `role10` GRANT USAGE ON *.* TO `role1` diff --git a/mysql-test/suite/roles/recursive_dbug.result b/mysql-test/suite/roles/recursive_dbug.result index 55bbad51c09..b94f55ae6fb 100644 --- a/mysql-test/suite/roles/recursive_dbug.result +++ b/mysql-test/suite/roles/recursive_dbug.result @@ -246,7 +246,7 @@ count(concat(User)) 22 show grants; Grants for foo@localhost -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1` GRANT USAGE ON *.* TO `foo`@`localhost` GRANT USAGE ON *.* TO `role10` GRANT USAGE ON *.* TO `role1` @@ -285,8 +285,8 @@ count(concat(User,Host)) 22 show grants; Grants for foo@localhost -GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO `role3` -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT SELECT (`Host`) ON `mysql`.`roles_mapping` TO `role3` +GRANT SELECT (`User`) ON `mysql`.`roles_mapping` TO `role1` GRANT USAGE ON *.* TO `foo`@`localhost` GRANT USAGE ON *.* TO `role10` GRANT USAGE ON *.* TO `role1` diff --git a/mysql-test/suite/roles/set_role-table-column-priv.result b/mysql-test/suite/roles/set_role-table-column-priv.result index e0e8732e7a5..a680e3ff8c4 100644 --- a/mysql-test/suite/roles/set_role-table-column-priv.result +++ b/mysql-test/suite/roles/set_role-table-column-priv.result @@ -31,7 +31,7 @@ current_user() current_role() test_user@localhost test_role1 show grants; Grants for test_user@localhost -GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO `test_role2` +GRANT SELECT (`Role`) ON `mysql`.`roles_mapping` TO `test_role2` GRANT USAGE ON *.* TO `test_role1` GRANT USAGE ON *.* TO `test_role2` GRANT USAGE ON *.* TO `test_user`@`localhost` @@ -47,7 +47,7 @@ test_role2 test_role2 show grants; Grants for test_user@localhost -GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO `test_role2` +GRANT SELECT (`Role`) ON `mysql`.`roles_mapping` TO `test_role2` GRANT USAGE ON *.* TO `test_role1` GRANT USAGE ON *.* TO `test_role2` GRANT USAGE ON *.* TO `test_user`@`localhost` diff --git a/mysql-test/suite/rpl/include/rpl_ssl.inc b/mysql-test/suite/rpl/include/rpl_ssl.inc index bd77f213ae1..59a2af9f137 100644 --- a/mysql-test/suite/rpl/include/rpl_ssl.inc +++ b/mysql-test/suite/rpl/include/rpl_ssl.inc @@ -6,6 +6,7 @@ source include/have_ssl_communication.inc; source include/master-slave.inc; +source include/no_valgrind_without_big.inc; # create a user for replication that requires ssl encryption connection master; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index 3e6cdac820e..b7447a19582 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -48,7 +48,7 @@ GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localho GRANT USAGE ON *.* TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` +GRANT SELECT (`a`), INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost` GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` GRANT USAGE ON *.* TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; @@ -73,7 +73,7 @@ GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost` GRANT USAGE ON *.* TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` +GRANT SELECT (`a`), INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost` GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` GRANT USAGE ON *.* TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; @@ -100,7 +100,7 @@ Grants for mysqltest1@localhost GRANT USAGE ON *.* TO `mysqltest1`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` +GRANT INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost` GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` GRANT USAGE ON *.* TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; @@ -114,7 +114,7 @@ show grants for mysqltest3@localhost; Grants for mysqltest3@localhost GRANT USAGE ON *.* TO `mysqltest3`@`localhost` GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` +GRANT INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test index 4d96fd694ec..7a7e1c1e074 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test @@ -1,6 +1,7 @@ source include/not_embedded.inc; source include/have_innodb.inc; source include/master-slave.inc; +source include/no_valgrind_without_big.inc; let $engine_type= InnoDB; diff --git a/mysql-test/suite/vcol/r/not_supported.result b/mysql-test/suite/vcol/r/not_supported.result index d8703f755da..37ce4865dcc 100644 --- a/mysql-test/suite/vcol/r/not_supported.result +++ b/mysql-test/suite/vcol/r/not_supported.result @@ -42,3 +42,16 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp # # End of 10.2 tests # +create table t1 (a int, b real as (rand()), c real as (b) stored); +ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c` +create table t1 (a int, b real as (rand()), c real as (b) unique); +ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c` +create table t1 (a int auto_increment primary key, +b int as (a+1), c int as (b+1) stored); +ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c` +create table t1 (a int auto_increment primary key, +b int as (a+1), c int as (b+1) unique); +ERROR HY000: Function or expression 'b' cannot be used in the GENERATED ALWAYS AS clause of `c` +# +# End of 10.3 tests +# diff --git a/mysql-test/suite/vcol/r/upgrade.result b/mysql-test/suite/vcol/r/upgrade.result index fea6588a5f3..5393a3543dc 100644 --- a/mysql-test/suite/vcol/r/upgrade.result +++ b/mysql-test/suite/vcol/r/upgrade.result @@ -6,7 +6,7 @@ show create table vcol_autoinc; Table Create Table vcol_autoinc CREATE TABLE `vcol_autoinc` ( `pk` int(11) NOT NULL AUTO_INCREMENT, - `v3` int(11) GENERATED ALWAYS AS (`pk`) VIRTUAL, + `v3` int(11) GENERATED ALWAYS AS (`pk`) STORED, PRIMARY KEY (`pk`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci select * from vcol_autoinc; diff --git a/mysql-test/suite/vcol/t/not_supported.test b/mysql-test/suite/vcol/t/not_supported.test index 2b5baf4ff4b..d58b207a7eb 100644 --- a/mysql-test/suite/vcol/t/not_supported.test +++ b/mysql-test/suite/vcol/t/not_supported.test @@ -49,3 +49,18 @@ create table t1 (a int, b serial as (a+1)); --echo # --echo # End of 10.2 tests --echo # + +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int, b real as (rand()), c real as (b) stored); +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int, b real as (rand()), c real as (b) unique); +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int auto_increment primary key, + b int as (a+1), c int as (b+1) stored); +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int auto_increment primary key, + b int as (a+1), c int as (b+1) unique); + +--echo # +--echo # End of 10.3 tests +--echo # |