summaryrefslogtreecommitdiff
path: root/mysql-test/main
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/main
parentbad1440325ba2c96530408fe2fd6484fc1c7c290 (diff)
parenta42c80bd480c2060eca30101dab20ea6f6418bc8 (diff)
downloadmariadb-git-4dfec8b23085a1b9e24787aa61d8954bb5492068.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test/main')
-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
11 files changed, 66 insertions, 22 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;