mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@@ -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
|
@@ -477,3 +477,12 @@ ALTER TABLE t1 ADD COLUMN(f2 INT NOT NULL, f3 INT NOT NULL,
|
||||
CHANGE COLUMN f1 f1 CHAR(10) DEFAULT NULL;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26420 Buffer overflow on instant ADD/DROP of generated column
|
||||
--echo #
|
||||
CREATE TABLE t1 (i int AS (0) STORED, j INT) ENGINE=InnoDB;
|
||||
ALTER TABLE t1 ADD COLUMN i INT GENERATED ALWAYS AS (1), DROP COLUMN i;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
Reference in New Issue
Block a user