Commit 23365584 authored by Sergei Golubchik's avatar Sergei Golubchik

many simple fixes for innodb suite,

merging tests from 5.6
parent ff82741d
...@@ -12862,6 +12862,5 @@ select * from t1; ...@@ -12862,6 +12862,5 @@ select * from t1;
ERROR HY000: Table 't1' is marked as crashed and should be repaired ERROR HY000: Table 't1' is marked as crashed and should be repaired
show warnings; show warnings;
Level Code Message Level Code Message
Warning 127 Got error 127 when reading table `test`.`t1`
Error 1194 Table 't1' is marked as crashed and should be repaired Error 1194 Table 't1' is marked as crashed and should be repaired
drop table t1; drop table t1;
This diff is collapsed.
...@@ -696,8 +696,6 @@ select count(*) from t1 where sca_pic is null; ...@@ -696,8 +696,6 @@ select count(*) from t1 where sca_pic is null;
count(*) count(*)
2 2
alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic); alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
alter table t1 drop index sca_pic;
alter table t1 add index sca_pic (cat_code, sca_pic);
select count(*) from t1 where sca_code='PD' and sca_pic is null; select count(*) from t1 where sca_code='PD' and sca_pic is null;
count(*) count(*)
1 1
...@@ -705,9 +703,6 @@ select count(*) from t1 where cat_code='E'; ...@@ -705,9 +703,6 @@ select count(*) from t1 where cat_code='E';
count(*) count(*)
0 0
alter table t1 drop index sca_pic, add index (sca_pic, cat_code); alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
ERROR 42000: Incorrect index name 'sca_pic'
alter table t1 drop index sca_pic;
alter table t1 add index (sca_pic, cat_code);
select count(*) from t1 where sca_code='PD' and sca_pic is null; select count(*) from t1 where sca_code='PD' and sca_pic is null;
count(*) count(*)
1 1
...@@ -1696,7 +1691,7 @@ variable_value - @innodb_rows_deleted_orig ...@@ -1696,7 +1691,7 @@ variable_value - @innodb_rows_deleted_orig
71 71
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted'; SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig variable_value - @innodb_rows_inserted_orig
1071 1007
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated'; SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig variable_value - @innodb_rows_updated_orig
866 866
...@@ -2261,7 +2256,7 @@ t1 CREATE TABLE `t1` ( ...@@ -2261,7 +2256,7 @@ t1 CREATE TABLE `t1` (
drop table t1; drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed; create table t1 (v varchar(10), c char(10)) row_format=fixed;
Warnings: Warnings:
Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT. Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -2977,8 +2972,11 @@ CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; ...@@ -2977,8 +2972,11 @@ CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
set @old_sql_mode = @@sql_mode;
set @@sql_mode = 'STRICT_TRANS_TABLES';
ALTER TABLE t2 MODIFY a INT NOT NULL; ALTER TABLE t2 MODIFY a INT NOT NULL;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150 "Foreign key constraint is incorrectly formed") ERROR HY000: Column 'a' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_1' SET NULL
set @@sql_mode = @old_sql_mode;
DELETE FROM t1; DELETE FROM t1;
DROP TABLE t2,t1; DROP TABLE t2,t1;
CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY) CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
...@@ -3029,7 +3027,7 @@ c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255) ...@@ -3029,7 +3027,7 @@ c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
Warnings: Warnings:
Note 1051 Unknown table 't1' Note 1051 Unknown table 'test.t1'
CREATE TABLE t1( CREATE TABLE t1(
id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE=InnoDB; ) ENGINE=InnoDB;
...@@ -3048,8 +3046,8 @@ SET TX_ISOLATION='read-committed'; ...@@ -3048,8 +3046,8 @@ SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0; SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2; DROP TABLE IF EXISTS t1, t2;
Warnings: Warnings:
Note 1051 Unknown table 't1' Note 1051 Unknown table 'test.t1'
Note 1051 Unknown table 't2' Note 1051 Unknown table 'test.t2'
CREATE TABLE t1 ( a int ) ENGINE=InnoDB; CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
SELECT * FROM t2; SELECT * FROM t2;
......
...@@ -127,4 +127,4 @@ Warning 1265 Data truncated for column 'col79' at row 1 ...@@ -127,4 +127,4 @@ Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1 Warning 1264 Out of range value for column 'col84' at row 1
DROP TABLE bug52745; DROP TABLE bug52745;
SET GLOBAL innodb_file_format=Antelope; SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_per_table=0; SET GLOBAL innodb_file_per_table=1;
...@@ -4,11 +4,10 @@ set old_alter_table=0; ...@@ -4,11 +4,10 @@ set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null) CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1; ENGINE=InnoDB KEY_BLOCK_SIZE=1;
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
ERROR HY000: Too big row ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
Error 139 Too big row Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
Error 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
DROP TABLE bug53591; DROP TABLE bug53591;
SET GLOBAL innodb_file_format=Antelope; SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_per_table=0; SET GLOBAL innodb_file_per_table=1;
set @@global.innodb_fast_shutdown=0; call mtr.add_suppression('InnoDB: Error: Table "mysql"."innodb_(table|index)_stats" not found');
CREATE TABLE t(a INT)ENGINE=InnoDB; call mtr.add_suppression('InnoDB: Error: Fetch of persistent statistics requested');
CREATE TABLE t(a INT)ENGINE=InnoDB STATS_PERSISTENT=0;
RENAME TABLE t TO u; RENAME TABLE t TO u;
DROP TABLE u; DROP TABLE u;
SELECT @@innodb_fast_shutdown; SELECT @@innodb_fast_shutdown;
@@innodb_fast_shutdown @@innodb_fast_shutdown
0 0
Last record of ID_IND root page (9): Last record of ID_IND root page (9):
1808000018050074000000000000000c5359535f464f524549474e5f434f4c53 18080000180500c0000000000000000c5359535f464f524549474e5f434f4c53
...@@ -46,7 +46,6 @@ ERROR HY000: Index corrupt_bit_test_ā is corrupted ...@@ -46,7 +46,6 @@ ERROR HY000: Index corrupt_bit_test_ā is corrupted
show warnings; show warnings;
Level Code Message Level Code Message
Warning 180 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted Warning 180 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted
Warning 180 Got error 180 when reading table `test`.`corrupt_bit_test_ā`
Error 1712 Index corrupt_bit_test_ā is corrupted Error 1712 Index corrupt_bit_test_ā is corrupted
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001); insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
select * from corrupt_bit_test_ā use index(primary) where a = 10001; select * from corrupt_bit_test_ā use index(primary) where a = 10001;
......
lock_mode lock_type lock_table lock_index lock_rec lock_data lock_mode lock_type lock_table lock_index lock_rec lock_data
X RECORD `test`.```t'\"_str` `PRIMARY` 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc''''' X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
X RECORD `test`.```t'\"_str` `PRIMARY` 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc''''' X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
X RECORD `test`.```t'\"_str` `PRIMARY` 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""' X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
X RECORD `test`.```t'\"_str` `PRIMARY` 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""' X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\' X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\' X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0' X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0' X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0 X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0 X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
X RECORD `test`.`t_max` `PRIMARY` 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615 X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
X RECORD `test`.`t_max` `PRIMARY` 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615 X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
lock_table COUNT(*) lock_table COUNT(*)
`test`.`t_max` 2 `test`.`t_max` 2
`test`.`t_min` 2 `test`.`t_min` 2
......
...@@ -6,28 +6,28 @@ CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB; ...@@ -6,28 +6,28 @@ CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
INSERT INTO infoschema_buffer_test VALUES(9); INSERT INTO infoschema_buffer_test VALUES(9);
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test" WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and PAGE_TYPE="index"; and PAGE_STATE="file_page" and PAGE_TYPE="index";
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
test/infoschema_buffer_test GEN_CLUST_INDEX 1 29 FILE_PAGE INDEX `test`.`infoschema_buffer_test` GEN_CLUST_INDEX 1 29 FILE_PAGE INDEX
INSERT INTO infoschema_buffer_test VALUES(19); INSERT INTO infoschema_buffer_test VALUES(19);
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test" WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and PAGE_TYPE="index"; and PAGE_STATE="file_page" and PAGE_TYPE="index";
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
test/infoschema_buffer_test GEN_CLUST_INDEX 2 58 FILE_PAGE INDEX `test`.`infoschema_buffer_test` GEN_CLUST_INDEX 2 58 FILE_PAGE INDEX
CREATE INDEX idx ON infoschema_buffer_test(col1); CREATE INDEX idx ON infoschema_buffer_test(col1);
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test" WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index"; and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
test/infoschema_buffer_test idx 2 32 FILE_PAGE INDEX `test`.`infoschema_buffer_test` idx 2 32 FILE_PAGE INDEX
DROP TABLE infoschema_buffer_test; DROP TABLE infoschema_buffer_test;
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test"; WHERE TABLE_NAME like "%infoschema_buffer_test%";
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id)) CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
ENGINE=INNODB; ENGINE=INNODB;
...@@ -38,93 +38,9 @@ ON DELETE CASCADE) ...@@ -38,93 +38,9 @@ ON DELETE CASCADE)
ENGINE=INNODB; ENGINE=INNODB;
SELECT count(*) SELECT count(*)
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page" WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
and PAGE_TYPE="index"; and PAGE_TYPE="index";
count(*) count(*)
2 2
DROP TABLE infoschema_child; DROP TABLE infoschema_child;
DROP TABLE infoschema_parent; DROP TABLE infoschema_parent;
show create table information_schema.innodb_buffer_page;
Table Create Table
INNODB_BUFFER_PAGE CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE` (
`POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`BLOCK_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGE_TYPE` varchar(64) DEFAULT NULL,
`FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
`FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
`IS_HASHED` varchar(3) DEFAULT NULL,
`NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
`OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
`ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT '0',
`TABLE_NAME` varchar(1024) DEFAULT NULL,
`INDEX_NAME` varchar(1024) DEFAULT NULL,
`NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT '0',
`DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
`COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGE_STATE` varchar(64) DEFAULT NULL,
`IO_FIX` varchar(64) DEFAULT NULL,
`IS_OLD` varchar(3) DEFAULT NULL,
`FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
show create table information_schema.innodb_buffer_page_lru;
Table Create Table
INNODB_BUFFER_PAGE_LRU CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE_LRU` (
`POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`LRU_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0',
`SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGE_TYPE` varchar(64) DEFAULT NULL,
`FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
`FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
`IS_HASHED` varchar(3) DEFAULT NULL,
`NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
`OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
`ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT '0',
`TABLE_NAME` varchar(1024) DEFAULT NULL,
`INDEX_NAME` varchar(1024) DEFAULT NULL,
`NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT '0',
`DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
`COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
`COMPRESSED` varchar(3) DEFAULT NULL,
`IO_FIX` varchar(64) DEFAULT NULL,
`IS_OLD` varchar(3) DEFAULT NULL,
`FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
show create table information_schema.innodb_buffer_pool_stats;
Table Create Table
INNODB_BUFFER_POOL_STATS CREATE TEMPORARY TABLE `INNODB_BUFFER_POOL_STATS` (
`POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`POOL_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
`FREE_BUFFERS` bigint(21) unsigned NOT NULL DEFAULT '0',
`DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
`OLD_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
`MODIFIED_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
`PENDING_DECOMPRESS` bigint(21) unsigned NOT NULL DEFAULT '0',
`PENDING_READS` bigint(21) unsigned NOT NULL DEFAULT '0',
`PENDING_FLUSH_LRU` bigint(21) unsigned NOT NULL DEFAULT '0',
`PENDING_FLUSH_LIST` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGES_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGES_NOT_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGES_MADE_YOUNG_RATE` double NOT NULL DEFAULT '0',
`PAGES_MADE_NOT_YOUNG_RATE` double NOT NULL DEFAULT '0',
`NUMBER_PAGES_READ` bigint(21) unsigned NOT NULL DEFAULT '0',
`NUMBER_PAGES_CREATED` bigint(21) unsigned NOT NULL DEFAULT '0',
`NUMBER_PAGES_WRITTEN` bigint(21) unsigned NOT NULL DEFAULT '0',
`PAGES_READ_RATE` double NOT NULL DEFAULT '0',
`PAGES_CREATE_RATE` double NOT NULL DEFAULT '0',
`PAGES_WRITTEN_RATE` double NOT NULL DEFAULT '0',
`NUMBER_PAGES_GET` bigint(21) unsigned NOT NULL DEFAULT '0',
`HIT_RATE` bigint(21) unsigned NOT NULL DEFAULT '0',
`YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT '0',
`NOT_YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT '0',
`NUMBER_PAGES_READ_AHEAD` bigint(21) unsigned NOT NULL DEFAULT '0',
`NUMBER_READ_AHEAD_EVICTED` bigint(21) unsigned NOT NULL DEFAULT '0',
`READ_AHEAD_RATE` double NOT NULL DEFAULT '0',
`READ_AHEAD_EVICTED_RATE` double NOT NULL DEFAULT '0',
`LRU_IO_TOTAL` bigint(21) unsigned NOT NULL DEFAULT '0',
`LRU_IO_CURRENT` bigint(21) unsigned NOT NULL DEFAULT '0',
`UNCOMPRESS_TOTAL` bigint(21) unsigned NOT NULL DEFAULT '0',
`UNCOMPRESS_CURRENT` bigint(21) unsigned NOT NULL DEFAULT '0'
) ENGINE=MEMORY DEFAULT CHARSET=utf8
...@@ -31,6 +31,11 @@ SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; ...@@ -31,6 +31,11 @@ SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
col_1_varchar = REPEAT("c", 4000) col_1_varchar = REPEAT("c", 4000)
0 0
1 1
ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
ALTER TABLE worklog5743 ROW_FORMAT=COMPACT;
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
ALTER TABLE worklog5743 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
DROP TABLE worklog5743; DROP TABLE worklog5743;
CREATE TABLE worklog5743 ( CREATE TABLE worklog5743 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) , col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
...@@ -539,13 +544,15 @@ col_1_blob = REPEAT("c", 4000) ...@@ -539,13 +544,15 @@ col_1_blob = REPEAT("c", 4000)
DROP TABLE worklog5743_key8; DROP TABLE worklog5743_key8;
CREATE TABLE worklog5743 ( CREATE TABLE worklog5743 (
col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) ,
col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), col_3_text TEXT (4000), col_4_blob BLOB (4000), col_5_text TEXT (4000),
col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) col_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
) ROW_FORMAT=DYNAMIC, engine = innodb; ) ROW_FORMAT=DYNAMIC, engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255) REPEAT("a", 4000) , REPEAT("a", 255)
); );
CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072));
CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072));
INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000),
REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255) REPEAT("a", 4000) , REPEAT("a", 255)
...@@ -570,6 +577,19 @@ SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; ...@@ -570,6 +577,19 @@ SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
col_1_varbinary = REPEAT("c", 4000) col_1_varbinary = REPEAT("c", 4000)
1 1
0 0
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255)
);
CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072));
CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072));
CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072));
UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
ERROR HY000: Undo log record is too big.
SHOW WARNINGS;
Level Code Message
Error 1713 Undo log record is too big.
DROP TABLE worklog5743; DROP TABLE worklog5743;
CREATE TABLE worklog5743 ( CREATE TABLE worklog5743 (
col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) ,
...@@ -607,6 +627,13 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), ...@@ -607,6 +627,13 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255) REPEAT("a", 4000) , REPEAT("a", 255)
); );
ROLLBACK; ROLLBACK;
UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
WHERE col_1_varbinary = REPEAT("a", 4000)
AND col_2_varchar = REPEAT("o", 4000);
ERROR HY000: Undo log record is too big.
SHOW WARNINGS;
Level Code Message
Error 1713 Undo log record is too big.
SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
col_1_varbinary = REPEAT("c", 4000) col_1_varbinary = REPEAT("c", 4000)
...@@ -873,6 +900,7 @@ SELECT COUNT(*) FROM worklog5743; ...@@ -873,6 +900,7 @@ SELECT COUNT(*) FROM worklog5743;
COUNT(*) COUNT(*)
1 1
COMMIT; COMMIT;
"Disconnect the connections 1 and 2"
DROP TABLE worklog5743; DROP TABLE worklog5743;
CREATE TABLE worklog5743 ( CREATE TABLE worklog5743 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
...@@ -1172,7 +1200,6 @@ DROP INDEX prefix_idx ON worklog5743; ...@@ -1172,7 +1200,6 @@ DROP INDEX prefix_idx ON worklog5743;
CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000)); CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Warning 1071 Specified key was too long; max key length is 3072 bytes
Warning 1071 Specified key was too long; max key length is 3072 bytes
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
col_1_varbinary = REPEAT("a", 4000) col_1_varbinary = REPEAT("a", 4000)
...@@ -1230,7 +1257,6 @@ DROP INDEX prefix_idx ON worklog5743; ...@@ -1230,7 +1257,6 @@ DROP INDEX prefix_idx ON worklog5743;
CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000)); CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000));
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes Warning 1071 Specified key was too long; max key length is 3072 bytes
Warning 1071 Specified key was too long; max key length is 3072 bytes
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
col_1_text = REPEAT("a", 4000) col_1_text = REPEAT("a", 4000)
...@@ -1288,7 +1314,7 @@ AND col_2_text = REPEAT("o", 4000); ...@@ -1288,7 +1314,7 @@ AND col_2_text = REPEAT("o", 4000);
col_1_text = REPEAT("c", 4000) col_1_text = REPEAT("c", 4000)
ALTER TABLE worklog5743 DROP PRIMARY KEY; ALTER TABLE worklog5743 DROP PRIMARY KEY;
ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950)); ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950));
ERROR HY000: Too big row ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
col_1_text = REPEAT("a", 4000) col_1_text = REPEAT("a", 4000)
...@@ -1343,11 +1369,22 @@ CREATE TABLE worklog5743 ( ...@@ -1343,11 +1369,22 @@ CREATE TABLE worklog5743 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(767)) PRIMARY KEY (col_1_varchar(767))
) engine = innodb; ) engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT('a',4000),REPEAT('b',4000));
CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000)); CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000));
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings: Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes Warning 1071 Specified key was too long; max key length is 767 bytes
Warning 1071 Specified key was too long; max key length is 767 bytes ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE worklog5743;
Table Create Table
worklog5743 CREATE TABLE `worklog5743` (
`col_1_varchar` varchar(4000) NOT NULL DEFAULT '',
`col_2_varchar` varchar(4000) DEFAULT NULL,
PRIMARY KEY (`col_1_varchar`(767)),
KEY `prefix_idx` (`col_1_varchar`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
DROP TABLE worklog5743; DROP TABLE worklog5743;
SET GLOBAL innodb_file_format=Antelope; "Disconnect the connection 1"
SET GLOBAL innodb_file_per_table=0;
SET GLOBAL innodb_large_prefix=0;
...@@ -86,5 +86,5 @@ col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500) ...@@ -86,5 +86,5 @@ col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1 1 1
DROP TABLE worklog5743; DROP TABLE worklog5743;
SET GLOBAL innodb_file_format=Antelope; SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_per_table=0; SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_large_prefix=0; SET GLOBAL innodb_large_prefix=0;
This diff is collapsed.
...@@ -25,10 +25,11 @@ if (`select plugin_auth_version <= "1.1.8-29.3" from information_schema.plugins ...@@ -25,10 +25,11 @@ if (`select plugin_auth_version <= "1.1.8-29.3" from information_schema.plugins
####################################################################### #######################################################################
-- source include/have_innodb.inc -- source include/have_innodb.inc
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
let collation=utf8_unicode_ci; let collation=utf8_unicode_ci;
--source include/have_collation.inc --source include/have_collation.inc
set optimizer_switch = 'mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; set optimizer_switch = 'mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
# Save the original values of some variables in order to be able to # Save the original values of some variables in order to be able to
...@@ -450,21 +451,11 @@ INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca ...@@ -450,21 +451,11 @@ INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca
select count(*) from t1 where sca_code = 'PD'; select count(*) from t1 where sca_code = 'PD';
select count(*) from t1 where sca_code <= 'PD'; select count(*) from t1 where sca_code <= 'PD';
select count(*) from t1 where sca_pic is null; select count(*) from t1 where sca_pic is null;
# this should be fixed by MySQL (see Bug #51451)
# now that http://bugs.mysql.com/49838 is fixed the following ALTER does
# copy the table instead of failing
# --error ER_WRONG_NAME_FOR_INDEX
alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic); alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
alter table t1 drop index sca_pic;
alter table t1 add index sca_pic (cat_code, sca_pic);
select count(*) from t1 where sca_code='PD' and sca_pic is null; select count(*) from t1 where sca_code='PD' and sca_pic is null;
select count(*) from t1 where cat_code='E'; select count(*) from t1 where cat_code='E';
# this should be fixed by MySQL (see Bug #51451)
--error ER_WRONG_NAME_FOR_INDEX
alter table t1 drop index sca_pic, add index (sca_pic, cat_code); alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
alter table t1 drop index sca_pic;
alter table t1 add index (sca_pic, cat_code);
select count(*) from t1 where sca_code='PD' and sca_pic is null; select count(*) from t1 where sca_code='PD' and sca_pic is null;
select count(*) from t1 where sca_pic >= 'n'; select count(*) from t1 where sca_pic >= 'n';
select sca_pic from t1 where sca_pic is null; select sca_pic from t1 where sca_pic is null;
...@@ -1264,7 +1255,7 @@ drop table t1; ...@@ -1264,7 +1255,7 @@ drop table t1;
# #
CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB; CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
--error 1765 --error 1764
SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE); SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
DROP TABLE t1; DROP TABLE t1;
...@@ -2328,12 +2319,12 @@ CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; ...@@ -2328,12 +2319,12 @@ CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1); INSERT INTO t2 VALUES (1);
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
# mysqltest first does replace_regex, then replace_result # NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ set @old_sql_mode = @@sql_mode;
# Embedded server doesn't chdir to data directory set @@sql_mode = 'STRICT_TRANS_TABLES';
--replace_result $MYSQLD_DATADIR ./ master-data/ '' --error ER_FK_COLUMN_NOT_NULL
--error 1025
ALTER TABLE t2 MODIFY a INT NOT NULL; ALTER TABLE t2 MODIFY a INT NOT NULL;
set @@sql_mode = @old_sql_mode;
DELETE FROM t1; DELETE FROM t1;
DROP TABLE t2,t1; DROP TABLE t2,t1;
......
--source include/have_innodb.inc -- source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`; let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`; let $file_per_table=`select @@innodb_file_per_table`;
......
--source include/have_innodb.inc -- source include/have_innodb.inc
if (`select plugin_auth_version <= "1.1.8-29.3" from information_schema.plugins where plugin_name='innodb'`)
{
--skip Not fixed in XtraDB 1.1.8-29.3 or earlier
}
let $file_format=`select @@innodb_file_format`; let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`; let $file_per_table=`select @@innodb_file_per_table`;
...@@ -14,8 +10,10 @@ set old_alter_table=0; ...@@ -14,8 +10,10 @@ set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null) CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1; ENGINE=InnoDB KEY_BLOCK_SIZE=1;
-- error 139 -- replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
-- error ER_TOO_BIG_ROWSIZE
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
-- replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
SHOW WARNINGS; SHOW WARNINGS;
DROP TABLE bug53591; DROP TABLE bug53591;
......
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_innodb_16k.inc -- source include/have_innodb_16k.inc
# call mtr.add_suppression('InnoDB: Error: Table "mysql"."innodb_(table|index)_stats" not found');
# This test will not work if we don't do full shutdown of innodb call mtr.add_suppression('InnoDB: Error: Fetch of persistent statistics requested');
#
set @@global.innodb_fast_shutdown=0;
-- disable_query_log -- disable_query_log
let $create1 = query_get_value(SHOW CREATE TABLE mysql.innodb_table_stats, Create Table, 1); let $create1 = query_get_value(SHOW CREATE TABLE mysql.innodb_table_stats, Create Table, 1);
...@@ -18,7 +16,7 @@ DROP TABLE mysql.innodb_index_stats; ...@@ -18,7 +16,7 @@ DROP TABLE mysql.innodb_index_stats;
DROP TABLE mysql.innodb_table_stats; DROP TABLE mysql.innodb_table_stats;
-- enable_query_log -- enable_query_log
CREATE TABLE t(a INT)ENGINE=InnoDB; CREATE TABLE t(a INT)ENGINE=InnoDB STATS_PERSISTENT=0;
RENAME TABLE t TO u; RENAME TABLE t TO u;
DROP TABLE u; DROP TABLE u;
SELECT @@innodb_fast_shutdown; SELECT @@innodb_fast_shutdown;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Test for persistent corrupt bit for corrupted index and table # Test for persistent corrupt bit for corrupted index and table
# #
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
# Issues with innodb_change_buffering_debug on Windows, so the test scenario # Issues with innodb_change_buffering_debug on Windows, so the test scenario
# cannot be created on windows # cannot be created on windows
...@@ -11,6 +12,7 @@ ...@@ -11,6 +12,7 @@
--source include/have_debug.inc --source include/have_debug.inc
-- disable_query_log -- disable_query_log
call mtr.add_suppression("Flagged corruption of idx.*in CHECK TABLE");
# This test setup is extracted from bug56680.test: # This test setup is extracted from bug56680.test:
# The flag innodb_change_buffering_debug is only available in debug builds. # The flag innodb_change_buffering_debug is only available in debug builds.
# It instructs InnoDB to try to evict pages from the buffer pool when # It instructs InnoDB to try to evict pages from the buffer pool when
......
--source include/have_innodb.inc -- source include/restart_and_reinit.inc
--source include/restart_and_reinit.inc -- source include/have_innodb.inc
let $innodb_file_format_orig=`select @@innodb_file_format`; let $innodb_file_format_orig=`select @@innodb_file_format`;
......
...@@ -25,7 +25,7 @@ INSERT INTO infoschema_buffer_test VALUES(9); ...@@ -25,7 +25,7 @@ INSERT INTO infoschema_buffer_test VALUES(9);
# right away # right away
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test" WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and PAGE_TYPE="index"; and PAGE_STATE="file_page" and PAGE_TYPE="index";
# The NUMBER_RECORDS and DATA_SIZE should check with each insertion # The NUMBER_RECORDS and DATA_SIZE should check with each insertion
...@@ -33,14 +33,14 @@ INSERT INTO infoschema_buffer_test VALUES(19); ...@@ -33,14 +33,14 @@ INSERT INTO infoschema_buffer_test VALUES(19);
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test" WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and PAGE_TYPE="index"; and PAGE_STATE="file_page" and PAGE_TYPE="index";
CREATE INDEX idx ON infoschema_buffer_test(col1); CREATE INDEX idx ON infoschema_buffer_test(col1);
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test" WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index"; and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
...@@ -49,7 +49,7 @@ DROP TABLE infoschema_buffer_test; ...@@ -49,7 +49,7 @@ DROP TABLE infoschema_buffer_test;
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_buffer_test"; WHERE TABLE_NAME like "%infoschema_buffer_test%";
# Do one more test # Do one more test
#--replace_regex /'*[0-9]*'/'NUM'/ #--replace_regex /'*[0-9]*'/'NUM'/
...@@ -64,13 +64,9 @@ ENGINE=INNODB; ...@@ -64,13 +64,9 @@ ENGINE=INNODB;
SELECT count(*) SELECT count(*)
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page" WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
and PAGE_TYPE="index"; and PAGE_TYPE="index";
DROP TABLE infoschema_child; DROP TABLE infoschema_child;
DROP TABLE infoschema_parent; DROP TABLE infoschema_parent;
show create table information_schema.innodb_buffer_page;
show create table information_schema.innodb_buffer_page_lru;
show create table information_schema.innodb_buffer_pool_stats;
...@@ -16631,13 +16631,8 @@ int report_error(TABLE *table, int error) ...@@ -16631,13 +16631,8 @@ int report_error(TABLE *table, int error)
*/ */
if (error != HA_ERR_LOCK_DEADLOCK && error != HA_ERR_LOCK_WAIT_TIMEOUT if (error != HA_ERR_LOCK_DEADLOCK && error != HA_ERR_LOCK_WAIT_TIMEOUT
&& !table->in_use->killed) && !table->in_use->killed)
{
push_warning_printf(table->in_use, Sql_condition::WARN_LEVEL_WARN, error,
"Got error %d when reading table %`s.%`s",
error, table->s->db.str, table->s->table_name.str);
sql_print_error("Got error %d when reading table '%s'", sql_print_error("Got error %d when reading table '%s'",
error, table->s->path.str); error, table->s->path.str);
}
table->file->print_error(error,MYF(0)); table->file->print_error(error,MYF(0));
return 1; return 1;
} }
......
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