Bug #4707 GLib Error executing a query
Submitted: 22 Jul 2004 20:42 Modified: 18 Aug 2004 8:27
Reporter: Bob Dankert Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.0.3a OS:Windows (XP SP2)
Assigned to: Alfredo Kojima CPU Architecture:Any

[22 Jul 2004 20:42] Bob Dankert
Description:
The error (see attached file) occured while executing the following query (keep in mind this query is incorrect, however the error still should not occur)

select <long list of columns> from folders,permissions,membership where folders.parent = 0 and folders.id = permissions.id and permissions.pview = '1' and (permissions.userid = 4 or (permissions.groupid = membership.groupid and membership.userid = 4)) orderby folders.sortorder;

How to repeat:
As above
[22 Jul 2004 20:43] Bob Dankert
Error

Attachment: error.JPG (image/pjpeg, text), 8.88 KiB.

[22 Jul 2004 20:43] Bob Dankert
Modified synopsis
[23 Jul 2004 1:01] Matthew Lord
this doesn't appear to be a bug at first glance unless it was trying to allocate over 4GB in 
memory unnecessarily.  What happens when you execute this query using the text client?

Best Regards
[23 Jul 2004 16:52] Bob Dankert
Actually the query runs fine in the command line, runs fine in an ODBC connection, and runs fine in MySQL Control Center.  Trying to run it in Query Browser results in the error mentioned, however.  It only returns 16 results.  Here is the updated query I tested everything with:

SELECT folders.caption,folders.userid,folders.formid,folders.source,folders.filter,folders.authlevel,folders.parent,folders.sortorder,folders.sortby,folders.sortasc,folders.rowlimit,folders.id,folders.useadvanced,folders.advtable,folders.advgroupby,folders.advcolumns,folders.advcolumnid FROM folders,permissions WHERE folders.parent = 86 and folders.id = permissions.folderid and permissions.pview = '1' and (permissions.userid = 4 or permissions.groupid in (select groupid from membership where userid = 4)) GROUP BY folders.id ORDER BY folders.sortorder;
[23 Jul 2004 16:53] Bob Dankert
I should clarify when I said 'it only returns 16 results'.  This is all that is supposed to be returned by the query, and is returned properly in that list of working programs.  In Query Browser it crashes right away, returning nothing except an error and exiting the program.
[23 Jul 2004 17:17] Matthew Lord
Hi Bob,

Could you provide me with a dump of the folders and permissions table so that I can try and 
repeeat the problem?  If it is too large you can put it on ftp.mysql.com using the anonymous
account.

Best Regards
[23 Jul 2004 17:25] Bob Dankert
I emailed the tables to you (mlord@mysql.com)
[24 Jul 2004 1:57] Alfredo Kojima
I've tried reproducing it in Linux with the provided dump and it simply returned an empty resultset.
Running the same query from the command-line client also returns no values.
Might be something Windows specific.
[25 Jul 2004 0:47] Michael G. Zinner
There is a different reason for the glib error we haven't found yet. The problem is, that it doesn't occure every time but once in a while.
We will put more reseach in this one.
[26 Jul 2004 23:29] Matthew Lord
I'll attach the dump for the tables needed to run this query and reproduce the error.
[18 Aug 2004 8:27] Alfredo Kojima
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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html