Bug #40060 Index name too long

Submitted: 15 Oct 2008 15:50 Modified: 3 Nov 2009 14:40
Reporter: moi meme Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.26 OS:Windows
Assigned to: Johannes Taxacher CPU Architecture:Any
Tags: CHECKED

[15 Oct 2008 15:50] moi meme
Description:
It's possible to export indexes with too long names

How to repeat:
create a table "TSpecificRule" with a key field "idRule"
create a table "TSpecificRuleApplyField" with a key field "idApplyField"
create a n-m relation between them
2 foreign keys are generated with the new table called:
"fk_TSpecificRuleApplyField_has_TSpecificRule_TSpecificRuleApplyField"
and
"fk_TSpecificRuleApplyField_has_TSpecificRule_TSpecificRule"

export the script and try to execute ...

Suggested fix:
check index name length (and that index apply at least to one column, see bug XXX) before an export
[3 Nov 2009 14:40] Johannes Taxacher
this has been fixed already, workbench now takes maxlength of keynames into account.
i.e. example stated above generates keys for the m:n table like this one:

...
  KEY `fk_TSpecificRuleApplyField_has_TSpecificRule_TSpecificRuleApp` 
...
  CONSTRAINT `fk_TSpecificRuleApplyField_has_TSpecificRule_TSpecificRuleApp` 
...

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.