Bug #23534 Access violation when selecting a schema
Submitted: 22 Oct 2006 17:21 Modified: 28 Nov 2006 14:52
Reporter: Nicolas Laplante Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.2.4 beta OS:Windows (Windows XP SP2)
Assigned to: Mike Lischke CPU Architecture:Any

[22 Oct 2006 17:21] Nicolas Laplante
Description:
Using Query Browser 1.2.4 beta, when I select (double-click) some of the schemas from the schema list, it hangs during "Fetching Data..." and I get a popup with the following message:

Access violation at address 0040417A in module 'MySQLQueryBrowser.exe'. Read of address 00000004.

Selecting other schemas work. If I restart QB and retry selecting the same schema, the problem still happens.

It happens with 2 databases I created (one for nss-mysql and the other for mod_log_sql). Both databases use MyISAM tables. The other schemas that work are using InnoDB. The mysql schema (MyISAM) works too.

I'm suspecting a problem on the server side, but it would be useful if the QB would output an error message describing the problem instead of crashing.

How to repeat:
Might repeat if:

1) create a schema on the server
2) start qb
3) select (double-click) the schema from the list
[23 Oct 2006 8:05] Sveta Smirnova
Thank you for the report.

Please provide dump of structure (mysqldump -R --nodata database_name) of nss-mysql or mod_log_sql database.
[23 Oct 2006 15:21] Nicolas Laplante
Provided output of "mysqldump -R --no-data wwwlog"

Attachment: wwwlog_structure.sql (application/octet-stream, text), 6.13 KiB.

[29 Oct 2006 15:23] Tom Everett
I have the very same crash, on Windows XP.   I'll happily upload my schema, if I can get the right permissions. ;)
[29 Oct 2006 15:28] Tom Everett
I should add that this problem only started happening after upgrading the mysql server from mysql-5.0.24a to mysql-5.0.27.  Query browser 1.2.4 didn't crash when accessing 5.0.24a.
[29 Oct 2006 15:44] Nicolas Laplante
Problem happens in Administrator's Catalogs module too for the same schemas.

Server version is 5.0.26-log here.
[30 Oct 2006 14:20] Nicolas Laplante
Please note that when logged as root the problem doesn't show up
[30 Oct 2006 19:23] Sveta Smirnova
Please, provide output of SHOW GRANTS FOR user_you_connect_via_query_browser;
[30 Oct 2006 20:03] Tom Everett
bash-2.05b$ /home/mysql/bin/mysql -u wpms -p wpms
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 86746 to server version: 5.0.27

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show grants;
+-------------------------------------------------------------------------------------------------------------+
| Grants for wpms@localhost                                                                                   |
+-------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'wpms'@'localhost' IDENTIFIED BY PASSWORD '*ED66B866BA9209A25D88F27CDB422CAE80E71F7A' | 
| GRANT ALL PRIVILEGES ON `wpms`.* TO 'wpms'@'localhost'                                                      | 
+-------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> 

I'm not sure if it matters but when I connect to MySQL with the query browser, I'm not connecting from localhost.  MySQL is running on FreeBSD and the query browser is running on Windows XP.  The output above was generated on the FreeBSD box.
[30 Oct 2006 20:04] Tom Everett
The output generated by "show grants" in the query window of the query browser is:

'GRANT USAGE ON *.* TO 'wpms'@'%' IDENTIFIED BY PASSWORD '*ED66B866BA9209A25D88F27CDB422CAE80E71F7A''
'GRANT ALL PRIVILEGES ON `wpms`.* TO 'wpms'@'%''
[30 Oct 2006 20:40] Nicolas Laplante
Output of SHOW GRANTS FOR 'my_user'@'qb_i_connect_from':

mysql> SHOW GRANTS FOR 'nicolas'@'evolution';
+----------------------------------------------------------------------------------------------------------------+
| Grants for nicolas@evolution                                                                                   |
+----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'nicolas'@'evolution' IDENTIFIED BY PASSWORD '*7AB9FE29A0DA0C3F580579D68CF00971BCD94D9E' |
| GRANT ALL PRIVILEGES ON `wwwlog`.* TO 'nicolas'@'evolution'                                                    |
| GRANT ALL PRIVILEGES ON `jblog`.* TO 'nicolas'@'evolution'                                                     |
| GRANT ALL PRIVILEGES ON `test`.* TO 'nicolas'@'evolution'                                                      |
| GRANT ALL PRIVILEGES ON `nss`.* TO 'nicolas'@'evolution'                                                       |
| GRANT ALL PRIVILEGES ON `mprisme`.* TO 'nicolas'@'evolution'                                                   |
+----------------------------------------------------------------------------------------------------------------+
6 rows in set (0.00 sec)
[30 Oct 2006 21:09] Sveta Smirnova
Thank you for the report.

Verified as described.

To repeat create database wwwlog, then create user nicolas with rights Nicolas Laplante provided and connect to the database using just created user.
[31 Oct 2006 20:54] Nicolas Laplante
I just tried with the new mysql-gui-tools-5.0-r5 and the problems still happens. QB version in this package is 1.2.5 beta.
[17 Nov 2006 13:57] Mike Lischke
I cannot reproduce this problem as described here and with the given script. So this might well have been solved already. Please try the next bug fix release which is due within the next couple days.

Interesting is that because of the definer root@evolution QB cannot show the content of any of the functions (nicolas has no rights for this). So the output might be a bit surprising for the unprepared. Still, this does not lead to an access violation, whatsoever.
[25 Nov 2006 0:06] Nicolas Laplante
Tried version 1.2.6  beta from the mysql-gui-tools-5.0-r6. Same problem, but now it does it with information_schema and schemas  which worked before.  Additionaly, it's very hard to use any menu items, as the menus close  0.5s after I click them.
[27 Nov 2006 19:32] Sveta Smirnova
Tested using version 1.2.6 with same result: can SELECT from INFORMATION_SCHEMA and crash after selecting wwwlog database.
[28 Nov 2006 12:17] Nicolas Laplante
As root, I deleted the nicolas account and re-created it from scratch. Now the INFORMATION_SCHEMA works fine, but wwwlog still crashes.
[28 Nov 2006 14:52] Mike Lischke
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[7 Dec 2006 10:38] MySQL Verification Team
Bug http://bugs.mysql.com/bug.php?id=24825 was marked as duplicate of
this one.