1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-09 03:41:38 +03:00
mariadb/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result
Marko Mäkelä 5775df0127 MDEV-20142 encryption.innodb_encrypt_temporary_tables fails
The data type of the column INFORMATION_SCHEMA.GLOBAL_STATUS.VARIABLE_VALUE
is a character string. Therefore, if we want to compare some values as
integers, we must explicitly cast them to integer type, to avoid an
awkward comparison where '10'<'9' because the first digit is smaller.
2023-12-10 13:19:21 +02:00

27 lines
1.1 KiB
Plaintext

SELECT CAST(variable_value AS INT) INTO @old_encrypted
FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
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;
CREATE TEMPORARY TABLE t2(f1 CHAR(100), f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB;
INSERT INTO t2 (f1,f2,f3) SELECT '', '', '' FROM seq_1_to_8192;
SELECT COUNT(*) FROM t1;
COUNT(*)
8192
SELECT COUNT(*) FROM t2;
COUNT(*)
8192
SELECT CAST(variable_value AS INT) > @old_encrypted
FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted';
CAST(variable_value AS INT) > @old_encrypted
1
SELECT CAST(variable_value AS INT) > @old_decrypted
FROM information_schema.global_status
WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted';
CAST(variable_value AS INT) > @old_decrypted
1