summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/encryption/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/encryption/r')
-rw-r--r--mysql-test/suite/encryption/r/corrupted_during_recovery.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result16
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_discard_import.result67
-rw-r--r--mysql-test/suite/encryption/r/tempfiles_encrypted.result13
4 files changed, 53 insertions, 45 deletions
diff --git a/mysql-test/suite/encryption/r/corrupted_during_recovery.result b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
index 2b29bf26..7329999d 100644
--- a/mysql-test/suite/encryption/r/corrupted_during_recovery.result
+++ b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
@@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(2);
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
-ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
+Got one of the listed errors
SELECT * FROM t2;
a
2
diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result
index 541680ae..d86ca6f9 100644
--- a/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result
+++ b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result
@@ -1,6 +1,8 @@
-SELECT variable_value into @old_encrypted FROM information_schema.global_status
+SELECT CAST(variable_value AS INT) INTO @old_encrypted
+FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
-SELECT variable_value into @old_decrypted FROM information_schema.global_status
+SELECT CAST(variable_value AS INT) INTO @old_decrypted
+FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';
CREATE TEMPORARY TABLE t1(f1 CHAR(200), f2 CHAR(200)) ENGINE=InnoDB;
INSERT INTO t1 (f1,f2) SELECT '', '' FROM seq_1_to_8192;
@@ -12,11 +14,13 @@ COUNT(*)
SELECT COUNT(*) FROM t2;
COUNT(*)
8192
-SELECT variable_value > @old_encrypted FROM information_schema.global_status
+SELECT CAST(variable_value AS INT) > @old_encrypted
+FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
-variable_value > @old_encrypted
+CAST(variable_value AS INT) > @old_encrypted
1
-SELECT variable_value > @old_decrypted FROM information_schema.global_status
+SELECT CAST(variable_value AS INT) > @old_decrypted
+FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';
-variable_value > @old_decrypted
+CAST(variable_value AS INT) > @old_decrypted
1
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
index 7ee30423..18082027 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
@@ -13,11 +13,13 @@ set current_num = current_num + 1;
end while;
end//
commit;
-set autocommit=0;
-call innodb_insert_proc(10000);
+begin;
+set statement unique_checks=0, foreign_key_checks=0 for
+call innodb_insert_proc(100);
commit;
-set autocommit=1;
+DROP PROCEDURE innodb_insert_proc;
# Wait max 10 min for key encryption threads to encrypt all spaces
+FLUSH TABLES t1, t2, t3 FOR EXPORT;
# tablespaces should be now encrypted
# t1 yes on expecting NOT FOUND
NOT FOUND /foobar/ in t1.ibd
@@ -25,15 +27,16 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd
-# restart
db.opt
+t1.cfg
t1.frm
t1.ibd
+t2.cfg
t2.frm
t2.ibd
+t3.cfg
t3.frm
t3.ibd
-FLUSH TABLES t1, t2, t3 FOR EXPORT;
backup: t1
backup: t2
backup: t3
@@ -55,17 +58,18 @@ restore: t1 .ibd and .cfg files
restore: t2 .ibd and .cfg files
restore: t3 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
-SELECT COUNT(1) FROM t1;
-COUNT(1)
-10000
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+100
ALTER TABLE t2 IMPORT TABLESPACE;
-SELECT COUNT(1) FROM t2;
-COUNT(1)
-10000
+SELECT COUNT(*) FROM t2;
+COUNT(*)
+100
ALTER TABLE t3 IMPORT TABLESPACE;
-SELECT COUNT(1) FROM t3;
-COUNT(1)
-10000
+SELECT COUNT(*) FROM t3;
+COUNT(*)
+100
+FLUSH TABLES t1, t2, t3 FOR EXPORT;
# tablespaces should remain encrypted after import
# t1 yes on expecting NOT FOUND
NOT FOUND /foobar/ in t1.ibd
@@ -73,8 +77,8 @@ NOT FOUND /foobar/ in t1.ibd
NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND
NOT FOUND /barfoo/ in t3.ibd
-# restart
-ALTER TABLE t1 ENGINE InnoDB;
+UNLOCK TABLES;
+ALTER TABLE t1 FORCE;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -82,7 +86,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `encrypted`=yes
-ALTER TABLE t2 ENGINE InnoDB;
+ALTER TABLE t2 FORCE;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -90,7 +94,7 @@ t2 CREATE TABLE `t2` (
`a` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-ALTER TABLE t3 ENGINE InnoDB;
+ALTER TABLE t3 FORCE;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
@@ -98,30 +102,17 @@ t3 CREATE TABLE `t3` (
`a` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPRESSED `encrypted`=yes
-# Restarting server
-# restart
-# Done restarting server
# Verify that tables are still usable
-SELECT COUNT(1) FROM t1;
-COUNT(1)
-10000
-SELECT COUNT(1) FROM t2;
-COUNT(1)
-10000
-SELECT COUNT(1) FROM t3;
-COUNT(1)
-10000
-# Tablespaces should be encrypted after restart
+CHECK TABLE t1, t2, t3 EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t2 check status OK
+test.t3 check status OK
+FLUSH TABLES t1, t2, t3 FOR EXPORT;
# t1 yes on expecting NOT FOUND
NOT FOUND /foobar/ in t1.ibd
# t2 ... on expecting NOT FOUND
NOT FOUND /temp/ in t2.ibd
# t3 ... on expecting NOT FOUND
-NOT FOUND /barfoo/ in t3.ibd
-# restart
-# Wait max 10 min for key encryption threads to encrypt all spaces
-# Success!
-# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
-# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=0
-DROP PROCEDURE innodb_insert_proc;
+UNLOCK TABLES;
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 d0dadb6d..6dedcd4b 100644
--- a/mysql-test/suite/encryption/r/tempfiles_encrypted.result
+++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
@@ -4502,6 +4502,19 @@ NULL
DROP FUNCTION f;
DROP TABLE t;
#
+# MDEV-31296: Crash in Item_func::fix_fields when prepared statement
+# with subqueries and window function is executed with
+# sql_mode = ONLY_FULL_GROUP_BY
+#
+CREATE TABLE t1 ( a INT, i INT) ;
+CREATE TABLE t2 ( a INT);
+INSERT INTO t2 VALUES (4000);
+SET SESSION sql_mode = "ONLY_FULL_GROUP_BY";
+EXECUTE IMMEDIATE "SELECT SUM(i) OVER (ORDER BY i) FROM t1 NATURAL JOIN t2";
+SUM(i) OVER (ORDER BY i)
+# Clean up
+DROP TABLE t1, t2;
+#
# End of 10.6 tests
#
#