Commit 6cc06928 authored by Vasil Dimov's avatar Vasil Dimov

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

This is a port of the following changeset from
5.1/storage/innobase to 5.1/storage/innodb_plugin:

  ------------------------------------------------------------
  revno: 3626
  revision-id: vasil.dimov@oracle.com-20101013171859-gi9n558yj89x9v3w
  parent: klewis@mysql.com-20101012175933-ce9kkgl0z8oeqffa
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Wed 2010-10-13 20:18:59 +0300
  message:
    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.

Also use a CREATE statement with all the FKs instead of ALTERing the
table 550 times because it is faster.
parent e19bb1ec
This diff is collapsed.
This diff is collapsed.
......@@ -8097,8 +8097,6 @@ ha_innobase::get_foreign_key_create_info(void)
flen = ftell(srv_dict_tmpfile);
if (flen < 0) {
flen = 0;
} else if (flen > 64000 - 1) {
flen = 64000 - 1;
}
/* 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