summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-06-21 17:49:33 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-06-21 17:49:33 +0300
commit4dfec8b23085a1b9e24787aa61d8954bb5492068 (patch)
tree4fa65869771c1ea74bca8741ec6be1fce43d7967 /mysql-test
parentbad1440325ba2c96530408fe2fd6484fc1c7c290 (diff)
parenta42c80bd480c2060eca30101dab20ea6f6418bc8 (diff)
downloadmariadb-git-4dfec8b23085a1b9e24787aa61d8954bb5492068.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/connect-abstract.cnf3
-rw-r--r--mysql-test/main/connect-abstract.result2
-rw-r--r--mysql-test/main/connect-abstract.test5
-rw-r--r--mysql-test/main/failed_auth_unixsocket.result7
-rw-r--r--mysql-test/main/failed_auth_unixsocket.test7
-rw-r--r--mysql-test/main/password_expiration_unix_socket.result6
-rw-r--r--mysql-test/main/password_expiration_unix_socket.test18
-rw-r--r--mysql-test/main/win.result19
-rw-r--r--mysql-test/main/win.test14
-rw-r--r--mysql-test/main/wolfssl.opt1
-rw-r--r--mysql-test/main/wolfssl.test6
-rw-r--r--mysql-test/suite.pm2
-rw-r--r--mysql-test/suite/encryption/r/innodb-key-rotation-disable.result4
-rw-r--r--mysql-test/suite/encryption/r/key_version_rotation.result20
-rw-r--r--mysql-test/suite/encryption/r/tempfiles_encrypted.result19
-rw-r--r--mysql-test/suite/encryption/t/innodb-key-rotation-disable.test3
-rw-r--r--mysql-test/suite/encryption/t/key_version_rotation.opt2
-rw-r--r--mysql-test/suite/encryption/t/key_version_rotation.test41
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_index.result34
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_index.opt1
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_index.test33
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result3
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test3
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug.result10
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug.test12
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_3.result8
-rw-r--r--mysql-test/suite/mariabackup/auth_plugin_win.result2
-rw-r--r--mysql-test/suite/mariabackup/auth_plugin_win.test2
-rw-r--r--mysql-test/suite/plugins/r/multiauth.result24
-rw-r--r--mysql-test/suite/plugins/r/unix_socket.result4
-rw-r--r--mysql-test/suite/plugins/t/multiauth.test28
-rw-r--r--mysql-test/suite/plugins/t/unix_socket.test12
32 files changed, 270 insertions, 85 deletions
diff --git a/mysql-test/main/connect-abstract.cnf b/mysql-test/main/connect-abstract.cnf
index 5798c4f2f2a..ed7dbd838f0 100644
--- a/mysql-test/main/connect-abstract.cnf
+++ b/mysql-test/main/connect-abstract.cnf
@@ -1,9 +1,6 @@
!include include/default_my.cnf
-[mysqld.1]
-socket= @ENV.ABSTRACT_SOCKET
-
# Using @OPT.port here for uniqueness
[ENV]
ABSTRACT_SOCKET= @mtr-test-abstract-socket-@OPT.port
diff --git a/mysql-test/main/connect-abstract.result b/mysql-test/main/connect-abstract.result
index 68a9674dfaa..8f7c125196a 100644
--- a/mysql-test/main/connect-abstract.result
+++ b/mysql-test/main/connect-abstract.result
@@ -1,5 +1,3 @@
-connect con1,localhost,root,,test,,$ABSTRACT_SOCKET;
select 1;
1
1
-disconnect con1;
diff --git a/mysql-test/main/connect-abstract.test b/mysql-test/main/connect-abstract.test
index 0f212fe5a0d..09bc607e0e8 100644
--- a/mysql-test/main/connect-abstract.test
+++ b/mysql-test/main/connect-abstract.test
@@ -1,6 +1,9 @@
--source include/linux.inc
--source include/not_embedded.inc
+let $restart_parameters=--socket=$ABSTRACT_SOCKET
+--source include/kill_mysqld.inc
+--source include/start_mysqld.inc
+
connect(con1,localhost,root,,test,,$ABSTRACT_SOCKET);
select 1;
-disconnect con1;
diff --git a/mysql-test/main/failed_auth_unixsocket.result b/mysql-test/main/failed_auth_unixsocket.result
index 32357a5a7a9..7e8b8fe70b9 100644
--- a/mysql-test/main/failed_auth_unixsocket.result
+++ b/mysql-test/main/failed_auth_unixsocket.result
@@ -1,7 +1,10 @@
-update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket') where user='root';
+create table global_priv_backup select * from mysql.global_priv;
+update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
+delete from mysql.global_priv where user != 'root';
flush privileges;
connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET);
ERROR 28000: Access denied for user 'USER'@'localhost'
ERROR 28000: Access denied for user 'USER'@'localhost'
-update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin')) where user='root';
+replace mysql.global_priv select * from global_priv_backup;
flush privileges;
+drop table global_priv_backup;
diff --git a/mysql-test/main/failed_auth_unixsocket.test b/mysql-test/main/failed_auth_unixsocket.test
index e163a0c230f..fe80d947036 100644
--- a/mysql-test/main/failed_auth_unixsocket.test
+++ b/mysql-test/main/failed_auth_unixsocket.test
@@ -4,7 +4,9 @@
# MDEV-3909 remote user enumeration
# unix_socket tests
#
-update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket') where user='root';
+create table global_priv_backup select * from mysql.global_priv;
+update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket');
+delete from mysql.global_priv where user != 'root';
flush privileges;
# Make sure that the replace works, even if $USER is 'user' or something else
@@ -22,5 +24,6 @@ connect (fail,localhost,$USER);
--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR
change_user $USER;
-update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin')) where user='root';
+replace mysql.global_priv select * from global_priv_backup;
flush privileges;
+drop table global_priv_backup;
diff --git a/mysql-test/main/password_expiration_unix_socket.result b/mysql-test/main/password_expiration_unix_socket.result
index 5feee17f205..b37b8868edf 100644
--- a/mysql-test/main/password_expiration_unix_socket.result
+++ b/mysql-test/main/password_expiration_unix_socket.result
@@ -1,8 +1,8 @@
#
# A password cannot expire, if there is no password
#
-create user USER identified via unix_socket;
-alter user USER password expire;
+create user 'USER' identified via unix_socket;
+alter user 'USER' password expire;
1
1
-drop user USER;
+drop user 'USER';
diff --git a/mysql-test/main/password_expiration_unix_socket.test b/mysql-test/main/password_expiration_unix_socket.test
index f2579aaf18f..d936d65bc21 100644
--- a/mysql-test/main/password_expiration_unix_socket.test
+++ b/mysql-test/main/password_expiration_unix_socket.test
@@ -9,16 +9,16 @@
--echo # A password cannot expire, if there is no password
--echo #
---let $replace=create user $USER
---replace_result $replace "create user USER"
---eval create user $USER identified via unix_socket
+--let $replace=create user '$USER'
+--replace_result $replace "create user 'USER'"
+--eval create user '$USER' identified via unix_socket
---let $replace=alter user $USER
---replace_result $replace "alter user USER"
---eval alter user $USER password expire
+--let $replace=alter user '$USER'
+--replace_result $replace "alter user 'USER'"
+--eval alter user '$USER' password expire
--exec $MYSQL -u $USER -e 'select 1'
---let $replace=drop user $USER
---replace_result $replace "drop user USER"
---eval drop user $USER
+--let $replace=drop user '$USER'
+--replace_result $replace "drop user 'USER'"
+--eval drop user '$USER'
diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result
index 20cea67b2de..c2b3c30011f 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -3893,6 +3893,25 @@ id rn
1 1
drop table t1;
#
+# MDEV-25630: Crash with window function in left expr of IN subquery
+#
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT lag(i) over (ORDER BY i) IN ( SELECT 1 FROM t1 a) FROM t1;
+lag(i) over (ORDER BY i) IN ( SELECT 1 FROM t1 a)
+NULL
+1
+0
+DROP TABLE t1;
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT sum(i) over () IN ( SELECT 1 FROM t1 a) FROM t1;
+sum(i) over () IN ( SELECT 1 FROM t1 a)
+0
+0
+0
+DROP TABLE t1;
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test
index 0bdfe48a82b..778c685b680 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2542,6 +2542,20 @@ order by rn desc;
drop table t1;
--echo #
+--echo # MDEV-25630: Crash with window function in left expr of IN subquery
+--echo #
+
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT lag(i) over (ORDER BY i) IN ( SELECT 1 FROM t1 a) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT sum(i) over () IN ( SELECT 1 FROM t1 a) FROM t1;
+DROP TABLE t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/wolfssl.opt b/mysql-test/main/wolfssl.opt
new file mode 100644
index 00000000000..812dba7bcbd
--- /dev/null
+++ b/mysql-test/main/wolfssl.opt
@@ -0,0 +1 @@
+--ssl_cipher=ECDHE-RSA-AES256-GCM-SHA384 \ No newline at end of file
diff --git a/mysql-test/main/wolfssl.test b/mysql-test/main/wolfssl.test
new file mode 100644
index 00000000000..d9afc43901f
--- /dev/null
+++ b/mysql-test/main/wolfssl.test
@@ -0,0 +1,6 @@
+#
+# Various tests that require WolfSSL
+#
+--source include/have_ssl_communication.inc
+--source include/not_embedded.inc
+SELECT @@ssl_cipher;
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index faab55e9741..86f2d6c0c18 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -80,8 +80,6 @@ sub skip_combinations {
$skip{'main/ssl_verify_ip.test'} = 'x509v3 support required'
unless $openssl_ver ge "1.0.2";
- $skip{'main/tls_version1.test'} = 'https://github.com/wolfSSL/wolfssl/issues/2960'
- if $ssl_lib =~ /WolfSSL 4.4.0/;
%skip;
}
diff --git a/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result b/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result
index 02304fbda17..4e816bea43b 100644
--- a/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-key-rotation-disable.result
@@ -1,7 +1,3 @@
-SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
-NAME
-SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
-NAME
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create database enctests;
diff --git a/mysql-test/suite/encryption/r/key_version_rotation.result b/mysql-test/suite/encryption/r/key_version_rotation.result
new file mode 100644
index 00000000000..afc0a0dd122
--- /dev/null
+++ b/mysql-test/suite/encryption/r/key_version_rotation.result
@@ -0,0 +1,20 @@
+create table t1(f1 int not null)engine=innodb;
+create table t2(f1 int not null)engine=innodb;
+insert into t1 select * from seq_1_to_100;
+insert into t2 select * from seq_1_to_100;
+# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=1 --innodb_encryption_rotate_key_age=9
+# Enable encryption
+set global innodb_encrypt_tables=ON;
+# Create a new table and it is added to rotation list
+create table t3(f1 int not null)engine=innodb;
+insert into t3 select * from seq_1_to_100;
+# Increase the version and it should set rotation
+# variable for the encryption plugin
+set global debug_key_management_version=10;
+select @@debug_key_management_version;
+@@debug_key_management_version
+10
+# Decrease the key version and Disable the encryption
+set global debug_key_management_version=1;
+set global innodb_encrypt_tables=off;
+DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
index dfc4e2a7b4c..977bb0101fd 100644
--- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result
+++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
@@ -3899,6 +3899,25 @@ id rn
1 1
drop table t1;
#
+# MDEV-25630: Crash with window function in left expr of IN subquery
+#
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT lag(i) over (ORDER BY i) IN ( SELECT 1 FROM t1 a) FROM t1;
+lag(i) over (ORDER BY i) IN ( SELECT 1 FROM t1 a)
+NULL
+1
+0
+DROP TABLE t1;
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT sum(i) over () IN ( SELECT 1 FROM t1 a) FROM t1;
+sum(i) over () IN ( SELECT 1 FROM t1 a)
+0
+0
+0
+DROP TABLE t1;
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/suite/encryption/t/innodb-key-rotation-disable.test b/mysql-test/suite/encryption/t/innodb-key-rotation-disable.test
index dffabaf97f1..96b62f7c05b 100644
--- a/mysql-test/suite/encryption/t/innodb-key-rotation-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-key-rotation-disable.test
@@ -3,9 +3,6 @@
# not embedded because of restarts
-- source include/not_embedded.inc
-SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
-SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
-
let $encryption = `SELECT @@innodb_encrypt_tables`;
SET GLOBAL innodb_file_per_table = ON;
# zlib
diff --git a/mysql-test/suite/encryption/t/key_version_rotation.opt b/mysql-test/suite/encryption/t/key_version_rotation.opt
new file mode 100644
index 00000000000..d7933f0f943
--- /dev/null
+++ b/mysql-test/suite/encryption/t/key_version_rotation.opt
@@ -0,0 +1,2 @@
+--innodb-tablespaces-encryption
+--plugin-load-add=$DEBUG_KEY_MANAGEMENT_SO
diff --git a/mysql-test/suite/encryption/t/key_version_rotation.test b/mysql-test/suite/encryption/t/key_version_rotation.test
new file mode 100644
index 00000000000..d36d47251a1
--- /dev/null
+++ b/mysql-test/suite/encryption/t/key_version_rotation.test
@@ -0,0 +1,41 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_sequence.inc
+
+create table t1(f1 int not null)engine=innodb;
+create table t2(f1 int not null)engine=innodb;
+insert into t1 select * from seq_1_to_100;
+insert into t2 select * from seq_1_to_100;
+
+let $restart_parameters=--innodb_encrypt_tables=0 --innodb_encryption_threads=1 --innodb_encryption_rotate_key_age=9;
+--source include/restart_mysqld.inc
+
+--echo # Enable encryption
+
+set global innodb_encrypt_tables=ON;
+--let $tables_count= `select count(*) from information_schema.tables where engine = 'InnoDB'`
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+--source include/wait_condition.inc
+--echo # Create a new table and it is added to rotation list
+create table t3(f1 int not null)engine=innodb;
+insert into t3 select * from seq_1_to_100;
+
+--echo # Increase the version and it should set rotation
+--echo # variable for the encryption plugin
+
+set global debug_key_management_version=10;
+select @@debug_key_management_version;
+--let $tables_count= `select count(*) from information_schema.tables where engine = 'InnoDB'`
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
+--source include/wait_condition.inc
+
+--echo # Decrease the key version and Disable the encryption
+set global debug_key_management_version=1;
+set global innodb_encrypt_tables=off;
+
+--let $wait_timeout= 600
+--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--source include/wait_condition.inc
+DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result
index 70c9d10a68b..2e9b762500d 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_index.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result
@@ -262,3 +262,37 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
+#
+# MDEV-25872 InnoDB: Assertion failure in row_merge_read_clustered_index
+# upon ALTER on table with indexed virtual columns
+#
+CREATE TABLE t1 (
+id BIGINT AUTO_INCREMENT PRIMARY KEY,
+a INT,
+va INT ZEROFILL AS (a) VIRTUAL,
+b TIMESTAMP,
+c CHAR(204),
+vc CHAR(8),
+KEY(vc,c(64),b,va)
+) ENGINE=InnoDB CHARACTER SET utf32;
+INSERT INTO t1 (id) SELECT NULL FROM seq_1_to_75;
+INSERT IGNORE INTO t1 (id, a) VALUES (NULL, -1);
+Warnings:
+Warning 1264 Out of range value for column 'va' at row 1
+ALTER TABLE t1 FORCE;
+ERROR 22003: Out of range value for column 'va' at row 1
+DROP TABLE t1;
+#
+# MDEV-24713 Assertion `dict_table_is_comp(index->table)' failed
+# in row_merge_buf_add()
+#
+CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(3),
+b CHAR(8) AS (a) VIRTUAL, KEY(b))
+ROW_FORMAT=REDUNDANT ENGINE=InnoDB
+CHARACTER SET utf8;
+INSERT INTO t1 (id,a) VALUES (1,'foo');
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.opt b/mysql-test/suite/gcol/t/innodb_virtual_index.opt
new file mode 100644
index 00000000000..c3f4a891cca
--- /dev/null
+++ b/mysql-test/suite/gcol/t/innodb_virtual_index.opt
@@ -0,0 +1 @@
+--innodb_sort_buffer_size=64k
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.test b/mysql-test/suite/gcol/t/innodb_virtual_index.test
index 9886378ced1..bb47379f3b2 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_index.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_index.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/have_sequence.inc
# Ensure that the history list length will actually be decremented by purge.
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
@@ -288,3 +289,35 @@ ROLLBACK;
SELECT * FROM t1;
CHECK TABLE t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-25872 InnoDB: Assertion failure in row_merge_read_clustered_index
+--echo # upon ALTER on table with indexed virtual columns
+--echo #
+
+CREATE TABLE t1 (
+ id BIGINT AUTO_INCREMENT PRIMARY KEY,
+ a INT,
+ va INT ZEROFILL AS (a) VIRTUAL,
+ b TIMESTAMP,
+ c CHAR(204),
+ vc CHAR(8),
+ KEY(vc,c(64),b,va)
+) ENGINE=InnoDB CHARACTER SET utf32;
+INSERT INTO t1 (id) SELECT NULL FROM seq_1_to_75;
+INSERT IGNORE INTO t1 (id, a) VALUES (NULL, -1);
+--error ER_WARN_DATA_OUT_OF_RANGE
+ALTER TABLE t1 FORCE;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-24713 Assertion `dict_table_is_comp(index->table)' failed
+--echo # in row_merge_buf_add()
+--echo #
+CREATE TABLE t1 (id INT PRIMARY KEY, a CHAR(3),
+ b CHAR(8) AS (a) VIRTUAL, KEY(b))
+ ROW_FORMAT=REDUNDANT ENGINE=InnoDB
+ CHARACTER SET utf8;
+INSERT INTO t1 (id,a) VALUES (1,'foo');
+OPTIMIZE TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index 59abdb01d82..e191c8048fb 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -1052,10 +1052,13 @@ a
10
DROP TABLE t1;
CREATE TABLE t1 (a INT NOT NULL DEFAULT 0) ENGINE=InnoDB;
+SET @save_allowed = @@GLOBAL.innodb_instant_alter_column_allowed;
+SET GLOBAL innodb_instant_alter_column_allowed=never;
iNSERT INTO t1 VALUES (10);
ALTER TABLE t1 ADD b DATE NOT NULL DEFAULT if(unix_timestamp()>1,TIMESTAMP'2001-01-01 10:20:30',0);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
+SET GLOBAL innodb_instant_alter_column_allowed=@save_allowed;
SELECT * FROM t1;
a b
10 2001-01-01
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index b3418c6e39b..00903e2d401 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -663,10 +663,13 @@ DROP TABLE t1;
# DATETIME-to-DATE truncation is OK
CREATE TABLE t1 (a INT NOT NULL DEFAULT 0) ENGINE=InnoDB;
+SET @save_allowed = @@GLOBAL.innodb_instant_alter_column_allowed;
+SET GLOBAL innodb_instant_alter_column_allowed=never;
iNSERT INTO t1 VALUES (10);
--enable_info
ALTER TABLE t1 ADD b DATE NOT NULL DEFAULT if(unix_timestamp()>1,TIMESTAMP'2001-01-01 10:20:30',0);
--disable_info
+SET GLOBAL innodb_instant_alter_column_allowed=@save_allowed;
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug.result b/mysql-test/suite/innodb_fts/r/misc_debug.result
index 9143d3f48f0..e8a462f2751 100644
--- a/mysql-test/suite/innodb_fts/r/misc_debug.result
+++ b/mysql-test/suite/innodb_fts/r/misc_debug.result
@@ -32,19 +32,17 @@ SET SESSION debug_dbug=@saved_debug_dbug;
#
CREATE TABLE t1(a INT, b TEXT, c TEXT, FULLTEXT INDEX(b)) ENGINE=InnoDB;
connect con1,localhost,root,,test;
-SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL s1 WAIT_FOR g1';
+SET DEBUG_DBUG="+d,innodb_OOM_inplace_alter";
SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL s2 WAIT_FOR g2';
ALTER TABLE t1 ADD FULLTEXT(c);
connection default;
-SET DEBUG_SYNC='now WAIT_FOR s1';
-KILL QUERY @id;
-SET DEBUG_SYNC='now SIGNAL g1 WAIT_FOR s2';
+SET DEBUG_SYNC='now WAIT_FOR s2';
START TRANSACTION;
SELECT * FROM t1;
a b c
-SET DEBUG_SYNC='now SIGNAL s2';
+SET DEBUG_SYNC='now SIGNAL g2';
connection con1;
-ERROR 70100: Query execution was interrupted
+ERROR HY000: Out of memory.
disconnect con1;
connection default;
SET DEBUG_SYNC=RESET;
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test
index b9b0f54e3e8..b1193d0ec3c 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug.test
@@ -61,20 +61,16 @@ SET SESSION debug_dbug=@saved_debug_dbug;
--echo #
CREATE TABLE t1(a INT, b TEXT, c TEXT, FULLTEXT INDEX(b)) ENGINE=InnoDB;
connect(con1,localhost,root,,test);
-let $ID= `SELECT @id := CONNECTION_ID()`;
-SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL s1 WAIT_FOR g1';
+SET DEBUG_DBUG="+d,innodb_OOM_inplace_alter";
SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL s2 WAIT_FOR g2';
send ALTER TABLE t1 ADD FULLTEXT(c);
connection default;
-SET DEBUG_SYNC='now WAIT_FOR s1';
-let $ignore= `SELECT @id := $ID`;
-KILL QUERY @id;
-SET DEBUG_SYNC='now SIGNAL g1 WAIT_FOR s2';
+SET DEBUG_SYNC='now WAIT_FOR s2';
START TRANSACTION;
SELECT * FROM t1;
-SET DEBUG_SYNC='now SIGNAL s2';
+SET DEBUG_SYNC='now SIGNAL g2';
connection con1;
---error ER_QUERY_INTERRUPTED
+--error ER_OUT_OF_RESOURCES
reap;
disconnect con1;
connection default;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
index b7ba8704347..da9c3bbc343 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
@@ -59,8 +59,8 @@ File::tab#.ibd
===============================================
Additional information:
-Undo page type: # insert, # update, # other
-Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
+Undo page type: #
+Undo page state: # active, # cached, # to_purge, # prepared, # other
index_id #pages #leaf_pages #recs_per_page #bytes_per_page
# # # # #
# # # # #
@@ -94,8 +94,8 @@ File::tab#.ibd
===============================================
Additional information:
-Undo page type: # insert, # update, # other
-Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
+Undo page type: #
+Undo page state: # active, # cached, # to_purge, # prepared, # other
index_id #pages #leaf_pages #recs_per_page #bytes_per_page
# # # # #
# # # # #
diff --git a/mysql-test/suite/mariabackup/auth_plugin_win.result b/mysql-test/suite/mariabackup/auth_plugin_win.result
index 7a623be147f..caf5d8df87d 100644
--- a/mysql-test/suite/mariabackup/auth_plugin_win.result
+++ b/mysql-test/suite/mariabackup/auth_plugin_win.result
@@ -1,5 +1,5 @@
INSTALL SONAME 'auth_named_pipe';
CREATE USER 'USERNAME' IDENTIFIED WITH named_pipe;
-GRANT ALL PRIVILEGES ON *.* to USERNAME;
+GRANT ALL PRIVILEGES ON *.* to 'USERNAME';
DROP USER 'USERNAME';
UNINSTALL SONAME 'auth_named_pipe';
diff --git a/mysql-test/suite/mariabackup/auth_plugin_win.test b/mysql-test/suite/mariabackup/auth_plugin_win.test
index 9c8cd5ad411..70ae74b7028 100644
--- a/mysql-test/suite/mariabackup/auth_plugin_win.test
+++ b/mysql-test/suite/mariabackup/auth_plugin_win.test
@@ -18,7 +18,7 @@ INSTALL SONAME 'auth_named_pipe';
--replace_result $USERNAME USERNAME
eval CREATE USER '$USERNAME' IDENTIFIED WITH named_pipe;
--replace_result $USERNAME USERNAME
-eval GRANT ALL PRIVILEGES ON *.* to $USERNAME;
+eval GRANT ALL PRIVILEGES ON *.* to '$USERNAME';
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
diff --git a/mysql-test/suite/plugins/r/multiauth.result b/mysql-test/suite/plugins/r/multiauth.result
index aed46ac8964..8ae45d1fb9f 100644
--- a/mysql-test/suite/plugins/r/multiauth.result
+++ b/mysql-test/suite/plugins/r/multiauth.result
@@ -1,5 +1,5 @@
install soname 'auth_ed25519';
-create user USER identified via unix_socket OR mysql_native_password as password("GOOD");
+create user 'USER' identified via unix_socket OR mysql_native_password as password("GOOD");
create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good");
show create user mysqltest1;
CREATE USER for mysqltest1@%
@@ -14,8 +14,8 @@ user() current_user() database()
mysqltest1@localhost mysqltest1@% test
# name does not match, password bad = failure
mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
-drop user USER, mysqltest1;
-create user USER identified via mysql_native_password as password("GOOD") OR unix_socket;
+drop user 'USER', mysqltest1;
+create user 'USER' identified via mysql_native_password as password("GOOD") OR unix_socket;
create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
show create user mysqltest1;
CREATE USER for mysqltest1@%
@@ -30,8 +30,8 @@ user() current_user() database()
mysqltest1@localhost mysqltest1@% test
# name does not match, password bad = failure
mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
-drop user USER, mysqltest1;
-create user USER identified via unix_socket OR ed25519 as password("GOOD");
+drop user 'USER', mysqltest1;
+create user 'USER' identified via unix_socket OR ed25519 as password("GOOD");
create user mysqltest1 identified via unix_socket OR ed25519 as password("good");
show create user mysqltest1;
CREATE USER for mysqltest1@%
@@ -46,8 +46,8 @@ user() current_user() database()
mysqltest1@localhost mysqltest1@% test
# name does not match, password bad = failure
mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
-drop user USER, mysqltest1;
-create user USER identified via ed25519 as password("GOOD") OR unix_socket;
+drop user 'USER', mysqltest1;
+create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket;
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket;
show create user mysqltest1;
CREATE USER for mysqltest1@%
@@ -62,8 +62,8 @@ user() current_user() database()
mysqltest1@localhost mysqltest1@% test
# name does not match, password bad = failure
mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
-drop user USER, mysqltest1;
-create user USER identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works");
+drop user 'USER', mysqltest1;
+create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works");
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
show create user mysqltest1;
CREATE USER for mysqltest1@%
@@ -82,7 +82,7 @@ user() current_user() database()
mysqltest1@localhost mysqltest1@% test
# name does not match, password bad = failure
mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
-drop user USER, mysqltest1;
+drop user 'USER', mysqltest1;
create user mysqltest1 identified via mysql_native_password as password("good") OR mysql_native_password as password("works");
show create user mysqltest1;
CREATE USER for mysqltest1@%
@@ -157,7 +157,7 @@ drop user mysqltest1;
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
ERROR HY000: Column count of mysql.user is wrong. Expected 3, found 47. Created with MariaDB XX.YY.ZZ, now running XX.YY.ZZ. Please use mariadb-upgrade to fix this error
# switching back from mysql.user to mysql.global_priv
-create user USER identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
+create user 'USER' identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901234567890a', 'invalid password');
flush privileges;
@@ -175,7 +175,7 @@ set password for mysqltest1 = password('bla');
select user(), current_user(), database();
user() current_user() database()
mysqltest1@localhost mysqltest1@% test
-drop user USER, mysqltest1;
+drop user 'USER', mysqltest1;
create user mysqltest1 identified via ed25519 as password("good");
show create user mysqltest1;
CREATE USER for mysqltest1@%
diff --git a/mysql-test/suite/plugins/r/unix_socket.result b/mysql-test/suite/plugins/r/unix_socket.result
index a725583f201..b663d341221 100644
--- a/mysql-test/suite/plugins/r/unix_socket.result
+++ b/mysql-test/suite/plugins/r/unix_socket.result
@@ -1,7 +1,7 @@
#
# with named user
#
-create user USER identified via unix_socket;
+create user 'USER' identified via unix_socket;
#
# name match = ok
#
@@ -11,7 +11,7 @@ USER@localhost USER@% test
#
# name does not match = failure
#
-drop user USER;
+drop user 'USER';
#
# and now with anonymous user
#
diff --git a/mysql-test/suite/plugins/t/multiauth.test b/mysql-test/suite/plugins/t/multiauth.test
index 655ab88b635..7161fa705c7 100644
--- a/mysql-test/suite/plugins/t/multiauth.test
+++ b/mysql-test/suite/plugins/t/multiauth.test
@@ -27,13 +27,13 @@ install soname 'auth_ed25519';
select user(), current_user(), database();
EOF
---let $creplace=create user $USER
---let $dreplace=drop user $USER
+--let $creplace=create user '$USER'
+--let $dreplace=drop user '$USER'
#
# socket,password
#
---replace_result $creplace "create user USER"
+--replace_result $creplace "create user 'USER'"
eval $creplace identified via unix_socket OR mysql_native_password as password("GOOD");
create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good");
show create user mysqltest1;
@@ -44,13 +44,13 @@ show create user mysqltest1;
--echo # name does not match, password bad = failure
--error 1
--exec $try_auth -u mysqltest1 -pbad
---replace_result $dreplace "drop user USER"
+--replace_result $dreplace "drop user 'USER'"
eval $dreplace, mysqltest1;
#
# password,socket
#
---replace_result $creplace "create user USER"
+--replace_result $creplace "create user 'USER'"
eval $creplace identified via mysql_native_password as password("GOOD") OR unix_socket;
create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
show create user mysqltest1;
@@ -61,13 +61,13 @@ show create user mysqltest1;
--echo # name does not match, password bad = failure
--error 1
--exec $try_auth -u mysqltest1 -pbad
---replace_result $dreplace "drop user USER"
+--replace_result $dreplace "drop user 'USER'"
eval $dreplace, mysqltest1;
#
# socket,ed25519
#
---replace_result $creplace "create user USER"
+--replace_result $creplace "create user 'USER'"
eval $creplace identified via unix_socket OR ed25519 as password("GOOD");
create user mysqltest1 identified via unix_socket OR ed25519 as password("good");
show create user mysqltest1;
@@ -78,13 +78,13 @@ show create user mysqltest1;
--echo # name does not match, password bad = failure
--error 1
--exec $try_auth -u mysqltest1 -pbad
---replace_result $dreplace "drop user USER"
+--replace_result $dreplace "drop user 'USER'"
eval $dreplace, mysqltest1;
#
# ed25519,socket
#
---replace_result $creplace "create user USER"
+--replace_result $creplace "create user 'USER'"
eval $creplace identified via ed25519 as password("GOOD") OR unix_socket;
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket;
show create user mysqltest1;
@@ -95,13 +95,13 @@ show create user mysqltest1;
--echo # name does not match, password bad = failure
--error 1
--exec $try_auth -u mysqltest1 -pbad
---replace_result $dreplace "drop user USER"
+--replace_result $dreplace "drop user 'USER'"
eval $dreplace, mysqltest1;
#
# ed25519,socket,password
#
---replace_result $creplace "create user USER"
+--replace_result $creplace "create user 'USER'"
eval $creplace identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works");
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
show create user mysqltest1;
@@ -114,7 +114,7 @@ show create user mysqltest1;
--echo # name does not match, password bad = failure
--error 1
--exec $try_auth -u mysqltest1 -pbad
---replace_result $dreplace "drop user USER"
+--replace_result $dreplace "drop user 'USER'"
eval $dreplace, mysqltest1;
#
@@ -163,7 +163,7 @@ create user mysqltest1 identified via ed25519 as password("good") OR unix_socket
#
# invalid password,socket
#
---replace_result $creplace "create user USER"
+--replace_result $creplace "create user 'USER'"
eval $creplace identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901234567890a', 'invalid password');
@@ -177,7 +177,7 @@ show create user mysqltest1;
--echo # SET PASSWORD helps
set password for mysqltest1 = password('bla');
--exec $try_auth -u mysqltest1 -pbla
---replace_result $dreplace "drop user USER"
+--replace_result $dreplace "drop user 'USER'"
eval $dreplace, mysqltest1;
#
diff --git a/mysql-test/suite/plugins/t/unix_socket.test b/mysql-test/suite/plugins/t/unix_socket.test
index 9bb56aae290..be2afb0ca66 100644
--- a/mysql-test/suite/plugins/t/unix_socket.test
+++ b/mysql-test/suite/plugins/t/unix_socket.test
@@ -4,9 +4,9 @@
--echo # with named user
--echo #
---let $replace=create user $USER
---replace_result $replace "create user USER"
-eval create user $USER identified via unix_socket;
+--let $replace=create user '$USER'
+--replace_result $replace "create user 'USER'"
+eval create user '$USER' identified via unix_socket;
--write_file $MYSQLTEST_VARDIR/tmp/peercred_test.txt
--let $replace1=$USER@localhost
@@ -26,9 +26,9 @@ EOF
--error 1
--exec $MYSQL_TEST -u foobar < $MYSQLTEST_VARDIR/tmp/peercred_test.txt
---let $replace=drop user $USER
---replace_result $replace "drop user USER"
-eval drop user $USER;
+--let $replace=drop user '$USER'
+--replace_result $replace "drop user 'USER'"
+eval drop user '$USER';
--echo #
--echo # and now with anonymous user