Bug #8636 SQL in Query Browser gives different (& wrong) result - compared to Contrl Cntr
Submitted: 20 Feb 2005 19:18 Modified: 21 Feb 2005 7:52
Reporter: zack kazawski Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.1.2 OS:Windows (WinXP (no Service Packs))
Assigned to: CPU Architecture:Any

[20 Feb 2005 19:18] zack kazawski
Description:
I executed a simple SQL statements as you can see in this screenshot and the 'MySQL Query Browser' gave an absolutely wrong answer while 'MySQL Control Center' gave the correct result.

Versions:
MySQL Control Center: 0.9.4 Beta
MySQL Query Browser: 1.1.2
MySQL Server 4.1.7

Links:
http://blake.prohosting.com/~zsavic/mysql/info.jpg
http://blake.prohosting.com/~zsavic/mysql/info2.jpg

Z.

How to repeat:
set up an InnoDB table and run the same query (distinct) and watch the results.

The distinct did not return 'distinct' values regardless whether I chose 'year' or 'ssn' for the query (ssn is a varchar(9) column while a_year is a smallint(5) unsigned). I can provide an export of this table and see if anyone else gets this result. The has imaginary data created for my school project.

Suggested fix:
No idea.
[20 Feb 2005 19:31] zack kazawski
The screenshots are not easily viewable - must first visit directory:

http://blake.prohosting.com/~zsavic/mysql/

and then click on each link individually.

Thanks.
[20 Feb 2005 20:56] Aleksey Kishkin
I tested it against  mysql 4.1.9 and query browser 1.1.5

created table 

mysql> create table bug8636 (i smallint(5)) type=innodb;
Query OK, 0 rows affected, 1 warning (0.27 sec)

mysql> insert into bug8636 values (1),(1),(1),(3),(9);
Query OK, 5 rows affected (0.09 sec)
Records: 5  Duplicates: 0  Warnings: 0

mysql> select distinct i from bug8636;
+------+
| i    |
+------+
|    1 |
|    3 |
|    9 |
+------+
3 rows in set (0.08 sec)

and then I tested this query in mysql query browser and got right result. Could you please put into 'files' section the export and strucure of your table, that we will be able to test it more thoroughly
[21 Feb 2005 1:29] zack kazawski
I think I found the solution for this - the error only occurs on version 1.1.2 (at least confirmed).

After Aleksey said that 1.1.5 gave no problems I downloaded it (the Win version without installer) and I ran it. The next screenshot shows that Aleksey was correct.

http://blake.prohosting.com/~zsavic/mysql/
then select 
info3.jpg
[21 Feb 2005 7:52] Aleksey Kishkin
Ok, then I close this bug report