mariadb/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test
Jan Lindström 2e814d4702 Merge InnoDB 5.7 from mysql-5.7.9.
Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge
2016-09-02 13:22:28 +03:00

125 lines
5.4 KiB
Text

-- source include/have_innodb.inc
-- source include/have_file_key_management_plugin.inc
-- source include/not_embedded.inc
--disable_query_log
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
--enable_query_log
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
create table innodb_compressed4(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=4 encrypted=yes;
insert into innodb_compressed1 values (1, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (2, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (3, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (4, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (5, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (6, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (7, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (8, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (9, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed2 select * from innodb_compressed1;
insert into innodb_compressed3 select * from innodb_compressed1;
insert into innodb_compressed4 select * from innodb_compressed1;
--source include/restart_mysqld.inc
--let $MYSQLD_DATADIR=`select @@datadir`
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_compressed1.ibd
--let t2_IBD = $MYSQLD_DATADIR/test/innodb_compressed2.ibd
--let t3_IBD = $MYSQLD_DATADIR/test/innodb_compressed3.ibd
--let t4_IBD = $MYSQLD_DATADIR/test/innodb_compressed4.ibd
--let SEARCH_RANGE = 10000000
--let SEARCH_PATTERN=private
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--echo # t2 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
--echo # t3 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
--echo # t4 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t4_IBD
-- source include/search_pattern_in_file.inc
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
select * from innodb_compressed1 where d = 20;
select * from innodb_compressed1 where d = 30;
select * from innodb_compressed2 where d = 20;
select * from innodb_compressed2 where d = 30;
select * from innodb_compressed3 where d = 20;
select * from innodb_compressed3 where d = 30;
select * from innodb_compressed4 where d = 20;
select * from innodb_compressed4 where d = 30;
update innodb_compressed1 set d = d + 10 where d = 30;
update innodb_compressed2 set d = d + 10 where d = 30;
update innodb_compressed3 set d = d + 10 where d = 30;
update innodb_compressed4 set d = d + 10 where d = 30;
insert into innodb_compressed1 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed2 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed3 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed4 values (20, 60, 'newprivate', 'newevenmoreprivate');
--let SEARCH_PATTERN=private
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--echo # t2 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
--echo # t3 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
--echo # t4 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t4_IBD
-- source include/search_pattern_in_file.inc
--source include/restart_mysqld.inc
select * from innodb_compressed1 where d = 40;
select * from innodb_compressed1 where d = 60;
select * from innodb_compressed2 where d = 40;
select * from innodb_compressed2 where d = 60;
select * from innodb_compressed3 where d = 40;
select * from innodb_compressed3 where d = 60;
select * from innodb_compressed4 where d = 40;
select * from innodb_compressed4 where d = 60;
--let SEARCH_PATTERN=private
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--echo # t2 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
--echo # t3 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
--echo # t4 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t4_IBD
-- source include/search_pattern_in_file.inc
drop table innodb_compressed1;
drop table innodb_compressed2;
drop table innodb_compressed3;
drop table innodb_compressed4;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log