Bug #39553 SELECT COUNT(*) inconsistent when using upper case/lower case
Submitted: 20 Sep 2008 8:18 Modified: 22 Sep 2008 10:17
Reporter: vha x Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.28 OS:Windows
Assigned to: CPU Architecture:Any

[20 Sep 2008 8:18] vha x
Description:
There is something really odd with the attached script, which seems to show that MySQL is case sensitive in the SELECT statements?!

The 1st SELECT COUNT(*) returns 0 while one should expect 1.

I tried to further simplify the attached script but every time I change the name of the table or database, the odd result disappears...

To repeat the problem, just copy/paste the attached SQL script in the MySQL browser and execute 1 line after the other.

You will notice that the 1st SELECT COUNT(*) will return 0.

How to repeat:
USE mysql;
DROP DATABASE IF EXISTS dt4ed0701JPM;
CREATE DATABASE `dt4ed0701JPM`;
USE dt4ed0701JPM;
CREATE TABLE DT_Filter ( MyID INTEGER );
CREATE INDEX MyIndex ON DT_Filter (MyID);
SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = 'dt4ed0701JPM' AND INDEX_NAME = 'MyIndex';
SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = 'dt4ed0701jpm' AND INDEX_NAME = 'MyIndex';
SELECT * FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = 'dt4ed0701JPM';
[22 Sep 2008 9:22] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with current development sources, although bug is repeatable with version 5.1.28. Please wait next release.
[22 Sep 2008 10:17] vha x
If this behavior is repeatable in the latest official build, shouldn't the status then be something else than 'Can't repeat' (Open, confirmed, ...)?

'Can't repeat', to me means that the behavior can't be repeated in the latest version, not that it can't be repeated in some internal release.