Bug #933 Query Cache Wrong Result (Case)
Submitted: 26 Jul 2003 23:57 Modified: 1 Aug 2003 8:21
Reporter: Jeremy Cole (Basic Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.0 OS:Linux (Linux)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[26 Jul 2003 23:57] Jeremy Cole
Description:
Query cache returns an incorrect result due to case downconversion.

How to repeat:
mysql> create table qc_test (d datetime);
Query OK, 0 rows affected (0.03 sec)

mysql> insert into qc_test (d) values (now());
Query OK, 1 row affected (0.01 sec)

mysql> select date_format(d, "%m") from qc_test;
+----------------------+
| date_format(d, "%m") |
+----------------------+
| 07                   |
+----------------------+
1 row in set (0.00 sec)

mysql> select date_format(d, "%M") from qc_test;
+----------------------+
| date_format(d, "%m") |
+----------------------+
| 07                   |
+----------------------+
1 row in set (0.00 sec)

WRONG RESULT!!!  The above should be "July" as %M is Month NAME!
[27 Jul 2003 1:26] Sergei Golubchik
mysql> select "aaa" from qc_test;
+-----+
| aaa |
+-----+
| aaa |
+-----+
1 row in set (0.00 sec)

mysql> select "AAA" from qc_test;
+-----+
| aaa |
+-----+
| aaa |
+-----+
1 row in set (0.00 sec)
[28 Jul 2003 8:34] Oleksandr Byelkin

 
[28 Jul 2003 9:30] Oleksandr Byelkin
ChangeSet 
  1.1589 03/07/28 18:28:44 bell@sanja.is.com.ua +3 -0 
  tabe & query hashes made case insensitive (BUG#933)
[1 Aug 2003 8:21] Oleksandr Byelkin
thank you for bug report. fix for this bug already pushed into internal 
repository and will be avaliable in next release.