Bug #45139 Too long foreign keys name, error 1059
Submitted: 27 May 2009 15:37 Modified: 17 Jun 2009 15:15
Reporter: Petr Burian Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.12 OS:Any
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: CHECKED, error 1059, foreign key, LENGTH

[27 May 2009 15:37] Petr Burian
Description:
Workbench doesn't limit foreign key name length. Exported SQL script is invalid and MySQL server refuse to import it due to an error 1059 - ER_TOO_LONG_IDENT.

How to repeat:
Create a table with long name and some foreign keys. Export schema to SQL script and try to import to MysQL server (tested on 5.1.34). MySQL fails with error 1059.
[27 May 2009 15:37] Petr Burian
Version is 5.1.12, my mistake, sorry ;)
[12 Jun 2009 12:22] Johannes Taxacher
fix confirmed. will be included in 5.1.13
[17 Jun 2009 15:15] Tony Bedford
An entry was added to the 5.1.13 changelog:

MySQL Workbench did not limit foreign key name length. This meant that an exported SQL script was invalid and MySQL Server generated an error on attempting to import it:

1059 - ER_TOO_LONG_IDENT