|
| 1 | +--source include/have_innodb.inc |
| 2 | +--source include/not_windows.inc |
| 3 | + |
| 4 | +--echo # |
| 5 | +--echo # MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN |
| 6 | +--echo # |
| 7 | + |
| 8 | +# The main test is innodb.foreign_key. This is an additional test that |
| 9 | +# the maximum length cannot be exceeded for implicitly created |
| 10 | +# constraint names. On Microsoft Windows, MAX_PATH is a much stricter |
| 11 | +# limit than the 255-byte maximum path component length on many other systems, |
| 12 | +# including Linux and IBM AIX. |
| 13 | + |
| 14 | +CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB; |
| 15 | + |
| 16 | +# The maximum identifier length is 64 characters. |
| 17 | +# my_charset_filename will expand some characters to 5 characters, |
| 18 | +# e.g., # to @0023. |
| 19 | +# Many operating systems (such as Linux) or file systems |
| 20 | +# limit the path component length to 255 bytes, |
| 21 | +# corresponding to the 51 characters below: 5*51=255. |
| 22 | +let $d255=###################################################; |
| 23 | +let $d250=##################################################; |
| 24 | +--replace_result $d255 d255 |
| 25 | +eval CREATE DATABASE `$d255`; |
| 26 | +--replace_result $d255 d255 |
| 27 | +--error ER_IDENT_CAUSES_TOO_LONG_PATH |
| 28 | +eval CREATE TABLE `$d255`.`$d255` |
| 29 | +(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB; |
| 30 | +--replace_result $d255 d255 |
| 31 | +--error ER_IDENT_CAUSES_TOO_LONG_PATH |
| 32 | +eval CREATE TABLE `$d255`.`_$d250` |
| 33 | +(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB; |
| 34 | +--replace_result $d255 d255 |
| 35 | +eval CREATE TABLE `$d255`.`$d250` |
| 36 | +(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB; |
| 37 | +--replace_result $d255 d255 |
| 38 | +eval DROP DATABASE `$d255`; |
| 39 | +DROP TABLE t; |
| 40 | + |
| 41 | +--echo # End of 10.3 tests |
0 commit comments