Commit 8059d6fe authored by Larysa Sherepa's avatar Larysa Sherepa

innodb_zip

parent 4fdc5e47
File added
if (`select @@innodb_encrypt_tables = 1`)
{
skip only without encryption;
}
This diff is collapsed.
eval CREATE TABLE $table LIKE $template;
eval INSERT INTO $table SELECT * FROM $template;
eval SELECT * FROM $table;
eval SHOW CREATE TABLE $table;
--echo # This will keep the autoinc counter
eval ALTER TABLE $table AUTO_INCREMENT = 250, ALGORITHM = $algorithm;
--echo # We expect the counter to be 250
eval SHOW CREATE TABLE $table;
--echo # This should keep the autoinc counter as well
eval ALTER TABLE $table ADD COLUMN b INT, ALGORITHM = $algorithm;
--echo # We expect the counter to be 250
eval SHOW CREATE TABLE $table;
eval DELETE FROM $table WHERE a > 150;
eval SELECT * FROM $table;
--echo # This should reset the autoinc counter to the one specified
--echo # Since it's smaller than current one but bigger than existing
--echo # biggest counter in the table
eval ALTER TABLE $table AUTO_INCREMENT = 180, ALGORITHM = $algorithm;
--echo # We expect the counter to be 180
eval SHOW CREATE TABLE $table;
--echo # This should reset the autoinc counter to the next value of
--echo # current max counter in the table, since the specified value
--echo # is smaller than the existing biggest value(50 < 123)
eval ALTER TABLE $table DROP COLUMN b, AUTO_INCREMENT = 50, ALGORITHM = $algorithm;
--echo # We expect the counter to be 123
eval SHOW CREATE TABLE $table;
eval INSERT INTO $table VALUES(0), (0);
eval SELECT MAX(a) AS `Expect 124` FROM $table;
eval OPTIMIZE TABLE $table;
eval DELETE FROM $table WHERE a >= 123;
eval CREATE TABLE i$table(a INT AUTO_INCREMENT, INDEX(a)) AUTO_INCREMENT=125 ENGINE=InnoDB;
eval CREATE UNIQUE INDEX idx_aa ON i$table(a);
--source include/restart_mysqld.inc
eval INSERT INTO $table VALUES(0), (0);
eval INSERT INTO i$table VALUES(0), (0);
eval SELECT MAX(a) AS `Expect 126` FROM $table;
eval SELECT MAX(a) AS `Expect 126` FROM i$table;
eval DROP TABLE $table, i$table;
delimiter |;
create procedure populate_t1()
begin
declare i int default 1;
while (i <= 200) do
insert into t1 values (i, 'a', 'b');
set i = i + 1;
end while;
end|
create procedure populate_t1_small()
begin
declare i int default 1;
while (i <= 20) do
insert into t1 values (i, 'c', 'd');
set i = i + 1;
end while;
end|
create procedure populate_t1_small2()
begin
declare i int default 30;
while (i <= 50) do
insert into t1 values (i, 'e', 'f');
set i = i + 1;
end while;
end|
delimiter ;|
#
begin;
select count(*) from t1;
call populate_t1();
select count(*) from t1;
select * from t1 limit 10;
rollback;
select count(*) from t1;
#
begin;
call populate_t1();
select count(*) from t1;
commit;
select count(*) from t1;
#
truncate table t1;
select count(*) from t1;
#
call populate_t1_small();
select count(*) from t1;
rollback;
select count(*) from t1;
truncate table t1;
#
call populate_t1();
select count(*) from t1;
delete from t1 where keyc <= 60;
select count(*) from t1;
call populate_t1_small();
select count(*) from t1;
select * from t1 limit 10;
begin;
call populate_t1_small2();
select count(*) from t1;
select * from t1 where keyc > 30 limit 10;
rollback;
select count(*) from t1;
select * from t1 where keyc > 30 limit 10;
#
update t1 set keyc = keyc + 2000;
select * from t1 limit 10;
rollback;
begin;
update t1 set keyc = keyc + 2000;
select * from t1 limit 10;
rollback;
select * from t1 limit 10;
commit;
select * from t1 limit 10;
#
insert into t2 select * from t1 where keyc < 2101;
select count(*) from t2;
#
drop procedure populate_t1;
drop procedure populate_t1_small;
drop procedure populate_t1_small2;
if (! `SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_bzip2' AND variable_value = 'ON'`)
{
--skip Test requires InnoDB compiled with libbz2
}
if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_lz4' AND variable_value = 'ON'`)
{
--skip Test requires InnoDB compiled with liblz4
}
if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_lzma' AND variable_value = 'ON' `)
{
--skip Test requires InnoDB compiled with liblzma
}
if (! `SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_lzo' AND variable_value = 'ON'`)
{
--skip Test requires InnoDB compiled with liblzo
}
if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_punch_hole' AND variable_value = 'ON'`)
{
--skip Test requires InnoDB compiled with fallocate(FALLOC_PUNCH_HOLE| FALLOC_KEEP_SIZE)
}
if (! `SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_snappy' AND variable_value = 'ON'`)
{
--skip Test requires InnoDB compiled with libsnappy
}
# Convert tablespace flags to the format understood by MariaDB 10.1.0..10.1.20,
# with the assumption that the flags were correct.
sub convert_to_mariadb_101
{
my ($file, $page_size) = @_;
open(FILE, "+<", $file) or die "Unable to open $file\n";
sysread(FILE, $_, $page_size)==$page_size||die "Unable to read $file\n";
sysseek(FILE, 0, 0)||die "Unable to seek $file\n";
# FIL_PAGE_DATA + FSP_SPACE_FLAGS = 38 + 16 = 54 bytes from the start
my($flags) = unpack "x[54]N", $_;
my $badflags = ($flags & 0x3f);
my $compression_level=3;
$badflags |= 1<<6|$compression_level<<7 if ($flags & 1 << 16);
$badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE
substr ($_, 54, 4) = pack("N", $badflags);
# Replace the innodb_checksum_algorithm=none checksum
substr ($_, 0, 4) = pack("N", 0xdeadbeef);
substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef);
syswrite(FILE, $_, $page_size)==$page_size||die "Unable to write $file\n";
close(FILE);
}
--disable_warnings
set global innodb_file_format = `Barracuda`;
set global innodb_file_per_table = on;
--enable_warnings
create table innodb_normal (c1 int not null auto_increment primary key, b char(200)) engine=innodb;
create table innodb_page_compressed1 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=1;
create table innodb_page_compressed2 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=2;
create table innodb_page_compressed3 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=3;
create table innodb_page_compressed4 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=4;
create table innodb_page_compressed5 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=5;
create table innodb_page_compressed6 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=6;
create table innodb_page_compressed7 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=7;
create table innodb_page_compressed8 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=8;
create table innodb_page_compressed9 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=9;
--disable_query_log
begin;
let $i = 2000;
while ($i)
{
insert into innodb_normal(b) values(REPEAT('Aa',50));
insert into innodb_normal(b) values(REPEAT('a',100));
insert into innodb_normal(b) values(REPEAT('b',100));
insert into innodb_normal(b) values(REPEAT('0',100));
insert into innodb_normal(b) values(REPEAT('1',100));
dec $i;
}
insert into innodb_page_compressed1 select * from innodb_normal;
insert into innodb_page_compressed2 select * from innodb_normal;
insert into innodb_page_compressed3 select * from innodb_normal;
insert into innodb_page_compressed4 select * from innodb_normal;
insert into innodb_page_compressed5 select * from innodb_normal;
insert into innodb_page_compressed6 select * from innodb_normal;
insert into innodb_page_compressed7 select * from innodb_normal;
insert into innodb_page_compressed8 select * from innodb_normal;
insert into innodb_page_compressed9 select * from innodb_normal;
commit;
--enable_query_log
select count(*) from innodb_page_compressed1;
select count(*) from innodb_page_compressed3;
select count(*) from innodb_page_compressed4;
select count(*) from innodb_page_compressed5;
select count(*) from innodb_page_compressed6;
select count(*) from innodb_page_compressed6;
select count(*) from innodb_page_compressed7;
select count(*) from innodb_page_compressed8;
select count(*) from innodb_page_compressed9;
#
# Wait until pages are really compressed
#
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
--let $MYSQLD_DATADIR=`select @@datadir`
# shutdown before grep
--source include/shutdown_mysqld.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_normal.ibd
--let SEARCH_RANGE = 10000000
--let SEARCH_PATTERN=AaAaAaAa
--echo # innodb_normal expected FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed1.ibd
--echo # innodb_page_compressed1 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed2.ibd
--echo # innodb_page_compressed2 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed3.ibd
--echo # innodb_page_compressed3 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed4.ibd
--echo # innodb_page_compressed4 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed5.ibd
--echo # innodb_page_compressed5 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed6.ibd
--echo # innodb_page_compressed6 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed7.ibd
--echo # innodb_page_compressed7 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed8.ibd
--echo # innodb_page_compressed8 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_page_compressed9.ibd
--echo # innodb_page_compressed9 page compressed expected NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
-- source include/start_mysqld.inc
select count(*) from innodb_page_compressed1;
select count(*) from innodb_page_compressed3;
select count(*) from innodb_page_compressed4;
select count(*) from innodb_page_compressed5;
select count(*) from innodb_page_compressed6;
select count(*) from innodb_page_compressed6;
select count(*) from innodb_page_compressed7;
select count(*) from innodb_page_compressed8;
select count(*) from innodb_page_compressed9;
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
drop table innodb_normal;
drop table innodb_page_compressed1;
drop table innodb_page_compressed2;
drop table innodb_page_compressed3;
drop table innodb_page_compressed4;
drop table innodb_page_compressed5;
drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
--echo ===> Testing size=$size
--disable_warnings
--eval CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=$size
--enable_warnings
insert into t1 values(1,"I");
insert into t1 values(2,"AM");
insert into t1 values(3,"COMPRESSED");
--source include/shutdown_mysqld.inc
#STOP;
--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd
--exec $INNOCHECKSUM --write=crc32 $MYSQLD_DATADIR/test/t1.ibd
--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/t1.ibd
--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/t1.ibd
--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd
--source include/start_mysqld.inc
select * from t1;
drop table t1;
# These same selects are used many times in innodb_isolation.test
--echo ########## innodb_isolation_selects.inc ##########
SELECT * FROM t1;
SELECT COUNT(*) FROM t1;
SELECT COUNT(c1) FROM t1;
SELECT COUNT(c2) FROM t1; # Uses secondary index k2
SELECT COUNT(c3) FROM t1; # Uses clustered index
SELECT SUM(c1) FROM t1; # Uses secondary index
SELECT SUM(c2) FROM t1; # Uses secondary index
SELECT AVG(c1), MAX(c1), MIN(c2), AVG(c3), SUM(c4) FROM t1; # Uses clustered index
SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2);
SELECT COUNT(*) FROM t1 WHERE c1 > (SELECT AVG(c1) FROM t1);
--echo ###############################################
#
# Test to cause merge of the pages (by deleting)
# test/tab1 should be created already with innodb_file_per_table=ON
# The definition is intended to be based on
# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;"
#
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
# turn on flags
--disable_query_log
SET GLOBAL innodb_monitor_enable=index_page_merge_attempts;
SET GLOBAL innodb_monitor_reset=index_page_merge_attempts;
SET GLOBAL innodb_monitor_enable=index_page_merge_successful;
SET GLOBAL innodb_monitor_reset=index_page_merge_successful;
--enable_query_log
--echo # check MERGE_THRESHOLD
--replace_result tab1#P tab1#p
select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD
from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%';
insert into tab1 values (1, repeat('a',2048));
insert into tab1 values (2, repeat('a',2048));
insert into tab1 values (3, repeat('a',2048));
insert into tab1 values (8, repeat('a',2048));
insert into tab1 values (9, repeat('a',2048));
insert into tab1 values (10, repeat('a',2048));
insert into tab1 values (11, repeat('a',2048));
insert into tab1 values (12, repeat('a',2048));
insert into tab1 values (4, repeat('a',2048));
insert into tab1 values (5, repeat('a',2048));
insert into tab1 values (6, repeat('a',2048));
insert into tab1 values (7, repeat('a',2048));
insert into tab1 values (13, repeat('a',2048));
insert into tab1 values (14, repeat('a',2048));
# filled 2 leaf pages have been prepared
# | 1,..,7 | 8,..,14 |
select PAGE_NUMBER, NUMBER_RECORDS
from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1,
INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2
where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%'
and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS;
begin;
delete from tab1 where a = 12;
delete from tab1 where a = 13;
delete from tab1 where a = 14;
delete from tab1 where a = 5;
delete from tab1 where a = 6;
delete from tab1 where a = 7;
commit;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
# not merged yet
# | 1,2,3,4 | 8,9,10,11 |
--echo # check page merge happens (nothing is expected)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
select PAGE_NUMBER, NUMBER_RECORDS
from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1,
INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2
where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%'
and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS;
delete from tab1 where a = 11;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
--echo # check page merge happens (MERGE_THRESHOLD=50 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
delete from tab1 where a = 10;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
--echo # check page merge happens (MERGE_THRESHOLD=35 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
delete from tab1 where a = 9;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
--echo # check page merge happens (MERGE_THRESHOLD=25 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
--disable_query_log
# Reset flags
SET GLOBAL innodb_monitor_disable=index_page_merge_attempts;
SET GLOBAL innodb_monitor_disable=index_page_merge_successful;
--disable_warnings
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
--enable_warnings
--enable_query_log
#
# Test to cause merge of the pages (at secondary index by deleting)
# test/tab1 should be created already with innodb_file_per_table=ON
# The definition is intended to be based on
# "create table tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic;"
# "create index index1 on tab1(b(750));"
#
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
# turn on flags
--disable_query_log
SET GLOBAL innodb_monitor_enable=index_page_merge_attempts;
SET GLOBAL innodb_monitor_reset=index_page_merge_attempts;
SET GLOBAL innodb_monitor_enable=index_page_merge_successful;
SET GLOBAL innodb_monitor_reset=index_page_merge_successful;
--enable_query_log
--echo # check MERGE_THRESHOLD
select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD
from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%';
INSERT INTO tab1 VALUES (1, concat("01", repeat('a',8190)));
INSERT INTO tab1 VALUES (2, concat("02", repeat('a',8190)));
INSERT INTO tab1 VALUES (3, concat("03", repeat('a',8190)));
INSERT INTO tab1 VALUES (4, concat("04", repeat('a',8190)));
INSERT INTO tab1 VALUES (5, concat("05", repeat('a',8190)));
INSERT INTO tab1 VALUES (6, concat("06", repeat('a',8190)));
INSERT INTO tab1 VALUES (7, concat("07", repeat('a',8190)));
INSERT INTO tab1 VALUES (8, concat("08", repeat('a',8190)));
INSERT INTO tab1 VALUES (9, concat("09", repeat('a',8190)));
INSERT INTO tab1 VALUES (10, concat("10", repeat('a',8190)));
INSERT INTO tab1 VALUES (22, concat("22", repeat('a',8190)));
INSERT INTO tab1 VALUES (23, concat("23", repeat('a',8190)));
INSERT INTO tab1 VALUES (24, concat("24", repeat('a',8190)));
INSERT INTO tab1 VALUES (25, concat("25", repeat('a',8190)));
INSERT INTO tab1 VALUES (26, concat("26", repeat('a',8190)));
INSERT INTO tab1 VALUES (27, concat("27", repeat('a',8190)));
INSERT INTO tab1 VALUES (28, concat("28", repeat('a',8190)));
INSERT INTO tab1 VALUES (29, concat("29", repeat('a',8190)));
INSERT INTO tab1 VALUES (30, concat("30", repeat('a',8190)));
INSERT INTO tab1 VALUES (31, concat("31", repeat('a',8190)));
INSERT INTO tab1 VALUES (32, concat("32", repeat('a',8190)));
INSERT INTO tab1 VALUES (33, concat("33", repeat('a',8190)));
INSERT INTO tab1 VALUES (11, concat("11", repeat('a',8190)));
INSERT INTO tab1 VALUES (12, concat("12", repeat('a',8190)));
INSERT INTO tab1 VALUES (13, concat("13", repeat('a',8190)));
INSERT INTO tab1 VALUES (14, concat("14", repeat('a',8190)));
INSERT INTO tab1 VALUES (15, concat("15", repeat('a',8190)));
INSERT INTO tab1 VALUES (16, concat("16", repeat('a',8190)));
INSERT INTO tab1 VALUES (17, concat("17", repeat('a',8190)));
INSERT INTO tab1 VALUES (18, concat("18", repeat('a',8190)));
INSERT INTO tab1 VALUES (19, concat("19", repeat('a',8190)));
INSERT INTO tab1 VALUES (20, concat("20", repeat('a',8190)));
INSERT INTO tab1 VALUES (21, concat("21", repeat('a',8190)));
INSERT INTO tab1 VALUES (34, concat("34", repeat('a',8190)));
INSERT INTO tab1 VALUES (35, concat("35", repeat('a',8190)));
INSERT INTO tab1 VALUES (36, concat("36", repeat('a',8190)));
INSERT INTO tab1 VALUES (37, concat("37", repeat('a',8190)));
INSERT INTO tab1 VALUES (38, concat("38", repeat('a',8190)));
INSERT INTO tab1 VALUES (39, concat("39", repeat('a',8190)));
INSERT INTO tab1 VALUES (40, concat("40", repeat('a',8190)));
INSERT INTO tab1 VALUES (41, concat("41", repeat('a',8190)));
INSERT INTO tab1 VALUES (42, concat("42", repeat('a',8190)));
# clustered index is still root page only with the 42 records.
# secondary index is filled 2 leaf pages have been prepared
# | 1,..,21 | 22,..,42 |
select PAGE_NUMBER, NUMBER_RECORDS
from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1,
INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2
where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%'
and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS;
begin;
delete from tab1 where a = 33;
delete from tab1 where a = 34;
delete from tab1 where a = 35;
delete from tab1 where a = 36;
delete from tab1 where a = 37;
delete from tab1 where a = 38;
delete from tab1 where a = 39;
delete from tab1 where a = 40;
delete from tab1 where a = 41;
delete from tab1 where a = 42;
delete from tab1 where a = 12;
delete from tab1 where a = 13;
delete from tab1 where a = 14;
delete from tab1 where a = 15;
delete from tab1 where a = 16;
delete from tab1 where a = 17;
delete from tab1 where a = 18;
delete from tab1 where a = 19;
delete from tab1 where a = 20;
delete from tab1 where a = 21;
commit;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
# secondary index is not merged yet
# | 1,..,11 | 22,..,32 |
--echo # check page merge happens (nothing is expected)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
select PAGE_NUMBER, NUMBER_RECORDS
from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1,
INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2
where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%'
and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS;
delete from tab1 where a = 32;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
--echo # check page merge happens (MERGE_THRESHOLD=50 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
delete from tab1 where a = 31;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
--echo # check page merge happens (MERGE_THRESHOLD=45 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
delete from tab1 where a = 30;
# wait for purge view progress (records are deleted actually by purge)
--source include/wait_all_purged.inc
--echo # check page merge happens (MERGE_THRESHOLD=40 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
--disable_query_log
# Reset flags
SET GLOBAL innodb_monitor_disable=index_page_merge_attempts;
SET GLOBAL innodb_monitor_disable=index_page_merge_successful;
--disable_warnings
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
--enable_warnings
--enable_query_log
#
# Test to cause merge of the pages (by updating to smaller)
# test/tab1 should be created already with innodb_file_per_table=ON
# The definition is intended to be based on
# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;"
#
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
# turn on flags
--disable_query_log
SET GLOBAL innodb_monitor_enable=index_page_merge_attempts;
SET GLOBAL innodb_monitor_reset=index_page_merge_attempts;
SET GLOBAL innodb_monitor_enable=index_page_merge_successful;
SET GLOBAL innodb_monitor_reset=index_page_merge_successful;
--enable_query_log
--echo # check MERGE_THRESHOLD
select t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD
from INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
where t.TABLE_ID = i.TABLE_ID and t.NAME like 'test/tab1%';
insert into tab1 values (1, repeat('a',2048));
insert into tab1 values (2, repeat('a',2048));
insert into tab1 values (3, repeat('a',2048));
insert into tab1 values (8, repeat('a',2048));
insert into tab1 values (9, repeat('a',2048));
insert into tab1 values (10, repeat('a',2048));
insert into tab1 values (11, repeat('a',2048));
insert into tab1 values (12, repeat('a',2048));
insert into tab1 values (4, repeat('a',2048));
insert into tab1 values (5, repeat('a',2048));
insert into tab1 values (6, repeat('a',2048));
insert into tab1 values (7, repeat('a',2048));
insert into tab1 values (13, repeat('a',2048));
insert into tab1 values (14, repeat('a',2048));
# filled 2 leaf pages have been prepared
# | 1,..,7 | 8,..,14 |
select PAGE_NUMBER, NUMBER_RECORDS
from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1,
INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2
where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%'
and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS;
update tab1 set b='' where a = 12;
update tab1 set b='' where a = 13;
update tab1 set b='' where a = 14;
update tab1 set b='' where a = 5;
update tab1 set b='' where a = 6;
update tab1 set b='' where a = 7;
# not merged yet
# | 1,2,3,4 | 8,9,10,11 |
--echo # check page merge happens (nothing is expected)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
select PAGE_NUMBER, NUMBER_RECORDS
from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES s1,
INFORMATION_SCHEMA.INNODB_BUFFER_PAGE s2
where s1.SPACE = s2.SPACE AND NAME like 'test/tab1%'
and PAGE_TYPE = "INDEX" order by PAGE_NUMBER, NUMBER_RECORDS;
update tab1 set b='' where a = 11;
--echo # check page merge happens (MERGE_THRESHOLD=50 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
update tab1 set b='' where a = 10;
--echo # check page merge happens (MERGE_THRESHOLD=35 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
update tab1 set b='' where a = 9;
--echo # check page merge happens (MERGE_THRESHOLD=25 causes merge here)
SELECT name,count_reset FROM information_schema.innodb_metrics
WHERE name like 'index_page_merge_%';
--disable_query_log
# Reset flags
SET GLOBAL innodb_monitor_disable=index_page_merge_attempts;
SET GLOBAL innodb_monitor_disable=index_page_merge_successful;
--disable_warnings
set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
--enable_warnings
--enable_query_log
This diff is collapsed.
#
# WL#6501: make truncate table atomic
#
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/big_test.inc
# Valgrind would complain about memory leaks when we crash on purpose.
--source include/not_valgrind.inc
# Embedded server does not support crashing
--source include/not_embedded.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
# suppress expected warnings
call mtr.add_suppression("does not exist in the InnoDB internal");
################################################################################
#
# Will test following scenarios:
# 1. Hit crash point on completing drop of all indexes before creation of index
# is commenced.
# 2. Hit crash point after data is updated to system-table and in-memory dict.
#
################################################################################
#-----------------------------------------------------------------------------
#
# create test-bed
#
let $per_table = `select @@innodb_file_per_table`;
eval set global innodb_file_per_table = on;
let $WL6501_TMP_DIR = `select @@tmpdir`;
let $WL6501_DATA_DIR = `select @@datadir`;
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
#-----------------------------------------------------------------------------
#
# 1. Hit crash point on completing drop of all indexes before creation of index
# is commenced.
#
--echo "1. Hit crash point on completing drop of all indexes before creation"
--echo " of index is commenced."
eval set global innodb_file_per_table = $wl6501_file_per_table;
set innodb_strict_mode=off;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = $wl6501_row_fmt
key_block_size = $wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t;
check table t;
#
set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
--source include/expect_crash.inc
--error 2013
truncate table t;
#
--source include/start_mysqld.inc
check table t;
#-----------------------------------------------------------------------------
#
# 2. Hit crash point after data is updated to system-table and in-memory dict.
#
--echo "2. Hit crash point after data is updated to system-table and"
--echo " in-memory dict."
eval set global innodb_file_per_table = $wl6501_file_per_table;
set innodb_strict_mode=off;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = $wl6501_row_fmt
key_block_size = $wl6501_kbs;
--enable_warnings
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t;
check table t;
#
set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
--source include/expect_crash.inc
--error 2013
truncate table t;
#
--source include/start_mysqld.inc
check table t;
#-----------------------------------------------------------------------------
#
# remove test-bed
#
eval set global innodb_file_per_table = $per_table;
# Remove ibtmp* which are re-generated after each mysqld invocation
# skip auto generated auto.cnf from list_files
--remove_files_wildcard $bugdir ibtmp*
--remove_files_wildcard $bugdir auto.cnf
--list_files $bugdir
--remove_files_wildcard $bugdir ibdata*
--remove_files_wildcard $bugdir ib_logfile*
--remove_files_wildcard $bugdir undo00*
--copy_file $bugdir/bak_ibdata1 $bugdir/ibdata1
--copy_file $bugdir/bak_ibdata2 $bugdir/ibdata2
--copy_file $bugdir/bak_ib_logfile0 $bugdir/ib_logfile0
--copy_file $bugdir/bak_ib_logfile1 $bugdir/ib_logfile1
--copy_file $bugdir/bak_ib_logfile2 $bugdir/ib_logfile2
--copy_file $bugdir/bak_undo001 $bugdir/undo001
--copy_file $bugdir/bak_undo002 $bugdir/undo002
--copy_file $bugdir/bak_undo003 $bugdir/undo003
# Check that the latest checkpoint in the redo log files
# is not newer than the checkpoint sampled by no_checkpoint_start.inc
--source include/kill_mysqld.inc
perl;
my $cp = $ENV{CHECKPOINT_LSN};
$cp =~ s/^InnoDB\t\t//;
my $log = "$ENV{MYSQLD_DATADIR}ib_logfile0";
open(LOG, "<$log") || die "Unable to open $log";
seek(LOG, 512, 0) || die "Unable to seek $log";
die unless read(LOG, $_, 16) == 16;
my ($no1hi,$no1lo,$cp1hi,$cp1lo) = unpack("N*", $_);
seek(LOG, 3 * 512, 0) || die "Unable to seek $log";
die unless read(LOG, $_, 16) == 16;
my ($no2hi,$no2lo,$cp2hi,$cp2lo) = unpack("N*", $_);
close(LOG);
my $cp1 = $cp1hi << 32 | $cp1lo;
my $cp2 = $cp2hi << 32 | $cp2lo;
open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die;
if ($cp1 > $cp || $cp2 > $cp) {
print OUT "--source include/start_mysqld.inc\n";
print OUT "$ENV{CLEANUP_IF_CHECKPOINT}\n";
print OUT "--skip Extra checkpoint 1 after $cp";
print OUT " ($no1hi:$no1lo=$cp1,$no2hi:$no2lo=$cp2)\n";
}
close(OUT);
EOF
--source $MYSQLTEST_VARDIR/log/check.txt
--remove_file $MYSQLTEST_VARDIR/log/check.txt
# Preparation for using no_checkpoint_end.inc
let MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /.*Last checkpoint at[ ]*([0-9]+).*/\1/
let CHECKPOINT_LSN=`SHOW ENGINE INNODB STATUS`;
--echo === information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
--disable_query_log
--replace_result #P# #p# #SP# #sp#
--replace_regex /FTS_([0-9a-f_]+)([A-Z0-9_]+)/FTS_AUX_\2/
SELECT t.name 'Table Name',
s.name 'Tablespace',
t.flag 'Table Flags',
t.n_cols 'Columns',
t.row_format 'Row Format',
t.zip_page_size 'Zip Size',
t.space_type 'Space Type'
FROM information_schema.innodb_sys_tables t LEFT JOIN
information_schema.innodb_sys_tablespaces s
ON t.space = s.space
WHERE t.name not like 'SYS_%'
AND t.name NOT LIKE 'mysql/%'
AND t.name NOT LIKE 'sys/%'
ORDER BY t.name;
--enable_query_log
# This script assumes that the caller did the following;
# LET $MYSQLD_DATADIR = `select @@datadir`;
# LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
--echo === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
--disable_query_log
--replace_regex /#P#/#p#/ /#SP#/#sp#/
--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR/ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR/ $MYSQL_TMP_DIR MYSQL_TMP_DIR $INNODB_PAGE_SIZE DEFAULT
SELECT s.name 'Space_Name',
s.space_type 'Space_Type',
s.page_size 'Page_Size',
s.zip_page_size 'Zip_Size',
s.row_format 'Formats_Permitted',
d.path 'Path'
FROM information_schema.innodb_sys_tablespaces s,
information_schema.innodb_sys_datafiles d
WHERE s.space = d.space
AND s.name NOT LIKE 'mysql/%'
AND s.name NOT LIKE 'sys/%'
ORDER BY s.space;
--enable_query_log
# Wait for everything to be purged.
# The user should have set innodb_purge_rseg_truncate_frequency=1.
let $wait_counter= 300;
while ($wait_counter)
{
--replace_regex /.*History list length ([0-9]+).*/\1/
let $remaining= `SHOW ENGINE INNODB STATUS`;
if ($remaining == 'InnoDB 0')
{
let $wait_counter= 0;
}
if ($wait_counter)
{
real_sleep 0.1;
dec $wait_counter;
}
}
echo $remaining transactions not purged;
--source include/innodb_page_size.inc
--source include/not_embedded.inc
-- echo #
-- echo # MDEV-11623 MariaDB 10.1 fails to start datadir created with
-- echo # MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K
-- echo #
# This is actually testing the opposite: starting the fixed 10.1 with
# buggy 10.1 files (by manually converting the flags in the files).
--disable_query_log
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of tablespace");
FLUSH TABLES;
--enable_query_log
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
let MYSQLD_DATADIR=`select @@datadir`;
CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT;
CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
--disable_warnings
# ROW_FORMAT=COMPRESSED is not available with innodb_page_size>16k
SET INNODB_STRICT_MODE=OFF;
CREATE TABLE tz(a INT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
SET INNODB_STRICT_MODE=ON;
--enable_warnings
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
EVAL CREATE TABLE tdd(a INT) ENGINE=InnoDB, DATA DIRECTORY='$MYSQL_TMP_DIR';
CREATE TABLE tp(a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC PAGE_COMPRESSED=1;
CREATE TABLE ti(a INT) ENGINE=InnoDB;
FLUSH TABLES ti FOR EXPORT;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_backup_tablespaces("test", "ti");
EOF
UNLOCK TABLES;
ALTER TABLE ti DISCARD TABLESPACE;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_discard_tablespaces("test", "ti");
ib_restore_tablespaces("test", "ti");
do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl";
my $ps = $ENV{INNODB_PAGE_SIZE};
my $dd = $ENV{MYSQLD_DATADIR};
convert_to_mariadb_101("$dd/test/ti.ibd", $ps);
EOF
ALTER TABLE ti IMPORT TABLESPACE;
BEGIN;
INSERT INTO tr VALUES(1);
INSERT INTO tc VALUES(1);
INSERT INTO td VALUES(1);
INSERT INTO tz VALUES(1);
INSERT INTO tdd VALUES(1);
INSERT INTO tp VALUES(1);
INSERT INTO ti VALUES(1);
--source include/kill_mysqld.inc
perl;
do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl";
my $ps = $ENV{INNODB_PAGE_SIZE};
my $dd = $ENV{MYSQLD_DATADIR};
convert_to_mariadb_101("$dd/ibdata1", $ps);
convert_to_mariadb_101("$dd/test/tr.ibd", $ps);
convert_to_mariadb_101("$dd/test/tc.ibd", $ps);
convert_to_mariadb_101("$dd/test/td.ibd", $ps);
convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768;
convert_to_mariadb_101("$dd/test/tp.ibd", $ps);
convert_to_mariadb_101("$dd/test/ti.ibd", $ps);
convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps);
EOF
--source include/start_mysqld.inc
CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
--source include/shutdown_mysqld.inc
perl;
do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl";
my $ps = $ENV{INNODB_PAGE_SIZE};
my $dd = $ENV{MYSQLD_DATADIR};
convert_to_mariadb_101("$dd/ibdata1", $ps);
convert_to_mariadb_101("$dd/test/tr.ibd", $ps);
convert_to_mariadb_101("$dd/test/tc.ibd", $ps);
convert_to_mariadb_101("$dd/test/td.ibd", $ps);
convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768;
convert_to_mariadb_101("$dd/test/tp.ibd", $ps);
convert_to_mariadb_101("$dd/test/ti.ibd", $ps);
convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps);
EOF
--let $restart_parameters=--innodb-read-only
--source include/start_mysqld.inc
CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
--source include/shutdown_mysqld.inc
--let $restart_parameters=
--source include/start_mysqld.inc
DROP TABLE tr,tc,td,tz,tdd,tp,ti;
# Crash-safe InnoDB ALTER operations
--source include/not_valgrind.inc
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_crashrep.inc
--disable_query_log
call mtr.add_suppression('InnoDB: cannot find a free slot for an undo log');
call mtr.add_suppression('InnoDB: row_merge_rename_index_to_add failed with error 47');
call mtr.add_suppression('InnoDB: Flagged corruption of `c[23]`');
call mtr.add_suppression('InnoDB: Index `c[23]` .*is corrupted');
--enable_query_log
--echo #
--echo # Bug#20015132 ALTER TABLE FAILS TO CHECK IF TABLE IS CORRUPTED
--echo #
CREATE TABLE t1(c1 INT PRIMARY KEY, c2 CHAR(1), c3 INT UNSIGNED) ENGINE=InnoDB;
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET DEBUG_DBUG='+d,ib_create_table_fail_too_many_trx';
--error ER_TOO_MANY_CONCURRENT_TRXS
ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
SET DEBUG_DBUG=@saved_debug_dbug;
ALTER TABLE t1 ADD INDEX (c2), ADD INDEX (c3);
# Flag the secondary indexes corrupted.
SET DEBUG_DBUG='+d,dict_set_index_corrupted';
CHECK TABLE t1;
# Ensure that the corruption is permanent.
--source include/restart_mysqld.inc
CHECK TABLE t1;
ALTER TABLE t1 DROP INDEX c2;
CHECK TABLE t1;
# We refuse an ALTER TABLE that would modify the InnoDB data dictionary
# while leaving some of the table corrupted.
--error ER_INDEX_CORRUPT
ALTER TABLE t1 ADD INDEX (c2,c3);
# This will rebuild the table, uncorrupting all secondary indexes.
ALTER TABLE t1 CHANGE c3 c3 INT NOT NULL;
CHECK TABLE t1;
ALTER TABLE t1 ADD INDEX (c2,c3);
DROP TABLE t1;
let $MYSQLD_DATADIR= `select @@datadir`;
let datadir= `select @@datadir`;
# These are from include/shutdown_mysqld.inc and allow to call start_mysqld.inc
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--echo #
--echo # Bug #14669848 CRASH DURING ALTER MAKES ORIGINAL TABLE INACCESSIBLE
--echo #
--echo # -- Scenario 1:
--echo # Crash the server in ha_innobase::commit_inplace_alter_table()
--echo # just after committing the dictionary changes.
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
INSERT INTO t1 VALUES (1,2),(3,4);
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
let $orig_table_id = `SELECT table_id
FROM information_schema.innodb_sys_tables
WHERE name = 'test/t1'`;
# Write file to make mysql-test-run.pl expect crash
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
--echo # Restart mysqld after the crash and reconnect.
--source include/start_mysqld.inc
let $temp_table_name = `SELECT SUBSTR(name, 6)
FROM information_schema.innodb_sys_tables
WHERE table_id = $orig_table_id`;
--echo # Manual *.frm recovery begin.
--move_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/$temp_table_name.frm
perl;
my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
my $t1_frm = "$ENV{'datadir'}/test/t1.frm";
rename($frm_file[0], $t1_frm);
EOF
--echo # Manual recovery end
FLUSH TABLES;
--echo # Drop the orphaned original table.
--disable_query_log
eval DROP TABLE `#mysql50#$temp_table_name`;
--enable_query_log
--echo # Files in datadir after manual recovery.
--list_files $MYSQLD_DATADIR/test
SHOW TABLES;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES (5,6),(7,8);
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
DROP TABLE t1;
--echo # -- Scenario 2:
--echo # Crash the server in ha_innobase::commit_inplace_alter_table()
--echo # just before committing the dictionary changes, but after
--echo # writing the MLOG_FILE_RENAME records. As the mini-transaction
--echo # is not committed, the renames will not be replayed.
CREATE TABLE t2 (f1 int not null, f2 int not null) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1,2),(3,4);
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_before_commit';
let $orig_table_id = `SELECT table_id
FROM information_schema.innodb_sys_tables
WHERE name = 'test/t2'`;
# Write file to make mysql-test-run.pl expect crash
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
--echo # Startup the server after the crash
--source include/start_mysqld.inc
--echo # Read and remember the temporary table name
let $temp_table_name = `SELECT SUBSTRING(name,6)
FROM information_schema.innodb_sys_tables
WHERE name LIKE "test/#sql-ib$orig_table_id%"`;
# This second copy is an environment variable for the perl script below.
let temp_table_name = $temp_table_name;
--echo # Manual *.frm recovery begin. The dictionary was not updated
--echo # and the files were not renamed. The rebuilt table
--echo # was left behind on purpose, to faciliate data recovery.
perl;
my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
my $target_frm = "$ENV{'datadir'}/test/$ENV{'temp_table_name'}.frm";
rename($frm_file[0], $target_frm);
EOF
--echo # Manual recovery end
--echo # Drop the orphaned rebuilt table.
--disable_query_log
eval DROP TABLE `#mysql50#$temp_table_name`;
--enable_query_log
SHOW TABLES;
INSERT INTO t2 VALUES (5,6),(7,8);
SELECT * from t2;
SHOW CREATE TABLE t2;
DROP TABLE t2;
CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
DROP TABLE t2;
--list_files $MYSQLD_DATADIR/test
--echo # -------------------------
--echo # End of Testing Scenario 2
--echo # -------------------------
--echo #
--echo # Bug#19330255 WL#7142 - CRASH DURING ALTER TABLE LEADS TO
--echo # DATA DICTIONARY INCONSISTENCY
--echo #
CREATE TABLE t1(a int PRIMARY KEY, b varchar(255), c int NOT NULL)
ENGINE=InnoDB;
INSERT INTO t1 SET a=1,c=2;
SET DEBUG_DBUG='+d,innodb_alter_commit_crash_after_commit';
let $orig_table_id = `select table_id from
information_schema.innodb_sys_tables where name = 'test/t1'`;
# FIXME: MDEV-9469 'Incorrect key file' on ALTER TABLE
# Write file to make mysql-test-run.pl expect crash
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
#
--error 2013
ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
--echo # Restart mysqld after the crash and reconnect.
--source include/start_mysqld.inc
let $temp_table_name = `SELECT SUBSTR(name, 6)
FROM information_schema.innodb_sys_tables
WHERE table_id = $orig_table_id`;
--echo # Manual *.frm recovery begin.
--move_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/$temp_table_name.frm
perl;
my @frm_file = glob "$ENV{'datadir'}/test/#sql-*.frm";
my $t1_frm = "$ENV{'datadir'}/test/t1.frm";
rename($frm_file[0], $t1_frm);
EOF
--echo # Manual recovery end
FLUSH TABLES;
--echo # Drop the orphaned original table.
--disable_query_log
eval DROP TABLE `#mysql50#$temp_table_name`;
--enable_query_log
--echo # Files in datadir after manual recovery.
--list_files $MYSQLD_DATADIR/test
SHOW TABLES;
SHOW CREATE TABLE t1;
UPDATE t1 SET d=NULL;
SELECT * FROM t1;
DROP TABLE t1;
--source include/not_embedded.inc
--source include/innodb_page_size.inc
--echo #
--echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING
--echo # OR DISCARDED TABLESPACES
--echo #
--disable_query_log
call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: ");
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation");
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them");
call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`.`\(t\|x\.\.d\)` because it could not be opened");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing");
call mtr.add_suppression("Could not find a valid tablespace file for");
call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\.`\(t\|x\.\.d\)` in the cache");
call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found");
call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist");
--enable_query_log
let $MYSQLD_DATADIR=`select @@datadir`;
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t(a INT)ENGINE=InnoDB;
CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
--source include/shutdown_mysqld.inc
# Remove the tablespace files.
--remove_file $MYSQLD_DATADIR/test/t.ibd
--remove_file $MYSQLD_DATADIR/test/x@002e@002ed.ibd
--source include/start_mysqld.inc
# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open().
# The table does exist, only the tablespace does not exist.
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t;
--error ER_NO_SUCH_TABLE_IN_ENGINE
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE
ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
SHOW WARNINGS;
--error ER_PARSE_ERROR
ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE;
--error ER_PARSE_ERROR
ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE;
--error ER_PARSE_ERROR
ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE;
ALTER TABLE t DISCARD TABLESPACE;
DROP TABLE t;
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM `x..d`;
DROP TABLE `x..d`;
--source include/have_innodb.inc
#
# MDEV-11995 ALTER TABLE proceeds despite reporting ER_TOO_LONG_KEY error
#
set @@sql_mode=strict_trans_tables;
create table t1(a text not null) row_format=dynamic engine=innodb;
create index idx1 on t1(a(3073));
show create table t1;
drop table t1;
set @@sql_mode=default;
--innodb_autoinc_lock_mode=1
--innodb_lock_wait_timeout=2
This diff is collapsed.
#
# wl#9383 INNODB: ADD AN OPTION TO TURN OFF/ON DEADLOCK CHECKER
#
--source include/have_innodb.inc
--source include/not_embedded.inc
--source include/count_sessions.inc
SET GLOBAL innodb_deadlock_detect=OFF;
SET GLOBAL innodb_lock_wait_timeout=2;
connection default;
CREATE TABLE t1(
id INT,
PRIMARY KEY(id)
) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1), (2), (3);
BEGIN;
SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
connect (con1,localhost,root,,);
BEGIN;
SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
send SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
connection default;
send SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
connection con1;
--error ER_LOCK_WAIT_TIMEOUT
reap;
ROLLBACK;
connection default;
--error ER_LOCK_WAIT_TIMEOUT
reap;
ROLLBACK;
DROP TABLE t1;
disconnect con1;
--source include/wait_until_count_sessions.inc
SET GLOBAL innodb_lock_wait_timeout=default;
SET GLOBAL innodb_deadlock_detect=default;
#
# MDEV-9155 Enabling Defragmenting in 10.1.8 still causes OPTIMIZE TABLE to take metadatalocks
#
source include/have_innodb.inc;
source include/have_sequence.inc;
set global innodb_defragment=1;
create table t1 (a int not null primary key auto_increment, b varchar(256), key second(a, b)) engine=innodb;
insert t1 select null, repeat('a', 256) from seq_1_to_100;
select count(*) from t1;
connect (con1,localhost,root);
start transaction;
select count(*) from t1;
connection default;
optimize table t1;
connection con1;
drop table t1;
set global innodb_defragment=default;
This diff is collapsed.
--source include/have_log_bin.inc
--source include/have_xtradb.inc
create table t1 (i int) engine=InnoDB;
set innodb_fake_changes = 1;
--disable_abort_on_error
insert into t1 values (1);
set innodb_fake_changes = 0;
drop table t1;
# #############################################################
# wl6747 : Set merge threshold at index level
# Check with CREATE INDEX on all datatypes
# Check with by ALTER TABLE MODIFY COLUMN TYPE
# Check with ALTER TABLE ADD Index
# Check by setting at index level with CREATE TABLE
# Check with BLOB column at index level with CREATE Index
# Check with row_format=compressed and key_block_size=8k
# Check withe valid and invalid merge_threshold values.
#
# Check actual behavior for table, partitioned table and temporary table
# #############################################################
--source include/have_innodb_16k.inc
--source include/have_partition.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
# Check index merge threshold by create index on all datatypes
CREATE TABLE tab(a BIGINT PRIMARY KEY,c1 TINYTEXT,c2 TEXT,c3 MEDIUMTEXT,
c4 TINYBLOB,c5 BLOB,c6 MEDIUMBLOB,c7 LONGBLOB) ENGINE=InnoDB;
# check index merge threshold on all datatypes
CREATE INDEX index1 ON tab(c1(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=51';
CREATE INDEX index2 ON tab(c2(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=-1';
CREATE INDEX index3 ON tab(c3(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=20';
CREATE INDEX index4 ON tab(c4(255)) COMMENT 'Check index level merge MERGE_THRESHOLD=25';
CREATE INDEX index5 ON tab(c5(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=30';
CREATE INDEX index6 ON tab(c6(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=35';
CREATE INDEX index7 ON tab(c7(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=40';
SHOW CREATE TABLE tab;
SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab';
ALTER TABLE tab comment='MERGE_THRESHOLD=49';
SHOW CREATE TABLE tab;
SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab';
ALTER TABLE tab MODIFY COLUMN c7 VARCHAR(2048) ;
SHOW CREATE TABLE tab;
SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab';
ALTER TABLE tab ADD INDEX index8 (c7(750)) COMMENT 'Check index level merge MERGE_THRESHOLD=45';
SHOW CREATE TABLE tab;
SELECT t.NAME as TABLE_NAME, i.NAME as INDEX_NAME, i.MERGE_THRESHOLD
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
WHERE t.TABLE_ID = i.TABLE_ID AND t.NAME = 'test/tab';
# Cleanup
DROP TABLE tab;
--echo #
--echo # behavior for deleting records
--echo #
--echo # test to confirm behavior (MERGE_THRESHOLD=50 (default))
CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;
--source suite/innodb/include/innodb_merge_threshold_delete.inc
DROP TABLE tab1;
--echo # test to confirm behavior (MERGE_THRESHOLD=35)
CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB
COMMENT='MERGE_THRESHOLD=35';
--source suite/innodb/include/innodb_merge_threshold_delete.inc
DROP TABLE tab1;
--echo # test to confirm behavior (MERGE_THRESHOLD=25)
CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB
COMMENT='MERGE_THRESHOLD=25';
--source suite/innodb/include/innodb_merge_threshold_delete.inc
DROP TABLE tab1;
--echo # test to confirm partitioned table (MERGE_THRESHOLD=35)
CREATE TABLE tab1 (a bigint primary key, b varchar(2048))
COMMENT='MERGE_THRESHOLD=35'
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (20) ENGINE = InnoDB,
PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB);
--source suite/innodb/include/innodb_merge_threshold_delete.inc
DROP TABLE tab1;
--echo #
--echo # behavior for updating to smaller records
--echo #
--echo # test to confirm behavior (MERGE_THRESHOLD=50 (default))
CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;
--source suite/innodb/include/innodb_merge_threshold_update.inc
DROP TABLE tab1;
--echo # test to confirm behavior (MERGE_THRESHOLD=35)
CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB
COMMENT='MERGE_THRESHOLD=35';
--source suite/innodb/include/innodb_merge_threshold_update.inc
DROP TABLE tab1;
--echo # test to confirm behavior (MERGE_THRESHOLD=25)
CREATE TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB
COMMENT='MERGE_THRESHOLD=25';
--source suite/innodb/include/innodb_merge_threshold_update.inc
DROP TABLE tab1;
--echo # test to confirm explicit temporary table (MERGE_THRESHOLD=35)
--echo # (though not registered to SYS_TABLES,SYS_INDEXES, it works correctly)
# Temporary tables are not purged. so deleting records is not caused
# So, should be tested by updating case only
CREATE TEMPORARY TABLE tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB
COMMENT='MERGE_THRESHOLD=35';
--source suite/innodb/include/innodb_merge_threshold_update.inc
DROP TABLE tab1;
--echo #
--echo # behavior for secondary index with blob
--echo #
--echo # test to confirm behavior (MERGE_THRESHOLD=50 (default))
# not to cause page operation at primary key, row_format=dynamic and the key is blob
CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic;
CREATE INDEX index1 ON tab1(b(750));
--source suite/innodb/include/innodb_merge_threshold_secondary.inc
DROP TABLE tab1;
--echo # test to confirm behavior (MERGE_THRESHOLD=45)
CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic;
CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=45';
--source suite/innodb/include/innodb_merge_threshold_secondary.inc
DROP TABLE tab1;
--echo # test to confirm behavior (MERGE_THRESHOLD=40)
CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB row_format=dynamic;
CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=40';
--source suite/innodb/include/innodb_merge_threshold_secondary.inc
DROP TABLE tab1;
--echo # compressed table behaves same (MERGE_THRESHOLD=45)
CREATE TABLE tab1 (a bigint primary key, b blob) engine=InnoDB
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
CREATE INDEX index1 ON tab1(b(750)) COMMENT 'MERGE_THRESHOLD=45';
--source suite/innodb/include/innodb_merge_threshold_secondary.inc
DROP TABLE tab1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
This diff is collapsed.
--default_storage_engine=InnoDB
--innodb-buffer-pool-size=32M
--innodb-log-file-size=32M
--innodb-page-size=32K
This diff is collapsed.
--default_storage_engine=InnoDB
--innodb-page-size=32K
--innodb-log-file-size=32M
--innodb-buffer-pool-size=32M
This diff is collapsed.
--default_storage_engine=InnoDB
--innodb-buffer-pool-size=32M
--innodb-page-size=64K
--innodb-log-file-size=32M
This diff is collapsed.
--default_storage_engine=InnoDB
--innodb-buffer-pool-size=32M
--innodb-page-size=64K
--innodb-log-file-size=32M
This diff is collapsed.
--innodb-file-per-table
--innodb-file-format='Barracuda'
--innodb-buffer-pool-size=32M
--innodb-page-size=64k
--innodb-strict-mode=OFF
--source include/have_innodb.inc
#
# MDEV-13227: Assertion failure len < 16384 in file rem0rec.cc line 1285
# Crashes with innodb_page_size=64K. Does not crash at <= 32K.
#
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
INSERT INTO t1 SET a=CONCAT('A', SPACE(8000), 'B');
INSERT INTO t1 SELECT a FROM t1;
UPDATE t1 SET a=CONCAT(a, RAND(), a);
UPDATE t1 SET a=CONCAT(a, RAND(), a);
# random data no output we are only interested if fails
--disable_result_log
SELECT * from t1;
--enable_result_log
DROP TABLE t1;
CREATE TABLE t1 (a LONGTEXT) ENGINE=INNODB ROW_FORMAT=DYNAMIC;
SHOW WARNINGS;
INSERT INTO t1 SET a=CONCAT('A', SPACE(8000), 'B');
INSERT INTO t1 SELECT a FROM t1;
UPDATE t1 SET a=CONCAT(a, RAND(), a);
UPDATE t1 SET a=CONCAT(a, RAND(), a);
# random data no output we are only interested if fails
--disable_result_log
SELECT * from t1;
--enable_result_log
DROP TABLE t1;
--source include/have_innodb.inc
#
# MDEV-11850: Can't create foreign key referencing a virtual column
#
create or replace table a (
cola int(10) primary key,
v_cola int(10) as (cola mod 10) virtual,
p_cola int(10) as (cola mod 10) persistent
) engine=innodb;
create index v_cola on a (v_cola);
create index p_cola on a (p_cola);
create or replace table b(
cola int(10),
v_cola int(10),
p_cola int(10),
c_cola int(10) as (cola + 2) virtual
) engine=innodb;
alter table b add constraint `p_cola_fk`
foreign key (p_cola) references a (p_cola)
on delete restrict
on update restrict;
show warnings;
show create table b;
alter table b add constraint `v_cola_fk`
foreign key (v_cola) references a (v_cola)
on delete restrict
on update restrict;
show warnings;
show create table b;
alter table b add constraint `c_cola_fk`
foreign key (c_cola) references a (cola)
on delete restrict
on update restrict;
show warnings;
show create table b;
#
# Test that fk really works
#
insert into a(cola) values (12);
select * from a;
insert into b(cola, v_cola, p_cola) values (10,2,2);
select * from b;
--error 1452
insert into b(cola, v_cola, p_cola) values (10,1,1);
--error 1451
delete from a;
select * from a;
select * from b;
drop table b, a;
--changed-page-bitmaps
--innodb-track-changed-pages
-- source include/have_xtradb.inc
-- source include/not_embedded.inc
FLUSH NO_WRITE_TO_BINLOG changed_page_bitmaps;
select * from information_schema.changed_page_bitmaps;
This diff is collapsed.
--loose-innodb-lock-wait-timeout=1
--loose-innodb-lock-schedule-algorithm=VATS
This diff is collapsed.
--binlog-cache-size=32768 --loose-innodb-lock-wait-timeout=1
--default-storage-engine=MyISAM
--innodb-strict-mode=0
--innodb-file-per-table=0
--source include/have_innodb.inc
create table t1(a int not null primary key, b geometry not null) engine=innodb;
--error 1846
ALTER ONLINE TABLE t1 ADD SPATIAL INDEX new(b);
show warnings;
show errors;
ALTER ONLINE TABLE t1 ADD SPATIAL INDEX new(b), LOCK=SHARED;
show warnings;
show errors;
drop table t1;
create table t1(a int not null, b geometry not null, d int,spatial key c(b), key d(d)) engine=innodb;
show create table t1;
--error 1846
ALTER ONLINE TABLE t1 ADD PRIMARY KEY(a),DROP INDEX d;
show warnings;
show errors;
ALTER ONLINE TABLE t1 ADD PRIMARY KEY(a),DROP INDEX d, LOCK=SHARED;
show warnings;
show errors;
drop table t1;
This diff is collapsed.
--source include/have_innodb.inc
--source include/not_embedded.inc
call mtr.add_suppression("InnoDB: Compression failed for space [0-9]+ name test/innodb_page_compressed[0-9] len [0-9]+ err 2 write_size [0-9]+.");
# All page compression test use the same
--source include/innodb-page-compression.inc
-- echo #done
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
-- source include/have_innodb.inc
-- source include/have_innodb_snappy.inc
--source include/not_embedded.inc
call mtr.add_suppression("InnoDB: Compression failed for space [0-9]+ name test/innodb_page_compressed[0-9] len [0-9]+ err 2 write_size [0-9]+.");
# snappy
set global innodb_compression_algorithm = snappy;
# All page compression test use the same
--source include/innodb-page-compression.inc
-- echo #done
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--innodb-defragment=0
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--loose-innodb-buffer-pool-stats
--loose-innodb-buffer-page
--loose-innodb-buffer-page-lru
--binlog-format=row
--innodb-defragment=1
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment