344 changed files with 21334 additions and 19726 deletions
-
6BUILD/SETUP.sh
-
3BUILD/build_mccge.sh
-
2BUILD/compile-amd64-valgrind-max
-
2BUILD/compile-pentium-icc-valgrind-max
-
2BUILD/compile-pentium-valgrind-max
-
2BUILD/compile-pentium-valgrind-max-no-ndb
-
2BUILD/compile-pentium64-valgrind-max
-
11configure.in
-
3include/m_string.h
-
17include/my_sys.h
-
0mysql-test/include/innodb-index.inc
-
11mysql-test/r/innodb_bug38231.result
-
9mysql-test/r/innodb_bug44571.result
-
26mysql-test/r/mysqlshow.result
-
30mysql-test/suite/innodb/r/innodb-autoinc-44030.result
-
190mysql-test/suite/innodb/r/innodb-autoinc.result
-
0mysql-test/suite/innodb/r/innodb-consistent.result
-
88mysql-test/suite/innodb/r/innodb-index.result
-
0mysql-test/suite/innodb/r/innodb-lock.result
-
0mysql-test/suite/innodb/r/innodb-replace.result
-
0mysql-test/suite/innodb/r/innodb-semi-consistent.result
-
110mysql-test/suite/innodb/r/innodb-system-table-view.result
-
186mysql-test/suite/innodb/r/innodb.result
-
12mysql-test/suite/innodb/r/innodb_bug21704.result
-
0mysql-test/suite/innodb/r/innodb_bug34053.result
-
0mysql-test/suite/innodb/r/innodb_bug34300.result
-
0mysql-test/suite/innodb/r/innodb_bug35220.result
-
11mysql-test/suite/innodb/r/innodb_bug38231.result
-
0mysql-test/suite/innodb/r/innodb_bug39438.result
-
0mysql-test/suite/innodb/r/innodb_bug40565.result
-
0mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result
-
0mysql-test/suite/innodb/r/innodb_bug42101.result
-
0mysql-test/suite/innodb/r/innodb_bug44369.result
-
8mysql-test/suite/innodb/r/innodb_bug44571.result
-
0mysql-test/suite/innodb/r/innodb_bug45357.result
-
0mysql-test/suite/innodb/r/innodb_bug46000.result
-
21mysql-test/suite/innodb/r/innodb_bug47621.result
-
23mysql-test/suite/innodb/r/innodb_bug47622.result
-
0mysql-test/suite/innodb/r/innodb_bug47777.result
-
10mysql-test/suite/innodb/r/innodb_bug48024.result
-
42mysql-test/suite/innodb/r/innodb_bug49164.result
-
66mysql-test/suite/innodb/r/innodb_bug51378.result
-
13mysql-test/suite/innodb/r/innodb_bug51920.result
-
26mysql-test/suite/innodb/r/innodb_bug52663.result
-
130mysql-test/suite/innodb/r/innodb_bug52745.result
-
17mysql-test/suite/innodb/r/innodb_bug53290.result
-
16mysql-test/suite/innodb/r/innodb_bug53591.result
-
2mysql-test/suite/innodb/r/innodb_file_format.result
-
43mysql-test/suite/innodb/r/innodb_information_schema.result
-
76mysql-test/suite/innodb/r/innodb_multi_update.result
-
0mysql-test/suite/innodb/r/innodb_trx_weight.result
-
13mysql-test/suite/innodb/t/disabled.def
-
43mysql-test/suite/innodb/t/innodb-autoinc-44030.test
-
112mysql-test/suite/innodb/t/innodb-autoinc.test
-
0mysql-test/suite/innodb/t/innodb-consistent-master.opt
-
116mysql-test/suite/innodb/t/innodb-consistent.test
-
193mysql-test/suite/innodb/t/innodb-index.test
-
2mysql-test/suite/innodb/t/innodb-index_ucs2.test
-
0mysql-test/suite/innodb/t/innodb-lock.test
-
0mysql-test/suite/innodb/t/innodb-master.opt
-
0mysql-test/suite/innodb/t/innodb-replace.test
-
2mysql-test/suite/innodb/t/innodb-semi-consistent-master.opt
-
0mysql-test/suite/innodb/t/innodb-semi-consistent.test
-
94mysql-test/suite/innodb/t/innodb-system-table-view.test
-
3mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt
-
3mysql-test/suite/innodb/t/innodb-zip.test
-
244mysql-test/suite/innodb/t/innodb.test
-
0mysql-test/suite/innodb/t/innodb_bug21704.test
-
0mysql-test/suite/innodb/t/innodb_bug34053.test
-
0mysql-test/suite/innodb/t/innodb_bug34300.test
-
0mysql-test/suite/innodb/t/innodb_bug35220.test
-
1mysql-test/suite/innodb/t/innodb_bug36169.test
-
100mysql-test/suite/innodb/t/innodb_bug38231.test
-
0mysql-test/suite/innodb/t/innodb_bug39438-master.opt
-
51mysql-test/suite/innodb/t/innodb_bug39438.test
-
0mysql-test/suite/innodb/t/innodb_bug40565.test
-
0mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt
-
0mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test
-
0mysql-test/suite/innodb/t/innodb_bug42101.test
-
0mysql-test/suite/innodb/t/innodb_bug44369.test
-
22mysql-test/suite/innodb/t/innodb_bug44571.test
-
0mysql-test/suite/innodb/t/innodb_bug45357.test
-
0mysql-test/suite/innodb/t/innodb_bug46000.test
-
57mysql-test/suite/innodb/t/innodb_bug47621.test
-
55mysql-test/suite/innodb/t/innodb_bug47622.test
-
0mysql-test/suite/innodb/t/innodb_bug47777.test
-
22mysql-test/suite/innodb/t/innodb_bug48024.test
-
47mysql-test/suite/innodb/t/innodb_bug49164.test
-
77mysql-test/suite/innodb/t/innodb_bug51378.test
-
43mysql-test/suite/innodb/t/innodb_bug51920.test
-
34mysql-test/suite/innodb/t/innodb_bug52663.test
-
109mysql-test/suite/innodb/t/innodb_bug52745.test
-
22mysql-test/suite/innodb/t/innodb_bug53290.test
-
22mysql-test/suite/innodb/t/innodb_bug53591.test
-
15mysql-test/suite/innodb/t/innodb_file_format.test
-
103mysql-test/suite/innodb/t/innodb_information_schema.test
-
29mysql-test/suite/innodb/t/innodb_multi_update.test
-
0mysql-test/suite/innodb/t/innodb_trx_weight.test
-
53mysql-test/suite/sys_vars/r/innodb_buffer_pool_instances_basic.result
-
20mysql-test/suite/sys_vars/r/innodb_change_buffering_basic.result
@ -1,11 +0,0 @@ |
|||
SET storage_engine=InnoDB; |
|||
INSERT INTO bug38231 VALUES (1), (10), (300); |
|||
SET autocommit=0; |
|||
SELECT * FROM bug38231 FOR UPDATE; |
|||
a |
|||
1 |
|||
10 |
|||
300 |
|||
TRUNCATE TABLE bug38231; |
|||
COMMIT; |
|||
DROP TABLE bug38231; |
@ -1,9 +0,0 @@ |
|||
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; |
|||
ALTER TABLE bug44571 CHANGE foo bar INT; |
|||
ALTER TABLE bug44571 ADD INDEX bug44571b (foo); |
|||
ERROR 42000: Key column 'foo' doesn't exist in table |
|||
ALTER TABLE bug44571 ADD INDEX bug44571b (bar); |
|||
ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it |
|||
CREATE INDEX bug44571b ON bug44571 (bar); |
|||
ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it |
|||
DROP TABLE bug44571; |
@ -0,0 +1,30 @@ |
|||
drop table if exists t1; |
|||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; |
|||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; |
|||
INSERT INTO t1 VALUES (null); |
|||
INSERT INTO t1 VALUES (null); |
|||
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; |
|||
SELECT * FROM t1; |
|||
d1 |
|||
1 |
|||
2 |
|||
SELECT * FROM t1; |
|||
d1 |
|||
1 |
|||
2 |
|||
INSERT INTO t1 VALUES(null); |
|||
ALTER TABLE t1 AUTO_INCREMENT = 3; |
|||
SHOW CREATE TABLE t1; |
|||
Table Create Table |
|||
t1 CREATE TABLE `t1` ( |
|||
`d1` int(11) NOT NULL AUTO_INCREMENT, |
|||
PRIMARY KEY (`d1`) |
|||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 |
|||
INSERT INTO t1 VALUES(null); |
|||
SELECT * FROM t1; |
|||
d1 |
|||
1 |
|||
2 |
|||
3 |
|||
4 |
|||
DROP TABLE t1; |
@ -0,0 +1,110 @@ |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES; |
|||
TABLE_ID NAME FLAG N_COLS SPACE |
|||
11 SYS_FOREIGN 0 7 0 |
|||
12 SYS_FOREIGN_COLS 0 7 0 |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES; |
|||
INDEX_ID NAME TABLE_ID TYPE N_FIELDS PAGE_NO SPACE |
|||
11 ID_IND 11 3 1 302 0 |
|||
12 FOR_IND 11 0 1 303 0 |
|||
13 REF_IND 11 0 1 304 0 |
|||
14 ID_IND 12 3 2 305 0 |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS; |
|||
TABLE_ID NAME POS MTYPE PRTYPE LEN |
|||
11 ID 0 1 524292 0 |
|||
11 FOR_NAME 1 1 524292 0 |
|||
11 REF_NAME 2 1 524292 0 |
|||
11 N_COLS 3 6 0 4 |
|||
12 ID 0 1 524292 0 |
|||
12 POS 1 6 0 4 |
|||
12 FOR_COL_NAME 2 1 524292 0 |
|||
12 REF_COL_NAME 3 1 524292 0 |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS; |
|||
INDEX_ID NAME POS |
|||
11 ID 0 |
|||
12 FOR_NAME 0 |
|||
13 REF_NAME 0 |
|||
14 ID 0 |
|||
14 POS 1 |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN; |
|||
ID FOR_NAME REF_NAME N_COLS TYPE |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; |
|||
ID FOR_COL_NAME REF_COL_NAME POS |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS; |
|||
TABLE_ID NAME STATS_INITIALIZED NUM_ROWS CLUST_INDEX_SIZE OTHER_INDEX_SIZE MODIFIED_COUNTER AUTOINC MYSQL_HANDLES_OPENED |
|||
11 SYS_FOREIGN Uninitialized 0 0 0 0 0 0 |
|||
12 SYS_FOREIGN_COLS Uninitialized 0 0 0 0 0 0 |
|||
CREATE TABLE parent (id INT NOT NULL, |
|||
PRIMARY KEY (id)) ENGINE=INNODB; |
|||
CREATE TABLE child (id INT, parent_id INT, |
|||
INDEX par_ind (parent_id), |
|||
CONSTRAINT constraint_test |
|||
FOREIGN KEY (parent_id) REFERENCES parent(id) |
|||
ON DELETE CASCADE) ENGINE=INNODB; |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN; |
|||
ID FOR_NAME REF_NAME N_COLS TYPE |
|||
test/constraint_test test/child test/parent 1 1 |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; |
|||
ID FOR_COL_NAME REF_COL_NAME POS |
|||
test/constraint_test parent_id id 0 |
|||
INSERT INTO parent VALUES(1); |
|||
SELECT name, num_rows, mysql_handles_opened |
|||
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS |
|||
WHERE name LIKE "%parent"; |
|||
name num_rows mysql_handles_opened |
|||
test/parent 1 1 |
|||
SELECT NAME, FLAG, N_COLS, SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES; |
|||
NAME FLAG N_COLS SPACE |
|||
SYS_FOREIGN 0 7 0 |
|||
SYS_FOREIGN_COLS 0 7 0 |
|||
test/child 1 5 0 |
|||
test/parent 1 4 0 |
|||
SELECT name, n_fields |
|||
from INFORMATION_SCHEMA.INNODB_SYS_INDEXES |
|||
WHERE table_id In (SELECT table_id from |
|||
INFORMATION_SCHEMA.INNODB_SYS_TABLES |
|||
WHERE name LIKE "%parent%"); |
|||
name n_fields |
|||
PRIMARY 1 |
|||
SELECT name, n_fields |
|||
from INFORMATION_SCHEMA.INNODB_SYS_INDEXES |
|||
WHERE table_id In (SELECT table_id from |
|||
INFORMATION_SCHEMA.INNODB_SYS_TABLES |
|||
WHERE name LIKE "%child%"); |
|||
name n_fields |
|||
GEN_CLUST_INDEX 0 |
|||
par_ind 1 |
|||
SELECT name, pos, mtype, len |
|||
from INFORMATION_SCHEMA.INNODB_SYS_COLUMNS |
|||
WHERE table_id In (SELECT table_id from |
|||
INFORMATION_SCHEMA.INNODB_SYS_TABLES |
|||
WHERE name LIKE "%child%"); |
|||
name pos mtype len |
|||
id 0 6 4 |
|||
parent_id 1 6 4 |
|||
DROP TABLE child; |
|||
DROP TABLE parent; |
|||
CREATE TABLE parent (id INT NOT NULL, newid INT NOT NULL, |
|||
PRIMARY KEY (id, newid)) ENGINE=INNODB; |
|||
CREATE TABLE child (id INT, parent_id INT, |
|||
INDEX par_ind (parent_id), |
|||
CONSTRAINT constraint_test |
|||
FOREIGN KEY (id, parent_id) REFERENCES parent(id, newid) |
|||
ON DELETE CASCADE) ENGINE=INNODB; |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN; |
|||
ID FOR_NAME REF_NAME N_COLS TYPE |
|||
test/constraint_test test/child test/parent 2 1 |
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; |
|||
ID FOR_COL_NAME REF_COL_NAME POS |
|||
test/constraint_test id id 0 |
|||
test/constraint_test parent_id newid 1 |
|||
INSERT INTO parent VALUES(1, 9); |
|||
SELECT * FROM parent WHERE id IN (SELECT id FROM parent); |
|||
id newid |
|||
1 9 |
|||
SELECT name, num_rows, mysql_handles_opened |
|||
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS |
|||
WHERE name LIKE "%parent"; |
|||
name num_rows mysql_handles_opened |
|||
test/parent 1 2 |
|||
DROP TABLE child; |
|||
DROP TABLE parent; |
@ -0,0 +1,11 @@ |
|||
SET storage_engine=InnoDB; |
|||
INSERT INTO bug38231_2 VALUES (1), (10), (300); |
|||
SET autocommit=0; |
|||
SELECT * FROM bug38231_2 FOR UPDATE; |
|||
a |
|||
1 |
|||
10 |
|||
300 |
|||
TRUNCATE TABLE bug38231_2; |
|||
COMMIT; |
|||
DROP TABLE bug38231_2; |
@ -0,0 +1,8 @@ |
|||
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; |
|||
ALTER TABLE bug44571 CHANGE foo bar INT; |
|||
ALTER TABLE bug44571 ADD INDEX bug44571b (foo); |
|||
ERROR 42000: Key column 'foo' doesn't exist in table |
|||
ALTER TABLE bug44571 ADD INDEX bug44571c (bar); |
|||
DROP INDEX bug44571c ON bug44571; |
|||
CREATE INDEX bug44571c ON bug44571 (bar); |
|||
DROP TABLE bug44571; |
@ -0,0 +1,21 @@ |
|||
CREATE TABLE bug47621 (salesperson INT) ENGINE=InnoDB; |
|||
ALTER TABLE bug47621 CHANGE salesperson sales_acct_id INT; |
|||
create index orgs on bug47621(sales_acct_id); |
|||
ALTER TABLE bug47621 CHANGE sales_acct_id salesperson INT; |
|||
drop table bug47621; |
|||
CREATE TABLE bug47621_sale ( |
|||
salesperson INT, |
|||
PRIMARY KEY(salesperson)) engine = innodb; |
|||
CREATE TABLE bug47621_shirt( |
|||
id SMALLINT, |
|||
owner INT, |
|||
FOREIGN KEY(owner) |
|||
references bug47621_sale(salesperson) ON DELETE RESTRICT) |
|||
engine = innodb; |
|||
insert into bug47621_sale values(9); |
|||
insert into bug47621_shirt values(1, 9); |
|||
ALTER TABLE bug47621_shirt CHANGE id new_id INT; |
|||
drop table bug47621_shirt; |
|||
ALTER TABLE bug47621_sale CHANGE salesperson sales_acct_id INT; |
|||
ALTER TABLE bug47621_sale ADD INDEX idx (sales_acct_id); |
|||
drop table bug47621_sale; |
@ -0,0 +1,23 @@ |
|||
CREATE TABLE bug47622( |
|||
`rule_key` int(11) NOT NULL DEFAULT '0', |
|||
`seq` smallint(6) NOT NULL DEFAULT '0', |
|||
`action` smallint(6) NOT NULL DEFAULT '0', |
|||
`arg_id` smallint(6) DEFAULT NULL, |
|||
`else_ind` TINYINT NOT NULL, |
|||
KEY IDX_A (`arg_id`) |
|||
) ENGINE=InnoDB; |
|||
ALTER TABLE bug47622 ADD UNIQUE IDX_B (rule_key,else_ind,seq,action,arg_id); |
|||
drop index IDX_B on bug47622; |
|||
create index idx on bug47622(seq, arg_id); |
|||
ALTER TABLE bug47622 ADD UNIQUE IDX_X (rule_key,else_ind,seq,action); |
|||
drop table bug47622; |
|||
CREATE TABLE bug47622 ( |
|||
`a` int(11) NOT NULL, |
|||
`b` int(11) DEFAULT NULL, |
|||
`c` char(10) DEFAULT NULL, |
|||
`d` varchar(20) DEFAULT NULL, |
|||
PRIMARY KEY (`a`), |
|||
KEY `b` (`b`) |
|||
) ENGINE=InnoDB; |
|||
alter table bug47622 add unique index (c), add index (d); |
|||
drop table bug47622; |
@ -0,0 +1,10 @@ |
|||
CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB; |
|||
CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB; |
|||
ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/ |
|||
ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b); |
|||
DROP TABLE bug48024,bug48024_b; |
|||
CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB; |
|||
CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB; |
|||
ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/ |
|||
ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b)| |
|||
DROP TABLE bug48024,bug48024_b; |
@ -0,0 +1,42 @@ |
|||
SET tx_isolation = 'READ-COMMITTED'; |
|||
CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b)) |
|||
ENGINE=InnoDB; |
|||
insert into bug49164 values (1,1,1), (2,2,2), (3,3,3); |
|||
begin; |
|||
update bug49164 set c=7; |
|||
select * from bug49164; |
|||
a b c |
|||
1 1 7 |
|||
2 2 7 |
|||
3 3 7 |
|||
rollback; |
|||
select * from bug49164; |
|||
a b c |
|||
1 1 1 |
|||
2 2 2 |
|||
3 3 3 |
|||
begin; |
|||
update bug49164 set c=7; |
|||
SET tx_isolation = 'READ-COMMITTED'; |
|||
begin; |
|||
select * from bug49164; |
|||
a b c |
|||
1 1 1 |
|||
2 2 2 |
|||
3 3 3 |
|||
commit; |
|||
begin; |
|||
update bug49164 set c=6 where a=1 and b=1; |
|||
rollback; |
|||
select * from bug49164; |
|||
a b c |
|||
1 1 1 |
|||
2 2 2 |
|||
3 3 3 |
|||
commit; |
|||
select * from bug49164; |
|||
a b c |
|||
1 1 6 |
|||
2 2 2 |
|||
3 3 3 |
|||
drop table bug49164; |
@ -0,0 +1,66 @@ |
|||
create table bug51378 ( |
|||
col1 int not null, |
|||
col2 blob not null, |
|||
col3 time not null) engine = innodb; |
|||
create unique index idx on bug51378(col1, col2(31)); |
|||
alter table bug51378 add unique index idx2(col1, col2(31)); |
|||
create unique index idx3 on bug51378(col1, col3); |
|||
SHOW CREATE TABLE bug51378; |
|||
Table Create Table |
|||
bug51378 CREATE TABLE `bug51378` ( |
|||
`col1` int(11) NOT NULL, |
|||
`col2` blob NOT NULL, |
|||
`col3` time NOT NULL, |
|||
UNIQUE KEY `idx3` (`col1`,`col3`), |
|||
UNIQUE KEY `idx` (`col1`,`col2`(31)), |
|||
UNIQUE KEY `idx2` (`col1`,`col2`(31)) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|||
drop index idx3 on bug51378; |
|||
SHOW CREATE TABLE bug51378; |
|||
Table Create Table |
|||
bug51378 CREATE TABLE `bug51378` ( |
|||
`col1` int(11) NOT NULL, |
|||
`col2` blob NOT NULL, |
|||
`col3` time NOT NULL, |
|||
UNIQUE KEY `idx` (`col1`,`col2`(31)), |
|||
UNIQUE KEY `idx2` (`col1`,`col2`(31)) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|||
alter table bug51378 add primary key idx3(col1, col2(31)); |
|||
SHOW CREATE TABLE bug51378; |
|||
Table Create Table |
|||
bug51378 CREATE TABLE `bug51378` ( |
|||
`col1` int(11) NOT NULL, |
|||
`col2` blob NOT NULL, |
|||
`col3` time NOT NULL, |
|||
PRIMARY KEY (`col1`,`col2`(31)), |
|||
UNIQUE KEY `idx` (`col1`,`col2`(31)), |
|||
UNIQUE KEY `idx2` (`col1`,`col2`(31)) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|||
drop table bug51378; |
|||
create table bug51378 ( |
|||
col1 int not null, |
|||
col2 blob not null, |
|||
col3 time not null, primary key(col1, col2(31))) engine = innodb; |
|||
create unique index idx on bug51378(col1, col2(31)); |
|||
SHOW CREATE TABLE bug51378; |
|||
Table Create Table |
|||
bug51378 CREATE TABLE `bug51378` ( |
|||
`col1` int(11) NOT NULL, |
|||
`col2` blob NOT NULL, |
|||
`col3` time NOT NULL, |
|||
PRIMARY KEY (`col1`,`col2`(31)), |
|||
UNIQUE KEY `idx` (`col1`,`col2`(31)) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|||
drop table bug51378; |
|||
create table bug51378 ( |
|||
col1 int not null, |
|||
col2 int ) engine = innodb; |
|||
create unique index idx on bug51378(col1, col2); |
|||
SHOW CREATE TABLE bug51378; |
|||
Table Create Table |
|||
bug51378 CREATE TABLE `bug51378` ( |
|||
`col1` int(11) NOT NULL, |
|||
`col2` int(11) DEFAULT NULL, |
|||
UNIQUE KEY `idx` (`col1`,`col2`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|||
drop table bug51378; |
@ -0,0 +1,13 @@ |
|||
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB; |
|||
INSERT INTO bug51920 VALUES (1); |
|||
BEGIN; |
|||
SELECT * FROM bug51920 FOR UPDATE; |
|||
i |
|||
1 |
|||
UPDATE bug51920 SET i=2; |
|||
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST |
|||
WHERE INFO="UPDATE bug51920 SET i=2" |
|||
INTO @thread_id; |
|||
KILL @thread_id; |
|||
Got one of the listed errors |
|||
DROP TABLE bug51920; |
@ -0,0 +1,26 @@ |
|||
set session transaction isolation level read committed; |
|||
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key |
|||
(what, id)) engine=innodb; |
|||
insert into innodb_bug52663 values ('total', 0, 0); |
|||
begin; |
|||
set session transaction isolation level read committed; |
|||
begin; |
|||
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; |
|||
select * from innodb_bug52663; |
|||
what id count |
|||
total 0 1 |
|||
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; |
|||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction |
|||
select * from innodb_bug52663; |
|||
what id count |
|||
total 0 0 |
|||
commit; |
|||
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; |
|||
commit; |
|||
select * from innodb_bug52663; |
|||
what id count |
|||
total 0 2 |
|||
select * from innodb_bug52663; |
|||
what id count |
|||
total 0 2 |
|||
drop table innodb_bug52663; |
@ -0,0 +1,130 @@ |
|||
SET GLOBAL innodb_file_format='Barracuda'; |
|||
SET GLOBAL innodb_file_per_table=on; |
|||
CREATE TABLE bug52745 ( |
|||
a2 int(10) unsigned DEFAULT NULL, |
|||
col37 time DEFAULT NULL, |
|||
col38 char(229) CHARACTER SET utf8 DEFAULT NULL, |
|||
col39 text, |
|||
col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|||
col41 int(10) unsigned DEFAULT NULL, |
|||
col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL, |
|||
col43 smallint(5) unsigned zerofill DEFAULT NULL, |
|||
col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL, |
|||
col45 float unsigned zerofill DEFAULT NULL, |
|||
col46 binary(1) DEFAULT NULL, |
|||
col47 tinyint(4) DEFAULT NULL, |
|||
col48 tinyint(1) DEFAULT NULL, |
|||
col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', |
|||
col50 binary(1) DEFAULT NULL, |
|||
col51 double unsigned zerofill DEFAULT NULL, |
|||
col52 int(10) unsigned DEFAULT NULL, |
|||
col53 time DEFAULT NULL, |
|||
col54 double unsigned DEFAULT NULL, |
|||
col55 time DEFAULT NULL, |
|||
col56 mediumtext CHARACTER SET latin2, |
|||
col57 blob, |
|||
col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000', |
|||
col59 binary(1) DEFAULT NULL, |
|||
col60 longblob, |
|||
col61 time DEFAULT NULL, |
|||
col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci, |
|||
col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', |
|||
col64 int(10) unsigned DEFAULT NULL, |
|||
col65 date DEFAULT NULL, |
|||
col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', |
|||
col67 binary(1) DEFAULT NULL, |
|||
col68 tinyblob, |
|||
col69 date DEFAULT NULL, |
|||
col70 tinyint(3) unsigned zerofill DEFAULT NULL, |
|||
col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL, |
|||
col72 datetime DEFAULT NULL, |
|||
col73 smallint(5) unsigned zerofill DEFAULT NULL, |
|||
col74 longblob, |
|||
col75 bit(34) DEFAULT NULL, |
|||
col76 float unsigned zerofill DEFAULT NULL, |
|||
col77 year(2) DEFAULT NULL, |
|||
col78 tinyint(3) unsigned DEFAULT NULL, |
|||
col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL, |
|||
col80 datetime DEFAULT NULL, |
|||
col81 smallint(6) DEFAULT NULL, |
|||
col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL, |
|||
col83 bigint(20) unsigned zerofill DEFAULT NULL, |
|||
col84 float unsigned zerofill DEFAULT NULL, |
|||
col85 double DEFAULT NULL, |
|||
col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL, |
|||
col87 varbinary(221) DEFAULT NULL, |
|||
col88 double unsigned DEFAULT NULL, |
|||
col89 float unsigned zerofill DEFAULT NULL, |
|||
col90 tinyblob |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; |
|||
Warnings: |
|||
Note 1291 Column 'col82' has duplicated value '' in ENUM |
|||
Note 1291 Column 'col82' has duplicated value '' in ENUM |
|||
INSERT INTO bug52745 SET |
|||
col40='0000-00-00 00:00:00', |
|||
col51=16547, |
|||
col53='7711484', |
|||
col54=-28604, |
|||
col55='7112612', |
|||
col56='wakefulness\'', |
|||
col57=repeat('absorbefacient\'',106), |
|||
col58=11027, |
|||
col59='AM09gW7', |
|||
col60=repeat('Noelani\'',16), |
|||
col61='2520576', |
|||
col62='substitutiv', |
|||
col63='19950106155112', |
|||
col64=-12038, |
|||
col65='86238806', |
|||
col66='19600719080256', |
|||
col68=repeat('Sagittarius\'',54), |
|||
col69='38943902', |
|||
col70=1232, |
|||
col71='Elora\'', |
|||
col74=repeat('zipp',11), |
|||
col75='0', |
|||
col76=23254, |
|||
col78=13247, |
|||
col79='56219', |
|||
col80='20500609035724', |
|||
col81=11632, |
|||
col82=7, |
|||
col84=-23863, |
|||
col85=6341, |
|||
col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W', |
|||
col88=16894, |
|||
col89=6161, |
|||
col90=repeat('gale',48); |
|||
Warnings: |
|||
Warning 1265 Data truncated for column 'col53' at row 1 |
|||
Warning 1264 Out of range value for column 'col54' at row 1 |
|||
Warning 1265 Data truncated for column 'col59' at row 1 |
|||
Warning 1265 Data truncated for column 'col61' at row 1 |
|||
Warning 1264 Out of range value for column 'col64' at row 1 |
|||
Warning 1265 Data truncated for column 'col65' at row 1 |
|||
Warning 1264 Out of range value for column 'col66' at row 1 |
|||
Warning 1265 Data truncated for column 'col68' at row 1 |
|||
Warning 1265 Data truncated for column 'col69' at row 1 |
|||
Warning 1264 Out of range value for column 'col70' at row 1 |
|||
Warning 1264 Out of range value for column 'col78' at row 1 |
|||
Warning 1265 Data truncated for column 'col79' at row 1 |
|||
Warning 1264 Out of range value for column 'col84' at row 1 |
|||
SHOW WARNINGS; |
|||
Level Code Message |
|||
Warning 1265 Data truncated for column 'col53' at row 1 |
|||
Warning 1264 Out of range value for column 'col54' at row 1 |
|||
Warning 1265 Data truncated for column 'col59' at row 1 |
|||
Warning 1265 Data truncated for column 'col61' at row 1 |
|||
Warning 1264 Out of range value for column 'col64' at row 1 |
|||
Warning 1265 Data truncated for column 'col65' at row 1 |
|||
Warning 1264 Out of range value for column 'col66' at row 1 |
|||
Warning 1265 Data truncated for column 'col68' at row 1 |
|||
Warning 1265 Data truncated for column 'col69' at row 1 |
|||
Warning 1264 Out of range value for column 'col70' at row 1 |
|||
Warning 1264 Out of range value for column 'col78' at row 1 |
|||
Warning 1265 Data truncated for column 'col79' at row 1 |
|||
Warning 1264 Out of range value for column 'col84' at row 1 |
|||
DROP TABLE bug52745; |
|||
SET GLOBAL innodb_file_format=Antelope; |
|||
SET GLOBAL innodb_file_format_check=Antelope; |
|||
SET GLOBAL innodb_file_per_table=0; |
@ -0,0 +1,17 @@ |
|||
create table bug53290 (x bigint) engine=innodb; |
|||
insert into bug53290 () values (),(),(),(),(),(),(),(),(),(),(),(); |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
alter table bug53290 add unique index `idx` (x); |
|||
drop table bug53290; |
@ -0,0 +1,16 @@ |
|||
SET GLOBAL innodb_file_format='Barracuda'; |
|||
SET GLOBAL innodb_file_per_table=on; |
|||
set old_alter_table=0; |
|||
CREATE TABLE bug53591(a text charset utf8 not null) |
|||
ENGINE=InnoDB KEY_BLOCK_SIZE=1; |
|||
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); |
|||
ERROR HY000: Too big row |
|||
SHOW WARNINGS; |
|||
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 8126. You have to change some columns to TEXT or BLOBs |
|||
Error 1030 Got error 139 from storage engine |
|||
DROP TABLE bug53591; |
|||
SET GLOBAL innodb_file_format=Antelope; |
|||
SET GLOBAL innodb_file_format_check=Antelope; |
|||
SET GLOBAL innodb_file_per_table=0; |
@ -0,0 +1,76 @@ |
|||
CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb; |
|||
CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb; |
|||
INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12); |
|||
INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); |
|||
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100; |
|||
select * from bug38999_1; |
|||
a b |
|||
101 1 |
|||
102 2 |
|||
103 3 |
|||
104 4 |
|||
105 5 |
|||
106 6 |
|||
107 7 |
|||
108 8 |
|||
109 9 |
|||
110 10 |
|||
111 11 |
|||
112 12 |
|||
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101; |
|||
select * from bug38999_1; |
|||
a b |
|||
201 1 |
|||
102 2 |
|||
103 3 |
|||
104 4 |
|||
105 5 |
|||
106 6 |
|||
107 7 |
|||
108 8 |
|||
109 9 |
|||
110 10 |
|||
111 11 |
|||
112 12 |
|||
update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2; |
|||
select * from bug38999_1; |
|||
a b |
|||
201 1 |
|||
103 3 |
|||
104 4 |
|||
105 5 |
|||
106 6 |
|||
107 7 |
|||
108 8 |
|||
109 9 |
|||
110 10 |
|||
111 11 |
|||
102 12 |
|||
112 12 |
|||
update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100; |
|||
select * from bug38999_1; |
|||
a b |
|||
201 1 |
|||
103 5 |
|||
104 6 |
|||
106 6 |
|||
105 7 |
|||
107 7 |
|||
108 8 |
|||
109 9 |
|||
110 10 |
|||
111 11 |
|||
102 12 |
|||
112 12 |
|||
select * from bug38999_2; |
|||
a b |
|||
1 1 |
|||
2 2 |
|||
6 6 |
|||
7 7 |
|||
8 8 |
|||
9 9 |
|||
3 13 |
|||
4 14 |
|||
5 15 |
|||
drop table bug38999_1,bug38999_2; |
@ -1 +1,12 @@ |
|||
innodb-index : Bug#49396 2009-12-03 test fails in embedded mode |
|||
############################################################################## |
|||
# |
|||
# List the test cases that are to be disabled temporarily. |
|||
# |
|||
# Separate the test case name and the comment with ':'. |
|||
# |
|||
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment> |
|||
# |
|||
# Do not use any TAB characters for whitespace. |
|||
# |
|||
############################################################################## |
|||
innodb_multi_update: Bug #38999 2010-05-05 mmakela Valgrind warnings |
@ -0,0 +1,43 @@ |
|||
-- source include/have_innodb.inc |
|||
# embedded server ignores 'delayed', so skip this |
|||
-- source include/not_embedded.inc |
|||
|
|||
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; |
|||
|
|||
--disable_warnings |
|||
drop table if exists t1; |
|||
--enable_warnings |
|||
|
|||
# |
|||
# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from |
|||
# the index (PRIMARY) |
|||
# This test requires a restart of the server |
|||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; |
|||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; |
|||
INSERT INTO t1 VALUES (null); |
|||
INSERT INTO t1 VALUES (null); |
|||
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; |
|||
SELECT * FROM t1; |
|||
# Restart the server |
|||
-- source include/restart_mysqld.inc |
|||
# The MySQL and InnoDB data dictionaries should now be out of sync. |
|||
# The select should print message to the error log |
|||
SELECT * FROM t1; |
|||
# MySQL have made a change (http://lists.mysql.com/commits/75268) that no |
|||
# longer results in the two data dictionaries being out of sync. If they |
|||
# revert their changes then this check for ER_AUTOINC_READ_FAILED will need |
|||
# to be enabled. Also, see http://bugs.mysql.com/bug.php?id=47621. |
|||
#-- error ER_AUTOINC_READ_FAILED,1467 |
|||
INSERT INTO t1 VALUES(null); |
|||
ALTER TABLE t1 AUTO_INCREMENT = 3; |
|||
SHOW CREATE TABLE t1; |
|||
INSERT INTO t1 VALUES(null); |
|||
SELECT * FROM t1; |
|||
DROP TABLE t1; |
|||
|
|||
# |
|||
# restore environment to the state it was before this test execution |
|||
# |
|||
|
|||
-- disable_query_log |
|||
eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig; |
@ -1,58 +1,58 @@ |
|||
-- source include/not_embedded.inc |
|||
-- source include/have_innodb.inc |
|||
|
|||
--disable_warnings |
|||
drop table if exists t1; |
|||
--enable_warnings |
|||
|
|||
# REPLACE INTO ... SELECT and INSERT INTO ... SELECT should do |
|||
# a consistent read of the source table. |
|||
|
|||
connect (a,localhost,root,,); |
|||
connect (b,localhost,root,,); |
|||
connection a; |
|||
set session transaction isolation level read committed; |
|||
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; |
|||
create table t2 like t1; |
|||
insert into t2 values (1),(2),(3),(4),(5),(6),(7); |
|||
set autocommit=0; |
|||
|
|||
# REPLACE INTO ... SELECT case |
|||
begin; |
|||
# this should not result in any locks on t2. |
|||
replace into t1 select * from t2; |
|||
|
|||
connection b; |
|||
set session transaction isolation level read committed; |
|||
set autocommit=0; |
|||
# should not cuase a lock wait. |
|||
delete from t2 where a=5; |
|||
commit; |
|||
delete from t2; |
|||
commit; |
|||
connection a; |
|||
commit; |
|||
|
|||
# INSERT INTO ... SELECT case |
|||
begin; |
|||
# this should not result in any locks on t2. |
|||
insert into t1 select * from t2; |
|||
|
|||
connection b; |
|||
set session transaction isolation level read committed; |
|||
set autocommit=0; |
|||
# should not cuase a lock wait. |
|||
delete from t2 where a=5; |
|||
commit; |
|||
delete from t2; |
|||
commit; |
|||
connection a; |
|||
commit; |
|||
|
|||
select * from t1; |
|||
drop table t1; |
|||
drop table t2; |
|||
|
|||
connection default; |
|||
disconnect a; |
|||
disconnect b; |
|||
-- source include/not_embedded.inc |
|||
-- source include/have_innodb.inc |
|||
|
|||
--disable_warnings |
|||
drop table if exists t1; |
|||
--enable_warnings |
|||
|
|||
# REPLACE INTO ... SELECT and INSERT INTO ... SELECT should do |
|||
# a consistent read of the source table. |
|||
|
|||
connect (a,localhost,root,,); |
|||
connect (b,localhost,root,,); |
|||
connection a; |
|||
set session transaction isolation level read committed; |
|||
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; |
|||
create table t2 like t1; |
|||
insert into t2 values (1),(2),(3),(4),(5),(6),(7); |
|||
set autocommit=0; |
|||
|
|||
# REPLACE INTO ... SELECT case |
|||
begin; |
|||
# this should not result in any locks on t2. |
|||
replace into t1 select * from t2; |
|||
|
|||
connection b; |
|||
set session transaction isolation level read committed; |
|||
set autocommit=0; |
|||
# should not cause a lock wait. |
|||
delete from t2 where a=5; |
|||
commit; |
|||
delete from t2; |
|||
commit; |
|||
connection a; |
|||
commit; |
|||
|
|||
# INSERT INTO ... SELECT case |
|||
begin; |
|||
# this should not result in any locks on t2. |
|||
insert into t1 select * from t2; |
|||
|
|||
connection b; |
|||
set session transaction isolation level read committed; |
|||
set autocommit=0; |
|||
# should not cause a lock wait. |
|||
delete from t2 where a=5; |
|||
commit; |
|||
delete from t2; |
|||
commit; |
|||
connection a; |
|||
commit; |
|||
|
|||
select * from t1; |
|||
drop table t1; |
|||
drop table t2; |
|||
|
|||
connection default; |
|||
disconnect a; |
|||
disconnect b; |
@ -1 +1 @@ |
|||
--innodb_lock_wait_timeout=2 |
|||
--innodb_lock_wait_timeout=2 |
@ -0,0 +1,94 @@ |
|||
# This is the test for Information Schema System Table View |
|||
# that displays the InnoDB system table content through |
|||
# information schema tables. |
|||
|
|||
--source include/have_innodb.inc |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS; |
|||
|
|||
# Create a foreign key constraint, and verify the information |
|||
# in INFORMATION_SCHEMA.INNODB_SYS_FOREIGN and |
|||
# INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS |
|||
CREATE TABLE parent (id INT NOT NULL, |
|||
PRIMARY KEY (id)) ENGINE=INNODB; |
|||
|
|||
CREATE TABLE child (id INT, parent_id INT, |
|||
INDEX par_ind (parent_id), |
|||
CONSTRAINT constraint_test |
|||
FOREIGN KEY (parent_id) REFERENCES parent(id) |
|||
ON DELETE CASCADE) ENGINE=INNODB; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; |
|||
|
|||
# Insert a row in the table "parent", and see whether that reflected in |
|||
# INNODB_SYS_TABLESTATS |
|||
INSERT INTO parent VALUES(1); |
|||
|
|||
SELECT name, num_rows, mysql_handles_opened |
|||
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS |
|||
WHERE name LIKE "%parent"; |
|||
|
|||
SELECT NAME, FLAG, N_COLS, SPACE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES; |
|||
|
|||
SELECT name, n_fields |
|||
from INFORMATION_SCHEMA.INNODB_SYS_INDEXES |
|||
WHERE table_id In (SELECT table_id from |
|||
INFORMATION_SCHEMA.INNODB_SYS_TABLES |
|||
WHERE name LIKE "%parent%"); |
|||
|
|||
SELECT name, n_fields |
|||
from INFORMATION_SCHEMA.INNODB_SYS_INDEXES |
|||
WHERE table_id In (SELECT table_id from |
|||
INFORMATION_SCHEMA.INNODB_SYS_TABLES |
|||
WHERE name LIKE "%child%"); |
|||
|
|||
SELECT name, pos, mtype, len |
|||
from INFORMATION_SCHEMA.INNODB_SYS_COLUMNS |
|||
WHERE table_id In (SELECT table_id from |
|||
INFORMATION_SCHEMA.INNODB_SYS_TABLES |
|||
WHERE name LIKE "%child%"); |
|||
|
|||
DROP TABLE child; |
|||
|
|||
DROP TABLE parent; |
|||
|
|||
# Create table with 2 columns in the foreign key constraint |
|||
CREATE TABLE parent (id INT NOT NULL, newid INT NOT NULL, |
|||
PRIMARY KEY (id, newid)) ENGINE=INNODB; |
|||
|
|||
CREATE TABLE child (id INT, parent_id INT, |
|||
INDEX par_ind (parent_id), |
|||
CONSTRAINT constraint_test |
|||
FOREIGN KEY (id, parent_id) REFERENCES parent(id, newid) |
|||
ON DELETE CASCADE) ENGINE=INNODB; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN; |
|||
|
|||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS; |
|||
|
|||
INSERT INTO parent VALUES(1, 9); |
|||
|
|||
# Nested query will open the table handle twice |
|||
SELECT * FROM parent WHERE id IN (SELECT id FROM parent); |
|||
|
|||
SELECT name, num_rows, mysql_handles_opened |
|||
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS |
|||
WHERE name LIKE "%parent"; |
|||
|
|||
DROP TABLE child; |
|||
|
|||
DROP TABLE parent; |
@ -1,2 +1 @@ |
|||
--loose-innodb-use-sys-malloc=true |
|||
--loose-innodb-use-sys-malloc=true |
|||
--innodb-use-sys-malloc=true |
@ -0,0 +1,100 @@ |
|||
# |
|||
# Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK |
|||
# http://bugs.mysql.com/38231 |
|||
# |
|||
|
|||
-- source include/have_innodb.inc |
|||
|
|||
# skip this test in embedded mode because "TRUNCATE TABLE bug38231_1" |
|||
# hangs in that mode waiting for "lock_wait_timeout" although it is |
|||
# preceded by --send |
|||
-- source include/not_embedded.inc |
|||
|
|||
SET storage_engine=InnoDB; |
|||
|
|||
# we care only that the following SQL commands do not crash the server |
|||
-- disable_query_log |
|||
-- disable_result_log |
|||
|
|||
DROP TABLE IF EXISTS bug38231_1; |
|||
CREATE TABLE bug38231_1 (a INT); |
|||
|
|||
-- connect (lock_gain,localhost,root,,) |
|||
-- connect (lock_wait1,localhost,root,,) |
|||
-- connect (lock_wait2,localhost,root,,) |
|||
-- connect (truncate_wait,localhost,root,,) |
|||
|
|||
-- connection lock_gain |
|||
SET autocommit=0; |
|||
LOCK TABLE bug38231_1 WRITE; |
|||
|
|||
-- connection lock_wait1 |
|||
SET autocommit=0; |
|||
-- send |
|||
LOCK TABLE bug38231_1 WRITE; |
|||
|
|||
-- connection lock_wait2 |
|||
SET autocommit=0; |
|||
-- send |
|||
LOCK TABLE bug38231_1 WRITE; |
|||
|
|||
-- connection truncate_wait |
|||
-- send |
|||
TRUNCATE TABLE bug38231_1; |
|||
|
|||
-- connection lock_gain |
|||
# this crashes the server if the bug is present |
|||
UNLOCK TABLES; |
|||
|
|||
# clean up |
|||
|
|||
# do not clean up - we do not know which of the three has been released |
|||
# so the --reap command may hang because the command that is being executed |
|||
# in that connection is still running/waiting |
|||
#-- connection lock_wait1 |
|||
#-- reap |
|||
#UNLOCK TABLES; |
|||
# |
|||
#-- connection lock_wait2 |
|||
#-- reap |
|||
#UNLOCK TABLES; |
|||
# |
|||
#-- connection truncate_wait |
|||
#-- reap |
|||
|
|||
-- connection default |
|||
|
|||
-- disconnect lock_gain |
|||
-- disconnect lock_wait1 |
|||
-- disconnect lock_wait2 |
|||
-- disconnect truncate_wait |
|||
|
|||
DROP TABLE bug38231_1; |
|||
|
|||
# test that TRUNCATE works with row-level locks |
|||
|
|||
DROP TABLE IF EXISTS bug38231_2; |
|||
CREATE TABLE bug38231_2 (a INT); |
|||
|
|||
-- enable_query_log |
|||
-- enable_result_log |
|||
|
|||
INSERT INTO bug38231_2 VALUES (1), (10), (300); |
|||
|
|||
-- connect (con4,localhost,root,,) |
|||
|
|||
-- connection con4 |
|||
SET autocommit=0; |
|||
SELECT * FROM bug38231_2 FOR UPDATE; |
|||
|
|||
-- connection default |
|||
TRUNCATE TABLE bug38231_2; |
|||
|
|||
-- connection con4 |
|||
COMMIT; |
|||
|
|||
-- connection default |
|||
|
|||
-- disconnect con4 |
|||
|
|||
DROP TABLE bug38231_2; |
@ -0,0 +1,51 @@ |
|||
# |
|||
# Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch |
|||
# http://bugs.mysql.com/39438 |
|||
# |
|||
# This test must be run with innodb_file_per_table=1 because the crash |
|||
# only occurs if that option is turned on and DISCARD TABLESPACE only |
|||
# works with innodb_file_per_table. |
|||
# |
|||
|
|||
-- source include/have_innodb.inc |
|||
|
|||
SET storage_engine=InnoDB; |
|||
|
|||
# we care only that the following SQL commands do not crash the server |
|||
-- disable_query_log |
|||
-- disable_result_log |
|||
|
|||
DROP TABLE IF EXISTS bug39438; |
|||
|
|||
CREATE TABLE bug39438 (id INT) ENGINE=INNODB; |
|||
|
|||
# remove: XXX Uncomment the following ALTER and remove those lines after |
|||
# remove: applying the patch. |
|||
# remove: Obviously this test is useless without this ALTER command, |
|||
# remove: but it causes warnings to be printed by mysqld and the whole |
|||
# remove: mysql-test suite fails at the end (returns non-zero). Please |
|||
# remove: apply this patch to the mysql source tree, remove those lines |
|||
# remove: and uncomment the following ALTER. We do not care about the |
|||
# remove: warnings, this test is to ensure mysqld does not crash. |
|||
# remove: === modified file 'mysql-test/lib/mtr_report.pl' |
|||
# remove: --- mysql-test/lib/mtr_report.pl 2008-08-12 10:26:23 +0000 |
|||
# remove: +++ mysql-test/lib/mtr_report.pl 2008-10-01 11:57:41 +0000 |
|||
# remove: @@ -412,7 +412,10 @@ |
|||
# remove: |
|||
# remove: # When trying to set lower_case_table_names = 2 |
|||
# remove: # on a case sensitive file system. Bug#37402. |
|||
# remove: - /lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive. Now setting lower_case_table_names to 0 to avoid future problems./ |
|||
# remove: + /lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive. Now setting lower_case_table_names to 0 to avoid future problems./ or |
|||
# remove: + |
|||
# remove: + # this test is expected to print warnings |
|||
# remove: + ($testname eq 'main.innodb_bug39438') |
|||
# remove: ) |
|||
# remove: { |
|||
# remove: next; # Skip these lines |
|||
# remove: |
|||
#ALTER TABLE bug39438 DISCARD TABLESPACE; |
|||
|
|||
# this crashes the server if the bug is present |
|||
SHOW TABLE STATUS; |
|||
|
|||
DROP TABLE bug39438; |
@ -0,0 +1,22 @@ |
|||
# |
|||
# Bug#44571 InnoDB Plugin crashes on ADD INDEX |
|||
# http://bugs.mysql.com/44571 |
|||
# Please also refer to related fix in |
|||
# http://bugs.mysql.com/47621 |
|||
# |
|||
-- source include/have_innodb.inc |
|||
|
|||
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; |
|||
ALTER TABLE bug44571 CHANGE foo bar INT; |
|||
# Create index with the old column name will fail, |
|||
# because the CHANGE foo bar is successful. And |
|||
# the column name change would communicate to |
|||
# InnoDB with the fix from bug #47621 |
|||
-- error ER_KEY_COLUMN_DOES_NOT_EXITS |
|||
ALTER TABLE bug44571 ADD INDEX bug44571b (foo); |
|||
# The following create indexes should succeed, |
|||
# indirectly confirm the CHANGE foo bar is successful. |
|||
ALTER TABLE bug44571 ADD INDEX bug44571c (bar); |
|||
DROP INDEX bug44571c ON bug44571; |
|||
CREATE INDEX bug44571c ON bug44571 (bar); |
|||
DROP TABLE bug44571; |
@ -0,0 +1,57 @@ |
|||
# This is the test for bug #47621, column rename operation should |
|||
# not result in column definition inconsistency between MySQL and |
|||
# InnoDB |
|||
|
|||
--source include/have_innodb.inc |
|||
|
|||
CREATE TABLE bug47621 (salesperson INT) ENGINE=InnoDB; |
|||
|
|||
# Change the column name |
|||
ALTER TABLE bug47621 CHANGE salesperson sales_acct_id INT; |
|||
|
|||
# If there is inconsistency of column name definition |
|||
# in MySQL or InnoDB, following create index would fail |
|||
create index orgs on bug47621(sales_acct_id); |
|||
|
|||
# Change the column name back with the index defined on it. |
|||
ALTER TABLE bug47621 CHANGE sales_acct_id salesperson INT; |
|||
|
|||
drop table bug47621; |
|||
|
|||
CREATE TABLE bug47621_sale ( |
|||
salesperson INT, |
|||
PRIMARY KEY(salesperson)) engine = innodb; |
|||
|
|||
CREATE TABLE bug47621_shirt( |
|||
id SMALLINT, |
|||
owner INT, |
|||
FOREIGN KEY(owner) |
|||
references bug47621_sale(salesperson) ON DELETE RESTRICT) |
|||
engine = innodb; |
|||
|
|||
insert into bug47621_sale values(9); |
|||
|
|||
insert into bug47621_shirt values(1, 9); |
|||
|
|||
# Any rename operation on columns involved in a reference constraint will |
|||
# fail, as it will be rejected by InnoDB row_rename_table_for_mysql(). |
|||
# In above example, any rename on column "salesperson" for table |
|||
# "bug47621_sale", or on column "owner" for table "bug47621_shirt will |
|||
# be blocked. We do not put such rename in the test since InnoDB error |
|||
# message will be printed in the error log, and result in test failure. |
|||
# |
|||
# ALTER TABLE bug47621_sale CHANGE salesperson sales_acct_id INT; |
|||
|
|||
# Any rename on columns not involved in the foreign key constraint |
|||
# could still proceed |
|||
ALTER TABLE bug47621_shirt CHANGE id new_id INT; |
|||
|
|||
# Referencing table dropped, the rename operation on related columns |
|||
# could proceed |
|||
drop table bug47621_shirt; |
|||
|
|||
ALTER TABLE bug47621_sale CHANGE salesperson sales_acct_id INT; |
|||
|
|||
ALTER TABLE bug47621_sale ADD INDEX idx (sales_acct_id); |
|||
|
|||
drop table bug47621_sale; |
@ -0,0 +1,55 @@ |
|||
# This is the test for bug 47622. There could be index |
|||
# metadata sequence mismatch between MySQL and Innodb |
|||
# after creating index through FIC interfaces. |
|||
# We resolve the problem by sync the index sequence |
|||
# up when opening the table. |
|||
|
|||
--source include/have_innodb.inc |
|||
|
|||
connect (a,localhost,root,,); |
|||
connect (b,localhost,root,,); |
|||
|
|||
# Create a table with a non-unique index |
|||
CREATE TABLE bug47622( |
|||
`rule_key` int(11) NOT NULL DEFAULT '0', |
|||
`seq` smallint(6) NOT NULL DEFAULT '0', |
|||
`action` smallint(6) NOT NULL DEFAULT '0', |
|||
`arg_id` smallint(6) DEFAULT NULL, |
|||
`else_ind` TINYINT NOT NULL, |
|||
KEY IDX_A (`arg_id`) |
|||
) ENGINE=InnoDB; |
|||
|
|||
connection a; |
|||
|
|||
# A subsequent creating unique index should not trigger |
|||
# any error message. Unique index would be ranked ahead |
|||
# of regular index. |
|||
ALTER TABLE bug47622 ADD UNIQUE IDX_B (rule_key,else_ind,seq,action,arg_id); |
|||
|
|||
drop index IDX_B on bug47622; |
|||
|
|||
# In another connection, create additional set of normal |
|||
# index and unique index. Again, unique index would be ranked |
|||
# ahead of regular index. |
|||
connection b; |
|||
create index idx on bug47622(seq, arg_id); |
|||
|
|||
ALTER TABLE bug47622 ADD UNIQUE IDX_X (rule_key,else_ind,seq,action); |
|||
|
|||
drop table bug47622; |
|||
|
|||
# Create a table with one Primary key and a non-unique key |
|||
CREATE TABLE bug47622 ( |
|||
`a` int(11) NOT NULL, |
|||
`b` int(11) DEFAULT NULL, |
|||
`c` char(10) DEFAULT NULL, |
|||
`d` varchar(20) DEFAULT NULL, |
|||
PRIMARY KEY (`a`), |
|||
KEY `b` (`b`) |
|||
) ENGINE=InnoDB; |
|||
|
|||
# Add two index with one unique and one non-unique. |
|||
# Index sequence is "PRIMARY", "c", "b" and "d" |
|||
alter table bug47622 add unique index (c), add index (d); |
|||
|
|||
drop table bug47622; |
@ -0,0 +1,22 @@ |
|||
# Bug #48024 Innodb doesn't work with multi-statements |
|||
|
|||
--source include/have_innodb.inc |
|||
|
|||
CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB; |
|||
CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB; |
|||
# Bug #53644 InnoDB thinks that /*/ starts and ends a comment |
|||
ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/ |
|||
ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b); |
|||
|
|||
DROP TABLE bug48024,bug48024_b; |
|||
|
|||
# Work around Bug #53750 (failure in mysql-test-run --ps-protocol) |
|||
-- disable_ps_protocol |
|||
delimiter |; |
|||
CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB; |
|||
CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB; |
|||
ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/ |
|||
ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b)| |
|||
delimiter ;| |
|||
|
|||
DROP TABLE bug48024,bug48024_b; |
@ -0,0 +1,47 @@ |
|||
-- source include/have_innodb.inc |
|||
|
|||
# Bug #49164 READ-COMMITTED reports "matched: 0" on compound PK |
|||
# a duplicate of |
|||
# Bug #52663 Lost update incrementing column value under READ COMMITTED |
|||
|
|||
connect (con1,localhost,root,,); |
|||
connect (con2,localhost,root,,); |
|||
|
|||
connection con1; |
|||
SET tx_isolation = 'READ-COMMITTED'; |
|||
|
|||
CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b)) |
|||
ENGINE=InnoDB; |
|||
|
|||
insert into bug49164 values (1,1,1), (2,2,2), (3,3,3); |
|||
|
|||
begin; |
|||
update bug49164 set c=7; |
|||
select * from bug49164; |
|||
rollback; |
|||
select * from bug49164; |
|||
begin; |
|||
update bug49164 set c=7; |
|||
|
|||
connection con2; |
|||
|
|||
SET tx_isolation = 'READ-COMMITTED'; |
|||
begin; |
|||
select * from bug49164; |
|||
commit; |
|||
begin; |
|||
--send |
|||
update bug49164 set c=6 where a=1 and b=1; |
|||
|
|||
connection con1; |
|||
rollback; |
|||
select * from bug49164; |
|||
connection con2; |
|||
reap; |
|||
commit; |
|||
connection con1; |
|||
select * from bug49164; |
|||
connection default; |
|||
disconnect con1; |
|||
disconnect con2; |
|||
drop table bug49164; |
@ -0,0 +1,77 @@ |
|||
# This is the test for bug 51378. Unique index created |
|||
# through "create index" and "alter table add unique index" |
|||
# interfaces should not be treated as primary index if indexed |
|||
# columns contain one or more column prefix(es) (only prefix/part of |
|||
# the column is indexed) |
|||
# On the other hand, if there is a unique index covers all |
|||
# columns of a table, and they are non-null columns, and |
|||
# full length of the column are indexed, then this index |
|||
# will be created as primary index |
|||
# Following queries test various scenario, no mismatch |
|||
# error message should be printed. |
|||
--source include/have_innodb.inc |
|||
|
|||
# Create a table contains a BLOB column |
|||
create table bug51378 ( |
|||
col1 int not null, |
|||
col2 blob not null, |
|||
col3 time not null) engine = innodb; |
|||
|
|||
# Create following unique indexes on 'col1' and 'col2(31)' |
|||
# of the table, the index should not be treated as primary |
|||
# key because it indexes only first 31 bytes of col2. |
|||
# Thus it contains "column prefix", and will not be |
|||
# upgraded to primary index. |
|||
# There should not be mismatch message printed in the |
|||
# errorlog |
|||
create unique index idx on bug51378(col1, col2(31)); |
|||
|
|||
alter table bug51378 add unique index idx2(col1, col2(31)); |
|||
|
|||
# Unique index on 'col1' and 'col3' will be created as primary index, |
|||
# since the index does not contain column prefix |
|||
create unique index idx3 on bug51378(col1, col3); |
|||
|
|||
# Show create table would show idx3 created as unique index, internally, |
|||
# idx3 is treated as primary index both by MySQL and Innodb |
|||
SHOW CREATE TABLE bug51378; |
|||
|
|||
# "GEN_CLUST_INDEX" will be re-created as default primary index |
|||
# after idx3 is dropped |
|||
drop index idx3 on bug51378; |
|||
|
|||
SHOW CREATE TABLE bug51378; |
|||
|
|||
# Or we can add the primary key through alter table interfaces |
|||
alter table bug51378 add primary key idx3(col1, col2(31)); |
|||
|
|||
SHOW CREATE TABLE bug51378; |
|||
|
|||
drop table bug51378; |
|||
|
|||
# Or we can create such primary key through create table interfaces |
|||
create table bug51378 ( |
|||
col1 int not null, |
|||
col2 blob not null, |
|||
col3 time not null, primary key(col1, col2(31))) engine = innodb; |
|||
|
|||
# Unique index on one or more column prefix(es) will be created |
|||
# as non-cluster index |
|||
create unique index idx on bug51378(col1, col2(31)); |
|||
|
|||
SHOW CREATE TABLE bug51378; |
|||
|
|||
drop table bug51378; |
|||
|
|||
# If a table has a NULLABLE column, unique index on it will not |
|||
# be treated as primary index. |
|||
create table bug51378 ( |
|||
col1 int not null, |
|||
col2 int ) engine = innodb; |
|||
|
|||
# This will be created as non-cluster index since col2 is nullable |
|||
create unique index idx on bug51378(col1, col2); |
|||
|
|||
SHOW CREATE TABLE bug51378; |
|||
|
|||
drop table bug51378; |
@ -0,0 +1,43 @@ |
|||
# |
|||
# Bug #51920: InnoDB connections in lock wait ignore KILL until timeout |
|||
# |
|||
-- source include/not_embedded.inc |
|||
-- source include/have_innodb.inc |
|||
|
|||
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB; |
|||
INSERT INTO bug51920 VALUES (1); |
|||
|
|||
BEGIN; |
|||
SELECT * FROM bug51920 FOR UPDATE; |
|||
|
|||
connect (con1,localhost,root,,); |
|||
|
|||
connection con1; |
|||
--send |
|||
UPDATE bug51920 SET i=2; |
|||
|
|||
connection default; |
|||
let $wait_condition = |
|||
SELECT COUNT(*)=1 FROM information_schema.processlist |
|||
WHERE INFO="UPDATE bug51920 SET i=2"; |
|||
-- source include/wait_condition.inc |
|||
|
|||
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST |
|||
WHERE INFO="UPDATE bug51920 SET i=2" |
|||
INTO @thread_id; |
|||
|
|||
KILL @thread_id; |
|||
let $wait_condition = |
|||
SELECT COUNT(*)=0 FROM information_schema.processlist WHERE ID=@thread_id; |
|||
-- source include/wait_condition.inc |
|||
|
|||
# |
|||
# Bug#19723: kill of active connection yields different error code |
|||
# depending on platform. |
|||
# |
|||
connection con1; |
|||
-- error 1317, 2006, 2013 |
|||
reap; |
|||
connection default; |
|||
DROP TABLE bug51920; |
|||
-- disconnect con1 |
@ -0,0 +1,34 @@ |
|||
--source include/have_innodb.inc |
|||
|
|||
set session transaction isolation level read committed; |
|||
|
|||
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key |
|||
(what, id)) engine=innodb; |
|||
insert into innodb_bug52663 values ('total', 0, 0); |
|||
begin; |
|||
|
|||
connect (addconroot, localhost, root,,); |
|||
connection addconroot; |
|||
set session transaction isolation level read committed; |
|||
begin; |
|||
|
|||
connection default; |
|||
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; |
|||
select * from innodb_bug52663; |
|||
|
|||
connection addconroot; |
|||
--error ER_LOCK_WAIT_TIMEOUT |
|||
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; |
|||
select * from innodb_bug52663; |
|||
|
|||
connection default; |
|||
commit; |
|||
|
|||
connection addconroot; |
|||
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0; |
|||
commit; |
|||
select * from innodb_bug52663; |
|||
|
|||
connection default; |
|||
select * from innodb_bug52663; |
|||
drop table innodb_bug52663; |
@ -0,0 +1,109 @@ |
|||
-- source include/have_innodb.inc |
|||
|
|||
let $file_format=`select @@innodb_file_format`; |
|||
let $file_format_check=`select @@innodb_file_format_check`; |
|||
let $file_per_table=`select @@innodb_file_per_table`; |
|||
SET GLOBAL innodb_file_format='Barracuda'; |
|||
SET GLOBAL innodb_file_per_table=on; |
|||
|
|||
CREATE TABLE bug52745 ( |
|||
a2 int(10) unsigned DEFAULT NULL, |
|||
col37 time DEFAULT NULL, |
|||
col38 char(229) CHARACTER SET utf8 DEFAULT NULL, |
|||
col39 text, |
|||
col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|||
col41 int(10) unsigned DEFAULT NULL, |
|||
col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL, |
|||
col43 smallint(5) unsigned zerofill DEFAULT NULL, |
|||
col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL, |
|||
col45 float unsigned zerofill DEFAULT NULL, |
|||
col46 binary(1) DEFAULT NULL, |
|||
col47 tinyint(4) DEFAULT NULL, |
|||
col48 tinyint(1) DEFAULT NULL, |
|||
col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', |
|||
col50 binary(1) DEFAULT NULL, |
|||
col51 double unsigned zerofill DEFAULT NULL, |
|||
col52 int(10) unsigned DEFAULT NULL, |
|||
col53 time DEFAULT NULL, |
|||
col54 double unsigned DEFAULT NULL, |
|||
col55 time DEFAULT NULL, |
|||
col56 mediumtext CHARACTER SET latin2, |
|||
col57 blob, |
|||
col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000', |
|||
col59 binary(1) DEFAULT NULL, |
|||
col60 longblob, |
|||
col61 time DEFAULT NULL, |
|||
col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci, |
|||
col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', |
|||
col64 int(10) unsigned DEFAULT NULL, |
|||
col65 date DEFAULT NULL, |
|||
col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', |
|||
col67 binary(1) DEFAULT NULL, |
|||
col68 tinyblob, |
|||
col69 date DEFAULT NULL, |
|||
col70 tinyint(3) unsigned zerofill DEFAULT NULL, |
|||
col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL, |
|||
col72 datetime DEFAULT NULL, |
|||
col73 smallint(5) unsigned zerofill DEFAULT NULL, |
|||
col74 longblob, |
|||
col75 bit(34) DEFAULT NULL, |
|||
col76 float unsigned zerofill DEFAULT NULL, |
|||
col77 year(2) DEFAULT NULL, |
|||
col78 tinyint(3) unsigned DEFAULT NULL, |
|||
col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL, |
|||
col80 datetime DEFAULT NULL, |
|||
col81 smallint(6) DEFAULT NULL, |
|||
col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL, |
|||
col83 bigint(20) unsigned zerofill DEFAULT NULL, |
|||
col84 float unsigned zerofill DEFAULT NULL, |
|||
col85 double DEFAULT NULL, |
|||
col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL, |
|||
col87 varbinary(221) DEFAULT NULL, |
|||
col88 double unsigned DEFAULT NULL, |
|||
col89 float unsigned zerofill DEFAULT NULL, |
|||
col90 tinyblob |
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; |
|||
|
|||
INSERT INTO bug52745 SET |
|||
col40='0000-00-00 00:00:00', |
|||
col51=16547, |
|||
col53='7711484', |
|||
col54=-28604, |
|||
col55='7112612', |
|||
col56='wakefulness\'', |
|||
col57=repeat('absorbefacient\'',106), |
|||
col58=11027, |
|||
col59='AM09gW7', |
|||
col60=repeat('Noelani\'',16), |
|||
col61='2520576', |
|||
col62='substitutiv', |
|||
col63='19950106155112', |
|||
col64=-12038, |
|||
col65='86238806', |
|||
col66='19600719080256', |
|||
col68=repeat('Sagittarius\'',54), |
|||
col69='38943902', |
|||
col70=1232, |
|||
col71='Elora\'', |
|||
col74=repeat('zipp',11), |
|||
col75='0', |
|||
col76=23254, |
|||
col78=13247, |
|||
col79='56219', |
|||
col80='20500609035724', |
|||
col81=11632, |
|||
col82=7, |
|||
col84=-23863, |
|||
col85=6341, |
|||
col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W', |
|||
col88=16894, |
|||
col89=6161, |
|||
col90=repeat('gale',48); |
|||
|
|||
SHOW WARNINGS; |
|||
|
|||
DROP TABLE bug52745; |
|||
|
|||
EVAL SET GLOBAL innodb_file_format=$file_format; |
|||
EVAL SET GLOBAL innodb_file_format_check=$file_format_check; |
|||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table; |
@ -0,0 +1,22 @@ |
|||
-- source include/have_innodb.inc |
|||
|
|||
create table bug53290 (x bigint) engine=innodb; |
|||
|
|||
insert into bug53290 () values (),(),(),(),(),(),(),(),(),(),(),(); |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
insert into bug53290 select * from bug53290; |
|||
|
|||
alter table bug53290 add unique index `idx` (x); |
|||
|
|||
drop table bug53290; |
@ -0,0 +1,22 @@ |
|||
-- source include/have_innodb.inc |
|||
|
|||
let $file_format=`select @@innodb_file_format`; |
|||
let $file_format_check=`select @@innodb_file_format_check`; |
|||
let $file_per_table=`select @@innodb_file_per_table`; |
|||
|
|||
SET GLOBAL innodb_file_format='Barracuda'; |
|||
SET GLOBAL innodb_file_per_table=on; |
|||
|
|||
set old_alter_table=0; |
|||
|
|||
CREATE TABLE bug53591(a text charset utf8 not null) |
|||
ENGINE=InnoDB KEY_BLOCK_SIZE=1; |
|||
-- error 139 |
|||
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); |
|||
SHOW WARNINGS; |
|||
|
|||
DROP TABLE bug53591; |
|||
|
|||
EVAL SET GLOBAL innodb_file_format=$file_format; |
|||
EVAL SET GLOBAL innodb_file_format_check=$file_format_check; |
|||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table; |
@ -0,0 +1,29 @@ |
|||
-- source include/have_innodb.inc |
|||
|
|||
# |
|||
# Test multi update with different join methods |
|||
# |
|||
|
|||
CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb; |
|||
CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb; |
|||
INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12); |
|||
INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9); |
|||
|
|||
# Full join, without key |
|||
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100; |
|||
select * from bug38999_1; |
|||
|
|||
# unique key |
|||
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101; |
|||
select * from bug38999_1; |
|||
|
|||
# ref key |
|||
update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2; |
|||
select * from bug38999_1; |
|||
|
|||
# Range key (in bug38999_1) |
|||
update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100; |
|||
select * from bug38999_1; |
|||
select * from bug38999_2; |
|||
|
|||
drop table bug38999_1,bug38999_2; |
@ -0,0 +1,53 @@ |
|||
'#---------------------BS_STVARS_035_01----------------------#' |
|||
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances); |
|||
COUNT(@@GLOBAL.innodb_buffer_pool_instances) |
|||
1 |
|||
1 Expected |
|||
'#---------------------BS_STVARS_035_02----------------------#' |
|||
SET @@GLOBAL.innodb_buffer_pool_instances=1; |
|||
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a read only variable |
|||
Expected error 'Read only variable' |
|||
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances); |
|||
COUNT(@@GLOBAL.innodb_buffer_pool_instances) |
|||
1 |
|||
1 Expected |
|||
'#---------------------BS_STVARS_035_03----------------------#' |
|||
SELECT @@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE |
|||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES |
|||
WHERE VARIABLE_NAME='innodb_buffer_pool_instances'; |
|||
@@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE |
|||
1 |
|||
1 Expected |
|||
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances); |
|||
COUNT(@@GLOBAL.innodb_buffer_pool_instances) |
|||
1 |
|||
1 Expected |
|||
SELECT COUNT(VARIABLE_VALUE) |
|||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES |
|||
WHERE VARIABLE_NAME='innodb_buffer_pool_instances'; |
|||
COUNT(VARIABLE_VALUE) |
|||
1 |
|||
1 Expected |
|||
'#---------------------BS_STVARS_035_04----------------------#' |
|||
SELECT @@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances; |
|||
@@innodb_buffer_pool_instances = @@GLOBAL.innodb_buffer_pool_instances |
|||
1 |
|||
1 Expected |
|||
'#---------------------BS_STVARS_035_05----------------------#' |
|||
SELECT COUNT(@@innodb_buffer_pool_instances); |
|||
COUNT(@@innodb_buffer_pool_instances) |
|||
1 |
|||
1 Expected |
|||
SELECT COUNT(@@local.innodb_buffer_pool_instances); |
|||
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a GLOBAL variable |
|||
Expected error 'Variable is a GLOBAL variable' |
|||
SELECT COUNT(@@SESSION.innodb_buffer_pool_instances); |
|||
ERROR HY000: Variable 'innodb_buffer_pool_instances' is a GLOBAL variable |
|||
Expected error 'Variable is a GLOBAL variable' |
|||
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances); |
|||
COUNT(@@GLOBAL.innodb_buffer_pool_instances) |
|||
1 |
|||
1 Expected |
|||
SELECT innodb_buffer_pool_instances = @@SESSION.innodb_buffer_pool_instances; |
|||
ERROR 42S22: Unknown column 'innodb_buffer_pool_instances' in 'field list' |
|||
Expected error 'Readonly variable' |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue