Bug #57876 'Create statement' error
Submitted: 31 Oct 2010 18:54 Modified: 30 Jun 2011 9:16
Reporter: Krzysztof Lorkowski Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.29 CE OS:Windows (Vista Home Premium x64)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: create statement error

[31 Oct 2010 18:54] Krzysztof Lorkowski
Description:
When right clicking a table and trying to run 'Send to SQL Editor -> Create Statement' an error is generated most of the time. Restarting the application doesn't help. The 'error' says that the index is out of range.

How to repeat:
On my computer the error occurs in most cases, so it is not a big problem to repeat it.
[1 Nov 2010 10:35] MySQL Verification Team
Thank you for the bug report. I couldn't repeat on Vista Ultimate 64-bit. Please provide the output of show create table table_name which one of tables that cause the error?.
[1 Nov 2010 11:02] Krzysztof Lorkowski
A screenshot with the error

Attachment: Error.jpg (image/jpeg, text), 49.54 KiB.

[1 Nov 2010 11:16] Krzysztof Lorkowski
There is no output, just the error message. I have just sent a screenshot with the error I get. Unfortunately half of the message is in Polish language, because my Windows Vista is a Polish version. I'll try to translate the Polish part for you:
"Index is out of range. It has to be a non-negative value and be smaller than the collection size.
Parameter name: StartIndex".
I hope this helps. If you need anything more just let me know.
[1 Nov 2010 11:19] Krzysztof Lorkowski
Below is the create statement for one of the problematic tables:
CREATE TABLE `tresc_menu_gorne` (
  `id` tinyint(4) NOT NULL auto_increment,
  `element` varchar(25) collate utf8_polish_ci NOT NULL COMMENT 'Element menu, który widać na stronie.',
  `opis` varchar(100) collate utf8_polish_ci default NULL COMMENT 'Opis dla webmastera.',
  `adres_url` varchar(150) collate utf8_polish_ci NOT NULL COMMENT 'Adres URL, do którego prowadzi element menu.',
  `indeks` tinyint(4) NOT NULL COMMENT 'Indeks kolejności, w jakiej są wyświetlane elementy menu. Pierwszy indeks to 1.',
  `wyswietl` char(1) collate utf8_polish_ci NOT NULL COMMENT 'Parametr określający czy dany element menu ma być widoczny na stronie.',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci COMMENT='Tabela zawierająca menu górne strony.'$$
[1 Nov 2010 12:21] MySQL Verification Team
Thank you for the feedback. Verified using the table provided.
[1 Nov 2010 15:24] Peter Laursen
probably non-ascii characters in column comments causing this.
[30 Jun 2011 9:16] Jon Stephens
Duplicate of BUG#60475.