1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-02 14:22:51 +03:00
Files
mariadb/mysql-test/suite/innodb/t/foreign_key_not_windows.test
Sergei Golubchik 2bd41fc5bf Revert MDEV-25292 Atomic CREATE OR REPLACE TABLE
Specifically:

Revert "MDEV-29664 Assertion `!n_mysql_tables_in_use' failed in innobase_close_connection"
This reverts commit ba875e9396.

Revert "MDEV-29620 Assertion `next_insert_id == 0' failed in handler::ha_external_lock"
This reverts commit aa08a7442a.

Revert "MDEV-29628 Memory leak after CREATE OR REPLACE with foreign key"
This reverts commit c579d66ba6.

Revert "MDEV-29609 create_not_windows test fails with different result"
This reverts commit cb583b2f1b.

Revert "MDEV-29544 SIGSEGV in HA_CREATE_INFO::finalize_locked_tables"
This reverts commit dcd66c3814.

Revert "MDEV-28933 CREATE OR REPLACE fails to recreate same constraint name"
This reverts commit cf6c517632.

Revert "MDEV-28933 Moved RENAME_CONSTRAINT_IDS to include/sql_funcs.h"
This reverts commit f1e1c1335b.

Revert "MDEV-28956 Locking is broken if CREATE OR REPLACE fails under LOCK TABLES"
This reverts commit a228ec80e3.

Revert "MDEV-25292 gcol.gcol_bugfixes --ps fix"
This reverts commit 24fff8267d.

Revert "MDEV-25292 Disable atomic replace for slave-generated or-replace"
This reverts commit 2af15914cb.

Revert "MDEV-25292 backup_log improved"
This reverts commit 34398a20b5.

Revert "MDEV-25292 Atomic CREATE OR REPLACE TABLE"
This reverts commit 93c8252f02.

Revert "MDEV-25292 Table_name class for (db, table_name, alias)"
This reverts commit d145dda9c7.

Revert "MDEV-25292 ha_table_exists() cleanup and improvement"
This reverts commit 409b8a86de.

Revert "MDEV-25292 Cleanups"
This reverts commit 595dad83ad.

Revert "MDEV-25292 Refactoring: moved select_field_count into Alter_info."
This reverts commit f02af1d229.
2022-10-27 23:13:41 +02:00

78 lines
2.8 KiB
Plaintext

--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;
--echo #
--echo # MDEV-29258 Failing assertion for name length on RENAME TABLE
--echo #
let $d245=-------------------------------------------------;
--replace_result $d245 d245 $d255 d255
eval CREATE TABLE `$d255`.`$d245` (x INT) ENGINE=InnoDB;
--replace_result $d250 d250 $d255 d255
eval DROP TABLE `$d255`.`$d250`;
--replace_result $d245 d245 $d250 d250 d255 d255
eval RENAME TABLE `$d255`.`$d245` TO `$d255`.`$d250`;
--replace_result $d250 d250 $d255 d255
eval RENAME TABLE `$d255`.`$d250` TO a;
--replace_result $d255 d255
DROP TABLE a,t;
--echo #
--echo # MDEV-29409 Buffer overflow in my_wc_mb_filename() on RENAME TABLE
--echo #
let $d225=#############################################;
let $d320=################################################################;
--replace_result $d255 d255
eval CREATE TABLE `$d255`.t(a INT PRIMARY KEY)ENGINE=InnoDB;
--replace_result $d255 d255 $d320 d320
eval CREATE TABLE `$d255`.u(a INT PRIMARY KEY,
CONSTRAINT `$d320` FOREIGN KEY (a) REFERENCES `$d255`.t (a)) ENGINE=InnoDB;
--replace_result $d255 d255
eval RENAME TABLE `$d255`.u TO u;
DROP TABLE u;
--replace_result $d255 d255
eval DROP DATABASE `$d255`;
--echo # End of 10.3 tests