Commit 158a2661 authored by Alice Sherepa's avatar Alice Sherepa

innodb suite <innodb-alter

parent e65c93a5
......@@ -27,4 +27,4 @@ set debug_dbug="+d,disk_is_full";
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
ERROR HY000: The table 't1' is full
set debug_dbug="-d,disk_is_full";
DROP TABLE t1;
\ No newline at end of file
DROP TABLE t1;
......@@ -10,7 +10,7 @@ ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint
create table t2 (f1 int primary key,
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Can't create table `test`.`#sql-2565_3` (errno: 121 "Duplicate key on write or update")
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
set foreign_key_checks = 0;
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Duplicate foreign key constraint name 'test/c1'
......
......@@ -56,8 +56,8 @@ restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
SHOW INDEXES FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
t1 1 idx1 1 col_1 A 2 NULL NULL YES BTREE
t1 1 idx2 1 col_2 A 2 NULL NULL YES BTREE
t1 1 idx1 1 col_1 A 1 NULL NULL YES BTREE
t1 1 idx2 1 col_2 A 1 NULL NULL YES BTREE
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
......
......@@ -13,11 +13,12 @@ constraint c1 foreign key (f1) references t1(f1)) engine=InnoDB;
create table t2 (f1 int primary key,
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*'/#sql-temporary'/
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
set foreign_key_checks = 0;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_FK_DUP_NAME
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
......
......@@ -30,7 +30,7 @@ SHOW INDEXES FROM t1;
FLUSH TABLES t1 FOR EXPORT;
perl;
do 'include/innodb-util.inc';
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_backup_tablespaces("test", "t1");
EOF
......@@ -58,7 +58,7 @@ SHOW INDEXES FROM t1;
ALTER TABLE t1 DISCARD TABLESPACE;
perl;
do 'include/innodb-util.inc';
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
ib_discard_tablespaces("test", "t1");
ib_restore_tablespaces("test", "t1");
EOF
......
--default-storage-engine=MyISAM
--innodb-strict-mode=0
--innodb-file-per-table=0
......@@ -674,7 +674,6 @@ SELECT * FROM t1;
ALTER TABLE t1 ENGINE = InnoDB;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
--error ER_AUTOINC_READ_FAILED
REPLACE INTO t1 (c2 ) VALUES (0);
SELECT * FROM t1;
DROP TABLE t1;
......@@ -683,7 +682,7 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
AUTO_INCREMENT=10000000000000000000;
SHOW CREATE TABLE t1;
--error 1467
#--error 1467
INSERT INTO t1 VALUES ();
DROP TABLE t1;
......
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