mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@@ -81,4 +81,17 @@ DROP TABLE t2, t1;
|
||||
CREATE TABLE t (a VARCHAR(40), b INT, C INT) ENGINE=InnoDB;
|
||||
ALTER TABLE t MODIFY a VARCHAR(50), DROP b;
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-32060 Server aborts when table doesn't
|
||||
# have referenced index
|
||||
#
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
CREATE TABLE t1 (a VARCHAR(16) KEY, FOREIGN KEY(a) REFERENCES t2(b)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (b VARCHAR(8)) ENGINE=InnoDB;
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t2 MODIFY b VARCHAR(16), ADD KEY(b);
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
DROP TABLE t2, t1;
|
||||
ERROR 42S02: Unknown table 'test.t2'
|
||||
# End of 10.4 tests
|
||||
|
||||
@@ -111,4 +111,19 @@ DROP TABLE t2, t1;
|
||||
CREATE TABLE t (a VARCHAR(40), b INT, C INT) ENGINE=InnoDB;
|
||||
ALTER TABLE t MODIFY a VARCHAR(50), DROP b;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32060 Server aborts when table doesn't
|
||||
--echo # have referenced index
|
||||
--echo #
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
CREATE TABLE t1 (a VARCHAR(16) KEY, FOREIGN KEY(a) REFERENCES t2(b)) ENGINE=InnoDB;
|
||||
# Following SQL is allowed in 10.6
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t2 (b VARCHAR(8)) ENGINE=InnoDB;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
--error ER_NO_SUCH_TABLE
|
||||
ALTER TABLE t2 MODIFY b VARCHAR(16), ADD KEY(b);
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
DROP TABLE t2, t1;
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
Reference in New Issue
Block a user