mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '10.3' into 10.4
This commit is contained in:
@ -859,6 +859,20 @@ Error 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`)
|
||||
DROP TABLE t1;
|
||||
FOUND 1 /InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15.*/ in mysqld.1.err
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE DATABASE `db`;
|
||||
CREATE TABLE `db`.u (
|
||||
a INT PRIMARY KEY,
|
||||
CONSTRAINT `††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††`
|
||||
FOREIGN KEY (a) REFERENCES test.t (a)) ENGINE=InnoDB;
|
||||
DROP TABLE `db`.u;
|
||||
DROP DATABASE `db`;
|
||||
DROP TABLE t;
|
||||
# End of 10.3 tests
|
||||
CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
|
||||
FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
|
16
mysql-test/suite/innodb/r/foreign_key_not_windows.result
Normal file
16
mysql-test/suite/innodb/r/foreign_key_not_windows.result
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN
|
||||
#
|
||||
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE DATABASE `d255`;
|
||||
CREATE TABLE `d255`.`d255`
|
||||
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
|
||||
ERROR HY000: Long database name and identifier for object resulted in path length exceeding 512 characters. Path: './@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023/@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@
|
||||
CREATE TABLE `d255`.`_##################################################`
|
||||
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
|
||||
ERROR HY000: Long database name and identifier for object resulted in path length exceeding 512 characters. Path: './@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023/_@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023
|
||||
CREATE TABLE `d255`.`##################################################`
|
||||
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
|
||||
DROP DATABASE `d255`;
|
||||
DROP TABLE t;
|
||||
# End of 10.3 tests
|
@ -881,6 +881,35 @@ let SEARCH_PATTERN= InnoDB: Cannot delete/update rows with cascading foreign key
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
# The maximum identifier length is 64 characters.
|
||||
# my_charset_filename will expand some characters to 5 characters,
|
||||
# e.g., # to @0023.
|
||||
# Many operating systems (such as Linux) or file systems
|
||||
# limit the path component length to 255 bytes, such as 51*5 characters.
|
||||
# The bug was repeated with a shorter length, which we will use here,
|
||||
# to avoid exceeding MAX_PATH on Microsoft Windows.
|
||||
let $db=##########################;
|
||||
--replace_result $db db
|
||||
eval CREATE DATABASE `$db`;
|
||||
--replace_result $db db
|
||||
eval CREATE TABLE `$db`.u (
|
||||
a INT PRIMARY KEY,
|
||||
CONSTRAINT `††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††`
|
||||
FOREIGN KEY (a) REFERENCES test.t (a)) ENGINE=InnoDB;
|
||||
--replace_result $db db
|
||||
eval DROP TABLE `$db`.u;
|
||||
--replace_result $db db
|
||||
eval DROP DATABASE `$db`;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo # End of 10.3 tests
|
||||
|
||||
# MDEV-21792 Server aborts upon attempt to create foreign key on spatial field
|
||||
# Fail to create foreign key for spatial fields
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
|
45
mysql-test/suite/innodb/t/foreign_key_not_windows.test
Normal file
45
mysql-test/suite/innodb/t/foreign_key_not_windows.test
Normal file
@ -0,0 +1,45 @@
|
||||
--source include/have_innodb.inc
|
||||
# On Microsoft Windows, there is an additional limit of MAX_PATH
|
||||
--source include/not_windows.inc
|
||||
# The embedded server prepends --datadir or --innodb-data-home-dir
|
||||
# to the path names, which reduces the maximum length of names further.
|
||||
--source include/not_embedded.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN
|
||||
--echo #
|
||||
|
||||
# The main test is innodb.foreign_key. This is an additional test that
|
||||
# the maximum length cannot be exceeded for implicitly created
|
||||
# constraint names. On Microsoft Windows, MAX_PATH is a much stricter
|
||||
# limit than the 255-byte maximum path component length on many other systems,
|
||||
# including Linux and IBM AIX.
|
||||
|
||||
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
||||
# The maximum identifier length is 64 characters.
|
||||
# my_charset_filename will expand some characters to 5 characters,
|
||||
# e.g., # to @0023.
|
||||
# Many operating systems (such as Linux) or file systems
|
||||
# limit the path component length to 255 bytes,
|
||||
# corresponding to the 51 characters below: 5*51=255.
|
||||
let $d255=###################################################;
|
||||
let $d250=##################################################;
|
||||
--replace_result $d255 d255
|
||||
eval CREATE DATABASE `$d255`;
|
||||
--replace_result $d255 d255
|
||||
--error ER_IDENT_CAUSES_TOO_LONG_PATH
|
||||
eval CREATE TABLE `$d255`.`$d255`
|
||||
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
|
||||
--replace_result $d255 d255
|
||||
--error ER_IDENT_CAUSES_TOO_LONG_PATH
|
||||
eval CREATE TABLE `$d255`.`_$d250`
|
||||
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
|
||||
--replace_result $d255 d255
|
||||
eval CREATE TABLE `$d255`.`$d250`
|
||||
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
|
||||
--replace_result $d255 d255
|
||||
eval DROP DATABASE `$d255`;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo # End of 10.3 tests
|
Reference in New Issue
Block a user