Bug #61045 Cannot Use "Edit Table..." when table is named "status", window fails to open.
Submitted: 3 May 2011 20:04 Modified: 4 Jul 2012 20:35
Reporter: Charlie Farrow Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.36, 5.2.37 OS:Windows (7 64BIT)
Assigned to: CPU Architecture:Any
Tags: Edit Table, STATUS, workbench

[3 May 2011 20:04] Charlie Farrow
Description:
When using Workbench (Version 5.2.33 and also tested on 5.2.31), when a table has the name "status" it cannot be opened for editing when right clicking on the table name and selecting "edit table..." from the menu.

No error is generated, workbench does not crash or become unstable.

Server version in use is 5.1.45

The word "status" does not appear in the docs on the reserved word list:

http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedword...

How to repeat:
I tried this on an existing database and only the one table named "status" failed to open.

To test I created another db, called "testdb2" and created two tables. One called "test" another called "status". The issue repeated and the table names "status" fails to open for editing.

Suggested fix:
Unknown.
[3 May 2011 21:00] MySQL Verification Team
Thank you for the bug report. Could you please provide the create statement of the table status. I couldn't repeat on my own. Thanks in advance.
[3 May 2011 21:44] Charlie Farrow
Sure. i have just tried it again. Done from within Workbench GUI, using defaults.

CREATE SCHEMA `new_schema` ;

CREATE  TABLE `new_schema`.`new_table` (

  `idnew_table` INT NOT NULL ,

  PRIMARY KEY (`idnew_table`) );

CREATE  TABLE `new_schema`.`status` (

  `idstatus` INT NOT NULL ,

  PRIMARY KEY (`idstatus`) );

Now "status" will not open at all when using the right-click "alter table..." but new_schema opens every time.

You can do a webex (or similar) tomorrow and have a look if you like.
[5 May 2011 19:50] rafael bedoy
Hello Charlie,

May you please provide more information about the environment you are working on?,

Please On workbench click on Help-> System Info and paste the info as a comment.

Thanks in advance.
[5 Jun 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[8 Jun 2011 18:55] Charlie Farrow
Certainly, what other info would you like other than this?

MySQL Workbench CE for Windows version 5.2.33

Configuration Directory: C:\Users\charlie\AppData\Roaming\MySQL\Workbench

Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE

Cairo Version: 1.8.8

Rendering Mode: OpenGL is available on this system, so OpenGL is used for rendering.

OpenGL Driver Version: 2.1.2

OS: Microsoft Windows 7 Ultimate Edition (build 7600), 64-bit

CPU: 2x Intel(R) Core(TM)2 Duo CPU     T7300  @ 2.00GHz, 2.0 GiB RAM

Active video adapter: NVIDIA Quadro NVS 135M 

Installed video RAM: 128 MB

Current video mode: 1280 x 800 x 4294967296 colors

Used bit depth: 32

Driver version: 7.15.11.7924

Installed display drivers: nvd3dum,nvd3dumx.dll,nvwgf2um, nvwgf2umx.dll

Current user language: English (United Kingdom)

(PS I have confirmed it still doesn't work).
[9 Jun 2011 13:36] Alfredo Kojima
Please try again with version 5.2.34 A change has been made where failure to open the editor
will make the create code be shown in the query editor, which could show some hint as to what is wrong.
I tried ALTER on a table called status and it works fine here.
[9 Jul 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[2 Sep 2011 7:36] Charlie Farrow
I have checked with the latest version as requested. Bug still present. If you want more detail, or to do a remote webex or something to see it in action, please let me know.

I have tried it on several databases and even a new one the issue is the same.
[5 Sep 2011 16:28] Valeriy Kravchuk
What exact server version do you use?
[6 Sep 2011 9:02] Charlie Farrow
It is still the same as the original bug report :)

5.1.45-log on Fedora.
[28 Sep 2011 21:06] MySQL Verification Team
Please try version 5.2.35. Thanks.
[29 Sep 2011 13:36] Charlie Farrow
Sorry, the problem still persists in this new release.
[13 Nov 2011 5:46] Alfredo Kojima
Can you attach the log files at C:\Users\<user>\AppData\Roaming\MySQL\Workbench\wb.log ?
[16 Nov 2011 14:52] Charlie Farrow
After performing opperation, three lines in the log only:

14:44:55 [   Info][      wbprivate]: WbContext::init
14:45:01 [   Info][      wbprivate]: Starting tunnel
14:50:41 [   Info][               ]: wb.form.showOptions finished in 207.37s

Nothing else.

Can I turn the log level up somehow so you get more? I did hunt but couldn't find that as an option.
[3 Dec 2011 17:26] Valeriy Kravchuk
Please, check if the same problem still happens with a newer version, 5.2.36.
[7 Dec 2011 10:09] Charlie Farrow
I am afraid this bug still persists in 5.2.36 the new version in exactly the same way as before, on all my machines.
[7 Dec 2011 10:11] Charlie Farrow
Also, on this new version I started it and tried to perform Edit Table on the table named status and all that is in the log is similar to before:

10:04:58 [   Info][      wbprivate]: WbContext::init
10:05:18 [   Info][      wbprivate]: Starting tunnel
[12 Dec 2011 23:24] MySQL Verification Team
I couldn't repeat on Windows 7 64-bit with sample provided.
[13 Dec 2011 11:10] Mike Lischke
I cannot repeat either. Works as expected.

Charlie, for increasing the loglevel start WB with the command line option -log-level=debug1 (or debug2 or debug3, for more verbosity). Keep in mind that each new run of WB rotates the log files, so before you re-run WB after a problem first save the current log (wb.log) to another place.
[16 Dec 2011 9:24] Charlie Farrow
OK its all done. You can probebly see fine from the log exactly what I have done, but just to outline:

1) Set loglevel to debug3
2) Opened Workbench
3) Went into the default Schema, opened the table tree.
4) Executed a "Select Rows...Limit 1000" command to show the table was OK.
5) Executed an "Alter Table..." command from the menu.
6) Waited Approx 1 min for a window to appear.
7) Quit WB.

Not much in their, i'll see if I can set the log level higher.

Log file being submitted as file in a few seconds.
[27 Dec 2011 21:54] MySQL Verification Team
Please try version 5.2.37. Thanks.
[27 Dec 2011 23:36] Alfredo Kojima
Can you try recording a desktop video showing the problem? Might be easier than coordinating a webex session.
[28 Dec 2011 21:55] Charlie Farrow
Tried 5.2.37, but still does not work.

I have made the video and attached. First I show another table will open for editing, then show that the status table doesn't open.

Attaching now.
[28 Dec 2011 22:02] Charlie Farrow
File has been put in RAR and uplaoded to the FTP site.
File is named bug-data-61045.rar

If you require anything else, please let me know.
[12 Jan 2012 23:03] Alfredo Kojima
Hi Charlie
Where exactly did you upload the file? I can't find it in ftp.oracle.com
[23 Jan 2012 19:38] Charlie Farrow
I have uploaded again for you. File name is bug-data-61045.zip
Uploaded as per "files" tab to ftp://ftp.oracle.com/support/incoming/
[26 Jan 2012 14:49] Alfredo Kojima
Thank you for the video.
I was able to repeat with server 5.1.48
This doesn't seem to happen with server 5.0 or 5.5 and certain other versions of 5.1 series either.
[26 Jan 2012 16:16] Alfredo Kojima
The problem is caused by what appears to be a server bug.
This is the failing query:

mysql> SELECT 'trigger' AS 'OBJECT_TYPE', TRIGGER_CATALOG as 'CATALOG', TRIGGER_SCHEMA as 'SCHEMA', TRIGGER_NAME as 'NAME' FROM information_schema.triggers WHERE trigger_schema = 'test'  AND EVENT_OBJECT_TABLE='status';
ERROR 1109 (42S02): Unknown table 'status' in information_schema

The same thing works in server 5.5. If possible, I think the best workaround would be to upgrade the server.
[29 Jan 2012 9:48] Charlie Farrow
I don't really want to upgrade the server if I can help it; its quite a lot of work.
I can work round it and do it manually for now, have you changed the bug so it is against the server rather than against workbench?
[4 Jul 2012 20:35] Alfredo Kojima
The bug does not appear in newer server versions. Closing as Not a Bug, since this is already fixed in server.