mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.5 into 10.6
This commit is contained in:
@@ -41,6 +41,14 @@ call innodb_insert_proc(2000);
|
||||
insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
commit;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
select variable_value > 0 from information_schema.global_status
|
||||
where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||
variable_value > 0
|
||||
1
|
||||
# restart: --innodb-encrypt-tables=OFF
|
||||
set global innodb_compression_algorithm = 1;
|
||||
alter table innodb_normal engine=innodb page_compressed=DEFAULT;
|
||||
@@ -64,6 +72,16 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
select variable_value > 0 from information_schema.global_status
|
||||
where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
|
||||
variable_value > 0
|
||||
1
|
||||
drop procedure innodb_insert_proc;
|
||||
drop table innodb_normal;
|
||||
drop table innodb_compact;
|
||||
|
@@ -37,41 +37,44 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT `encrypted`=yes `encryption_key_id`=4
|
||||
create procedure innodb_insert_proc (repeat_count int)
|
||||
begin
|
||||
declare current_num int;
|
||||
set current_num = 0;
|
||||
while current_num < repeat_count do
|
||||
insert into innodb_normal values(current_num, substring(MD5(RAND()), -64));
|
||||
set current_num = current_num + 1;
|
||||
end while;
|
||||
end//
|
||||
commit;
|
||||
begin;
|
||||
call innodb_insert_proc(2000);
|
||||
insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_compressed select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
insert into innodb_redundant select * from innodb_normal;
|
||||
commit;
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compressed FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_redundant FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
select variable_value > 0 from information_schema.global_status
|
||||
where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
# restart
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
update innodb_dynamic set c1 = c1 + 1;
|
||||
update innodb_redundant set c1 = c1 + 1;
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value > 0
|
||||
1
|
||||
BEGIN;
|
||||
INSERT INTO innodb_normal SET c1 = 1;
|
||||
INSERT INTO innodb_compact SET c1 = 1;
|
||||
INSERT INTO innodb_compressed SET c1 = 1;
|
||||
INSERT INTO innodb_dynamic SET c1 = 1;
|
||||
INSERT INTO innodb_redundant SET c1 = 1;
|
||||
COMMIT;
|
||||
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compressed FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_redundant FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
select variable_name from information_schema.global_status
|
||||
where variable_value > 0 and variable_name
|
||||
IN ('INNODB_NUM_PAGES_ENCRYPTED','INNODB_NUM_PAGES_DECRYPTED');
|
||||
variable_name
|
||||
INNODB_NUM_PAGES_ENCRYPTED
|
||||
INNODB_NUM_PAGES_DECRYPTED
|
||||
SET GLOBAL innodb_encrypt_tables=OFF;
|
||||
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||
show create table innodb_compact;
|
||||
@@ -101,13 +104,16 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
drop procedure innodb_insert_proc;
|
||||
FLUSH TABLES innodb_normal FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compressed FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_redundant FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
drop table innodb_normal;
|
||||
drop table innodb_compact;
|
||||
drop table innodb_compressed;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -37,8 +37,10 @@ insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
commit;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||
--source include/wait_condition.inc
|
||||
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||
select variable_value > 0 from information_schema.global_status
|
||||
where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||
|
||||
--let $restart_parameters=--innodb-encrypt-tables=OFF
|
||||
--source include/restart_mysqld.inc
|
||||
@@ -52,8 +54,13 @@ alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEF
|
||||
show create table innodb_compact;
|
||||
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT page_compressed=DEFAULT;
|
||||
show create table innodb_dynamic;
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||
|
||||
select variable_value > 0 from information_schema.global_status
|
||||
where variable_name = 'INNODB_NUM_PAGES_PAGE_DECOMPRESSED';
|
||||
|
||||
drop procedure innodb_insert_proc;
|
||||
drop table innodb_normal;
|
||||
|
@@ -18,47 +18,34 @@ show create table innodb_compressed;
|
||||
show create table innodb_dynamic;
|
||||
show create table innodb_redundant;
|
||||
|
||||
delimiter //;
|
||||
create procedure innodb_insert_proc (repeat_count int)
|
||||
begin
|
||||
declare current_num int;
|
||||
set current_num = 0;
|
||||
while current_num < repeat_count do
|
||||
insert into innodb_normal values(current_num, substring(MD5(RAND()), -64));
|
||||
set current_num = current_num + 1;
|
||||
end while;
|
||||
end//
|
||||
delimiter ;//
|
||||
commit;
|
||||
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compressed FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_redundant FOR EXPORT; UNLOCK TABLES;
|
||||
|
||||
begin;
|
||||
call innodb_insert_proc(2000);
|
||||
insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_compressed select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
insert into innodb_redundant select * from innodb_normal;
|
||||
commit;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Note there that these variables are updated only when real I/O is done, thus they are not reliable
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
select variable_value > 0 from information_schema.global_status
|
||||
where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
update innodb_dynamic set c1 = c1 + 1;
|
||||
update innodb_redundant set c1 = c1 + 1;
|
||||
BEGIN;
|
||||
INSERT INTO innodb_normal SET c1 = 1;
|
||||
INSERT INTO innodb_compact SET c1 = 1;
|
||||
INSERT INTO innodb_compressed SET c1 = 1;
|
||||
INSERT INTO innodb_dynamic SET c1 = 1;
|
||||
INSERT INTO innodb_redundant SET c1 = 1;
|
||||
COMMIT;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||
--source include/wait_condition.inc
|
||||
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compressed FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_redundant FOR EXPORT; UNLOCK TABLES;
|
||||
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
select variable_name from information_schema.global_status
|
||||
where variable_value > 0 and variable_name
|
||||
IN ('INNODB_NUM_PAGES_ENCRYPTED','INNODB_NUM_PAGES_DECRYPTED');
|
||||
|
||||
SET GLOBAL innodb_encrypt_tables=OFF;
|
||||
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||
@@ -70,13 +57,12 @@ show create table innodb_dynamic;
|
||||
alter table innodb_redundant engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||
show create table innodb_redundant;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_DECRYPTED';
|
||||
--source include/wait_condition.inc
|
||||
FLUSH TABLES innodb_normal FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compact FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_compressed FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_dynamic FOR EXPORT; UNLOCK TABLES;
|
||||
FLUSH TABLES innodb_redundant FOR EXPORT; UNLOCK TABLES;
|
||||
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
|
||||
drop procedure innodb_insert_proc;
|
||||
drop table innodb_normal;
|
||||
drop table innodb_compact;
|
||||
drop table innodb_compressed;
|
||||
|
@@ -29,6 +29,7 @@ create table t1(a int not null primary key, b char(200)) engine=innodb;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
--sorted_result
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
|
||||
--echo # Success!
|
||||
@@ -41,6 +42,7 @@ SET GLOBAL innodb_encrypt_tables = off;
|
||||
--let $wait_condition=SELECT COUNT(*) = $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING = 0;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--sorted_result
|
||||
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;
|
||||
|
||||
@@ -51,6 +53,7 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
|
||||
--let $restart_parameters=--skip-file-key-management --innodb-encrypt-tables=OFF --innodb-encryption-threads=0 --innodb-tablespaces-encryption
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--sorted_result
|
||||
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;
|
||||
|
||||
|
@@ -26,6 +26,7 @@ let $restart_parameters= --innodb_encryption_threads=5 --innodb_encryption_rotat
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
--sorted_result
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
|
||||
--echo # Restart the server with innodb_encryption_rotate_key_age= 0
|
||||
@@ -45,6 +46,7 @@ create table t4 (f1 int not null)engine=innodb encrypted=NO;
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
|
||||
--sorted_result
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
|
||||
--echo # Disable encryption when innodb_encryption_rotate_key_age is 0
|
||||
@@ -57,6 +59,7 @@ set global innodb_encrypt_tables = OFF;
|
||||
--let $wait_condition=SELECT COUNT(*) >= $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING = 0;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--sorted_result
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
--echo # Display only encrypted create tables (t3)
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
@@ -73,11 +76,13 @@ set global innodb_encrypt_tables = ON;
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
--echo # Display only unencrypted create tables (t4)
|
||||
--sorted_result
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
|
||||
--let $restart_parameters=
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
--sorted_result
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
DROP TABLE t4, t3, t2, t1;
|
||||
|
@@ -1,6 +1,8 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_example_key_management_plugin.inc
|
||||
-- source include/not_embedded.inc
|
||||
# This test is too slow for valgrind and causes innnodb semaphores to time out
|
||||
-- source include/not_valgrind.inc
|
||||
|
||||
let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`;
|
||||
let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`;
|
||||
|
@@ -3,6 +3,5 @@
|
||||
--innodb-encryption-rotate-key-age=15
|
||||
--innodb-encryption-threads=4
|
||||
--innodb-tablespaces-encryption
|
||||
--innodb-max-dirty-pages-pct_lwm=0
|
||||
--innodb-max-dirty-pages-pct=0.001
|
||||
|
||||
|
||||
|
@@ -5,9 +5,31 @@
|
||||
source include/have_file_key_management_plugin.inc;
|
||||
source include/have_sequence.inc;
|
||||
source include/have_innodb.inc;
|
||||
|
||||
|
||||
select @@encrypt_tmp_files;
|
||||
|
||||
--source main/win.test
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23867: select crash in compute_window_func
|
||||
--echo #
|
||||
|
||||
set @save_sort_buffer_size=@@sort_buffer_size;
|
||||
|
||||
set sort_buffer_size= 2000;
|
||||
CREATE TABLE t1( a INT, b INT, c INT);
|
||||
INSERT INTO t1 select seq, seq, seq from seq_1_to_5000;
|
||||
CREATE TABLE t2( a INT, b INT, c INT);
|
||||
INSERT INTO t2 SELECT a, b, ROW_NUMBER() OVER (PARTITION BY b) FROM t1;
|
||||
SELECT COUNT(*), MAX(c) FROM t2;
|
||||
CREATE TABLE t3( a INT, b INT, c INT);
|
||||
INSERT INTO t3 SELECT a, b, SUM(a) OVER () FROM t1;
|
||||
SELECT COUNT(*), MAX(c) FROM t3;
|
||||
set @@sort_buffer_size=@save_sort_buffer_size;
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
--echo # end of 10.2 test
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22556: Incorrect result for window function when using encrypt-tmp-files=ON
|
||||
--echo #
|
||||
@@ -21,3 +43,5 @@ select count(*) from (select a, b, c, ROW_NUMBER() OVER (PARTITION BY a) FROM t1
|
||||
set @@sort_buffer_size=@save_sort_buffer_size;
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
Reference in New Issue
Block a user