Bug #11765 Connection gets lost when changing default schema
Submitted: 6 Jul 2005 9:46 Modified: 31 Aug 2005 16:21
Reporter: Kai Sautter (Basic Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.1.10 OS:Windows (Windows XP (SP2))
Assigned to: Aleksey Kishkin CPU Architecture:Any

[6 Jul 2005 9:46] Kai Sautter
Description:
If you change the default schema, while Query Browser is still fetching the structure of the original default schema, the connection to the server gets lost. An error message indicating that the server has shut down apprears, yet the server is still running and working fine for any other connection.

The connection can be restored with File | Connect.

How to repeat:
(1) start Query Browser indicating a default schema
(2) while Query Browser is still fetching the tables in the schema, right cklick another schema and select "Make default schema".

An error message pops up:
"A MySQL error was encountered. The message is:

Could not fetch schema tables.
 The following error occured: MySQL server has gone away (2006)"

Checking the server indicates, that it is still available and accepting commands and connections.
[6 Jul 2005 9:52] Aleksey Kishkin
what mysql server version do you use?
[6 Jul 2005 10:32] Kai Sautter
I am running a 5.0.6 on the same Windows machine.
[6 Jul 2005 12:20] Aleksey Kishkin
checked against mysql 5.0.7 and was not able to reproduce it. Could you please test more fresh mysql (5.0.7)?
[11 Jul 2005 7:16] Kai Sautter
I have tested this also with a local (Windows XP SP2 based) MySQL server 5.0.7. The problem regading the lost connection persists yet after reconnecting the new default schema is selected correctly.
[11 Jul 2005 14:39] Aleksey Kishkin
reproduced it for mysql 5.0.7. In order to check it I
created 1000 tables in the 'test' database (I attached sql file for that). It gives some time for fetching.

so.
1) I connect with default scheme 'test'
2) click on triangle near the test database (in order to expand this tree). the message 'Fetching Data..' appeared
3) while 'Fetching' I click to 'mysql' database and (form context menu) selected 
'Make Default Scheme'
4) then click on triangle near the 'mysql' (in order to show all 'mysql' tables) and got 'mysql server has gone away'

in the log file I got following:

Cannot find table test/tbl6 from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
Look from section 15.1 of http://www.innodb.com/ibman.html
how you can resolve the problem.
050711 18:35:29  InnoDB error:
Cannot find table test/tbl60 from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
Look from section 15.1 of http://www.innodb.com/ibman.html
how you can resolve the problem.
050711 18:35:29  InnoDB error:
Cannot find table test/tbl600 from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
Look from section 15.1 of http://www.innodb.com/ibman.html
how you can resolve the problem.
050711 18:35:29  InnoDB error:
Cannot find table test/tbl601 from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
Look from section 15.1 of http://www.innodb.com/ibman.html
how you can resolve the problem.

etc.. etc..
[11 Jul 2005 14:39] Aleksey Kishkin
screenshoot

Attachment: bug11765.PNG (image/png, text), 67.36 KiB.

[11 Jul 2005 14:40] Aleksey Kishkin
script for creating 1000 tables

Attachment: crt.sql (text/x-sql), 29.19 KiB.

[19 Aug 2005 14:46] Vladimir Kolesnikov
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Additional info:

Alexey,
I checked this bug on 4.1.13a and QB 1.1.13 on W2K. I was unable to repro this bug, although I created 2000 tables, and schema change was done explicitly  *during* table fetching process. Newly selected schema (mysql) highlighted, but operation completed successfully afterwards. No error messages were shown and all tables were fetched and shown in the tree.

Please recheck this bug and let me know if it still persists for you.
[26 Aug 2005 9:37] Kai Sautter
For me the error can still be reproduced. My impression is, that the performance of the machine is key. If it is too powerful, the described behaviour will not orrur. A second factor is the right speed in performing the described actions.

The only "additional" Information I can provide is, that I am running Server and Client on the same machine with rather few memory (512MB). So, I would say the more you can slow down the machine, the easier it is to reproduce the behaviour. If you have a powerful dedicated server, you might not be able to reproduce it.
[30 Sep 2005 8:49] Shamil Kerimov
the same problem here.
1. MySQL Query Browser 1.1.14
2. MySQL Server 4.1.14 ("mysqld-nt")
3. both installed on local machine (WinXPSP2, firewall).
4. total of 3 databases (2-3 tables each).

after 10-20 minutes of inactivity, connection is lost. when restarting the QB, everyting is ok.