mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-29258 Failing assertion for name length on RENAME TABLE
trx_undo_page_report_rename(): Use the correct maximum length of a table name. Both the database name and the table name can be up to NAME_CHAR_LEN (64 characters) times 5 bytes per character in the my_charset_filename encoding. They are not encoded in UTF-8! fil_op_write_log(): Reserve the correct amount of log buffer for a rename operation. The file name will be appended by mlog_catenate_string(). rename_file_ext(): Reserve a large enough buffer for the file names.
This commit is contained in:
@ -11,6 +11,13 @@ CREATE TABLE `d255`.`_##################################################`
|
||||
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;
|
||||
#
|
||||
# MDEV-29258 Failing assertion for name length on RENAME TABLE
|
||||
#
|
||||
CREATE TABLE `d255`.`d245` (x INT) ENGINE=InnoDB;
|
||||
DROP TABLE `d255`.`d250`;
|
||||
RENAME TABLE `d250#`.`d245` TO `d250#`.`d250`;
|
||||
RENAME TABLE `d255`.`d250` TO a;
|
||||
DROP DATABASE `d255`;
|
||||
DROP TABLE t;
|
||||
DROP TABLE a,t;
|
||||
# End of 10.3 tests
|
||||
|
@ -38,8 +38,23 @@ eval CREATE TABLE `$d255`.`_$d250`
|
||||
--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
|
||||
eval DROP DATABASE `$d255`;
|
||||
DROP TABLE t;
|
||||
DROP TABLE a,t;
|
||||
|
||||
--echo # End of 10.3 tests
|
||||
|
Reference in New Issue
Block a user