Bug #61602 tolower() in where clause returns wrong value for column
Submitted: 23 Jun 2011 3:44 Modified: 23 Jun 2011 3:52
Reporter: Howard Cary Morris Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S2 (Serious)
Version:5.0.91 OS:Any
Assigned to: CPU Architecture:Any

[23 Jun 2011 3:44] Howard Cary Morris
Description:
Have select statement "select * from vendor_m where lower(co_name) = '$temp'";
statement retrieves correct row, but returns column Co_Name in lower case. I could do a workaround, but do not like extra code or unnecessary disk space.

How to repeat:
Probably does the same for any database as long as you picked a column value that was not already all lowercase.

Suggested fix:
? make sure that when using column values to satisfy the WHERE clause does not alter the column values retrieved from the database.
[23 Jun 2011 3:47] Valeriy Kravchuk
Please, send the output of:

show create table vendor_m\G
[23 Jun 2011 3:52] Howard Cary Morris
I must have changed the code inadvertently.
Working fine now.