mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix test failures seen on
-- innodb-wl5522-debug-zip (path differences win/unix) -- innodb_defragment_fill_factor (stabilise) -- innodb_force_pk (case difference win/unix)
This commit is contained in:
@ -104,7 +104,7 @@ restore: t1 .ibd and .cfg files
|
||||
SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
|
||||
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
|
||||
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
|
||||
ERROR HY000: Got error 44 'Tablespace not found' from ./test_wl5522/t1.ibd
|
||||
ERROR HY000: Got error 44 't1.ibd
|
||||
SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure";
|
||||
restore: t1 .ibd and .cfg files
|
||||
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
|
||||
@ -537,7 +537,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
|
||||
restore: t1 .ibd and .cfg files
|
||||
SET SESSION debug_dbug="+d,fil_space_create_failure";
|
||||
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
|
||||
ERROR HY000: Got error 11 'Generic error' from ./test_wl5522/t1.ibd
|
||||
ERROR HY000: Got error 11 't1.ibd
|
||||
SET SESSION debug_dbug="-d,fil_space_create_failure";
|
||||
DROP TABLE test_wl5522.t1;
|
||||
unlink: t1.ibd
|
||||
@ -550,7 +550,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
|
||||
restore: t1 .ibd and .cfg files
|
||||
SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
|
||||
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
|
||||
ERROR HY000: Got error 39 'Data structure corruption' from ./test_wl5522/t1.ibd
|
||||
ERROR HY000: Got error 39 't1.ibd
|
||||
SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure";
|
||||
DROP TABLE test_wl5522.t1;
|
||||
unlink: t1.ibd
|
||||
|
@ -2,32 +2,48 @@ DROP TABLE if exists t1;
|
||||
DROP TABLE if exists t2;
|
||||
Testing tables with large records
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARCHAR(256), KEY SECOND(a, b)) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1, REPEAT('A', 256));
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
INSERT INTO t1 (b) SELECT b from t1;
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
790
|
||||
927
|
||||
select count(*) from t1 force index (second);
|
||||
count(*)
|
||||
790
|
||||
927
|
||||
# A few more insertions on the page should not cause a page split.
|
||||
insert into t1 values (81, REPEAT('A', 256));
|
||||
insert into t1 values (83, REPEAT('A', 256));
|
||||
# More insertions will cause page splits
|
||||
insert into t1 values (88, REPEAT('A', 50));
|
||||
insert into t1 values (85, REPEAT('A', 256));
|
||||
insert into t1 values (84, REPEAT('A', 256));
|
||||
insert into t1 values (87, REPEAT('A', 256));
|
||||
insert into t1 values (89, REPEAT('A', 256));
|
||||
insert into t1 values (82, REPEAT('A', 256));
|
||||
insert into t1 values (86, REPEAT('A', 256));
|
||||
# More insertions will cause page splits
|
||||
insert into t1 values (88, REPEAT('A', 256));
|
||||
insert into t1 values (85, REPEAT('A', 256));
|
||||
insert into t1 values (84, REPEAT('A', 256));
|
||||
DROP TABLE t1;
|
||||
Testing table with small records
|
||||
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b VARchar(16), KEY SECOND(a,b)) ENGINE=INNODB;
|
||||
optimize table t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 optimize status OK
|
||||
select sleep(1);
|
||||
sleep(1)
|
||||
0
|
||||
select count(*) from t2 force index(second);
|
||||
count(*)
|
||||
3701
|
||||
@ -49,16 +65,12 @@ insert into t2 values(1197, REPEAT('A', 16));
|
||||
insert into t2 values(1188, REPEAT('A', 16));
|
||||
insert into t2 values(1198, REPEAT('A', 16));
|
||||
insert into t2 values(1189, REPEAT('A', 16));
|
||||
insert into t2 values(1199, REPEAT('A', 16));
|
||||
insert into t2 values(1190, REPEAT('A', 16));
|
||||
insert into t2 values(1180, REPEAT('A', 16));
|
||||
More insertions will cause page split.
|
||||
insert into t2 values(1280, REPEAT('A', 16));
|
||||
insert into t2 values(1290, REPEAT('A', 16));
|
||||
insert into t2 values(1281, REPEAT('A', 16));
|
||||
insert into t2 values(1291, REPEAT('A', 16));
|
||||
insert into t2 values(1199, REPEAT('A', 16));
|
||||
insert into t2 values(1190, REPEAT('A', 16));
|
||||
insert into t2 values(1180, REPEAT('A', 16));
|
||||
insert into t2 values(1295, REPEAT('A', 16));
|
||||
insert into t2 values(1294, REPEAT('A', 16));
|
||||
insert into t2 values(1292, REPEAT('A', 16));
|
||||
insert into t2 values(1293, REPEAT('A', 16));
|
||||
DROP TABLE t2;
|
||||
|
@ -1,53 +1,53 @@
|
||||
CREATE TABLE T1(A INTEGER) ENGINE=INNODB;
|
||||
create table t1(a integer) engine=innodb;
|
||||
ERROR 42000: This table type requires a primary key
|
||||
SHOW WARNINGS;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1173 This table type requires a primary key
|
||||
CREATE TABLE T1(A INTEGER UNIQUE KEY) ENGINE=INNODB;
|
||||
create table t1(a integer unique key) engine=innodb;
|
||||
ERROR 42000: This table type requires a primary key
|
||||
SHOW WARNINGS;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1173 This table type requires a primary key
|
||||
CREATE TABLE T1(A INTEGER NOT NULL, B INTEGER,
|
||||
UNIQUE KEY(A,B)) ENGINE=INNODB;
|
||||
create table t1(a integer not null, b integer,
|
||||
unique key(a,b)) engine=innodb;
|
||||
ERROR 42000: This table type requires a primary key
|
||||
SHOW WARNINGS;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1173 This table type requires a primary key
|
||||
CREATE TABLE T1(A INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
SHOW CREATE TABLE T1;
|
||||
create table t1(a integer not null primary key) engine=innodb;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
T1 CREATE TABLE `T1` (
|
||||
`A` int(11) NOT NULL,
|
||||
PRIMARY KEY (`A`)
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW WARNINGS;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
DROP TABLE T1;
|
||||
CREATE TABLE T1(A INTEGER NOT NULL UNIQUE KEY) ENGINE=INNODB;
|
||||
SHOW CREATE TABLE T1;
|
||||
drop table t1;
|
||||
create table t1(a integer not null unique key) engine=innodb;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
T1 CREATE TABLE `T1` (
|
||||
`A` int(11) NOT NULL,
|
||||
UNIQUE KEY `A` (`A`)
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
UNIQUE KEY `a` (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW WARNINGS;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
DROP TABLE T1;
|
||||
drop table t1;
|
||||
set global innodb_force_primary_key = 0;
|
||||
CREATE TABLE T1(A INTEGER) ENGINE=INNODB;
|
||||
SHOW WARNINGS;
|
||||
create table t1(a integer) engine=innodb;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
INSERT INTO T1 VALUES (1),(2),(3);
|
||||
insert into t1 values (1),(2),(3);
|
||||
set global innodb_force_primary_key = 1;
|
||||
SELECT * FROM T1;
|
||||
A
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
CREATE TABLE T2(A INTEGER) ENGINE=INNODB;
|
||||
create table t2(a integer) engine=innodb;
|
||||
ERROR 42000: This table type requires a primary key
|
||||
SHOW WARNINGS;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1173 This table type requires a primary key
|
||||
DROP TABLE T1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user