mirror of
https://github.com/MariaDB/server.git
synced 2025-12-06 05:42:06 +03:00
Merge 10.2 into 10.3
This commit is contained in:
@@ -6,7 +6,7 @@ create table t2(a int, b int, key(a),key(b))engine=innodb;
|
||||
alter table t2 add constraint b foreign key (b) references t1(a);
|
||||
alter table t1 add constraint b1 foreign key (b) references t2(a);
|
||||
alter table t2 add constraint b1 foreign key (b) references t1(a);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
|
||||
alter table t2 drop foreign key b;
|
||||
alter table t1 drop foreign key b1;
|
||||
drop table t2;
|
||||
|
||||
@@ -21,6 +21,6 @@ Tables_in_bug
|
||||
parent
|
||||
alter table parent row_format=dynamic;
|
||||
Warnings:
|
||||
Warning 1088 InnoDB: Could not add foreign key constraints.
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
drop table parent;
|
||||
drop database bug;
|
||||
|
||||
@@ -457,3 +457,12 @@ t1 CREATE TABLE `t1` (
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE get_index_id;
|
||||
DROP PROCEDURE get_table_id;
|
||||
create table t (a varchar(100)) engine=innodb;
|
||||
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
|
||||
name pos mtype prtype len
|
||||
a 0 1 524303 100
|
||||
alter table t modify a varchar(110), algorithm=inplace;
|
||||
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
|
||||
name pos mtype prtype len
|
||||
a 0 1 524303 110
|
||||
drop table t;
|
||||
|
||||
@@ -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-temporary` (errno: 121 "Duplicate key on write or update")
|
||||
ERROR HY000: Can't create table `test`.`t2` (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'
|
||||
@@ -206,6 +206,61 @@ connection default;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
disconnect fk;
|
||||
DROP TABLE t3,t1;
|
||||
#
|
||||
# MDEV-18222 InnoDB: Failing assertion: heap->magic_n == MEM_BLOCK_MAGIC_N
|
||||
# or ASAN heap-use-after-free in dict_foreign_remove_from_cache upon CHANGE COLUMN
|
||||
#
|
||||
CREATE TABLE t1 (a INT, UNIQUE(a), KEY(a)) ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (a);
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
ALTER TABLE t1 CHANGE COLUMN a a TIME NOT NULL;
|
||||
ALTER TABLE t1 ADD pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY;
|
||||
ALTER TABLE t1 CHANGE COLUMN a b TIME;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-18256 InnoDB: Failing assertion: heap->magic_n == MEM_BLOCK_MAGIC_N
|
||||
# upon DROP FOREIGN KEY
|
||||
#
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (b INT PRIMARY KEY, FOREIGN KEY fk1 (b) REFERENCES t1 (a))
|
||||
ENGINE=InnoDB;
|
||||
ALTER TABLE t2 DROP FOREIGN KEY fk1, DROP FOREIGN KEY fk1;
|
||||
DROP TABLE t2, t1;
|
||||
CREATE TABLE t1 (f VARCHAR(256)) ENGINE=InnoDB;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
|
||||
Warnings:
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||
Warnings:
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
|
||||
ENGINE=InnoDB;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
|
||||
Warnings:
|
||||
Warning 1088 failed to load FOREIGN KEY constraints
|
||||
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-18630 Conditional jump or move depends on uninitialised value
|
||||
# in ib_push_warning / dict_create_foreign_constraints_low
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
ALTER IGNORE TABLE t1 ADD FOREIGN KEY (a) REFERENCES t2 (b);
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 150 Alter table test/#sql-temporary with foreign key constraint failed. Referenced table `test`.`t2` not found in the data dictionary near 'FOREIGN KEY (a) REFERENCES t2 (b)'.
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||
DROP TABLE t1;
|
||||
# Start of 10.2 tests
|
||||
#
|
||||
# MDEV-13246 Stale rows despite ON DELETE CASCADE constraint
|
||||
|
||||
@@ -39,21 +39,21 @@ Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is
|
||||
Warning 1215 Cannot add foreign key constraint for `t2`
|
||||
create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb;
|
||||
alter table t2 add constraint b foreign key (b) references t2(b);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key (b) references t2(b)'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
||||
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `t2`
|
||||
drop table t2, t1;
|
||||
create table t1 (f1 integer primary key) engine=innodb;
|
||||
alter table t1 add constraint c1 foreign key (f1) references t11(f1);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary near ' foreign key (f1) references t11(f1)'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||
drop table t1;
|
||||
create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb;
|
||||
create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
|
||||
@@ -78,12 +78,12 @@ Warning 150 Create table `mysqld.1`.`t2` with foreign key constraint failed. Re
|
||||
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `t2`
|
||||
alter table t1 add foreign key(b) references t1(a);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(b) references t1(a)'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||
drop table t1;
|
||||
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
|
||||
alter table t1 add foreign key(a,b) references t1(a);
|
||||
@@ -101,12 +101,12 @@ Error 1239 Incorrect foreign key definition for 'foreign key without name': Key
|
||||
drop table t1;
|
||||
create table t1 (f1 integer not null primary key) engine=innodb;
|
||||
alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update set null;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column 'f1' is defined as NOT NULL in ' foreign key (f1) references t1(f1) on update set null' near ' on update set null'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
|
||||
@@ -62,12 +62,12 @@ PRIMARY KEY (`id`),
|
||||
CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
||||
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint for `t2`
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
CREATE DATABASE kg_test1;
|
||||
|
||||
@@ -513,7 +513,7 @@ SET DEBUG_SYNC = 'RESET';
|
||||
disconnect con1;
|
||||
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
|
||||
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
DROP TABLE t2,t1;
|
||||
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
||||
SET GLOBAL innodb_monitor_enable = default;
|
||||
|
||||
@@ -506,7 +506,7 @@ t4 CREATE TABLE `t4` (
|
||||
CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
alter table t3 add constraint dc foreign key (a) references t1(a);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
|
||||
ERROR HY000: Can't create table `test`.`t3` (errno: 121 "Duplicate key on write or update")
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
alter table t3 add constraint dc foreign key (a) references t1(a);
|
||||
ERROR HY000: Failed to add the foreign key constraint 'test/dc' to system tables
|
||||
@@ -951,13 +951,13 @@ PRIMARY KEY (c1)
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1), ALGORITHM=COPY;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
|
||||
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
|
||||
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
|
||||
@@ -966,13 +966,13 @@ FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
|
||||
ERROR HY000: Failed to add the foreign key constraint on table 't2'. Incorrect options in FOREIGN KEY constraint 'test/fk_t2_ca'
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=COPY;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
|
||||
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
|
||||
|
||||
@@ -10,11 +10,11 @@ f1 f2
|
||||
insert into t1 values(2, 3);
|
||||
ERROR HY000: Running in read-only mode
|
||||
alter table t1 add f3 int not null, algorithm=copy;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
|
||||
alter table t1 add f3 int not null, algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
|
||||
drop index idx on t1;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
|
||||
alter table t1 drop index idx, algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
|
||||
update t1 set f1=3 where f2=2;
|
||||
@@ -38,11 +38,11 @@ f1 f2
|
||||
insert into t2 values(2, 3);
|
||||
ERROR HY000: Running in read-only mode
|
||||
alter table t2 add f3 int not null, algorithm=copy;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 165 "Table is read only")
|
||||
alter table t2 add f3 int not null, algorithm=inplace;
|
||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
|
||||
drop index idx on t2;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 165 "Table is read only")
|
||||
update t2 set f1=3 where f2=2;
|
||||
ERROR HY000: Running in read-only mode
|
||||
create table t1(f1 int not null)engine=innodb;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
create table t (a varchar(100)) engine=innodb;
|
||||
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
|
||||
name pos mtype prtype len
|
||||
a 0 1 524303 100
|
||||
alter table t modify a varchar(110), algorithm=inplace;
|
||||
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
|
||||
name pos mtype prtype len
|
||||
a 0 1 524303 110
|
||||
drop table t;
|
||||
@@ -9,6 +9,7 @@ update t1 set c = 'MariaDB';
|
||||
update t1 set c = 'InnoDB';
|
||||
set global debug_dbug = '+d,ib_undo_trunc';
|
||||
commit;
|
||||
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
|
||||
call mtr.add_suppression("InnoDB: The redo log transaction size ");
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
FOUND 1 /ib_undo_trunc/ in mysqld.1.err
|
||||
|
||||
Reference in New Issue
Block a user