Commit f19fa527 authored by Vasil Dimov's avatar Vasil Dimov

Fix Bug#56143 too many foreign keys causes output of show create table to become invalid

Just remove the check whether the file is "too big".
A similar code exists in ha_innobase::update_table_comment() but that
method does not seem to be used.
parent ac1efb1a
This diff is collapsed.
#
# Bug#56143 too many foreign keys causes output of show create table to become invalid
# http://bugs.mysql.com/56143
#
-- source include/have_innodb.inc
-- disable_query_log
-- disable_result_log
SET foreign_key_checks=0;
DROP TABLE IF EXISTS bug56143;
CREATE TABLE bug56143 (a INT, b INT, c INT, KEY(a), KEY(b), KEY(c)) ENGINE=INNODB;
let $i = 550;
while ($i)
{
eval ALTER TABLE `bug56143` ADD CONSTRAINT `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$i` FOREIGN KEY (`b`) REFERENCES `bug56143`(`b`) ON UPDATE SET NULL;
dec $i;
}
-- enable_query_log
-- enable_result_log
SHOW CREATE TABLE bug56143;
-- disable_query_log
-- disable_result_log
DROP TABLE bug56143;
...@@ -6788,8 +6788,6 @@ ha_innobase::get_foreign_key_create_info(void) ...@@ -6788,8 +6788,6 @@ ha_innobase::get_foreign_key_create_info(void)
flen = ftell(srv_dict_tmpfile); flen = ftell(srv_dict_tmpfile);
if (flen < 0) { if (flen < 0) {
flen = 0; flen = 0;
} else if (flen > 64000 - 1) {
flen = 64000 - 1;
} }
/* allocate buffer for the string, and /* allocate buffer for the string, and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment