Bug #22423 "WHERE" give result when first chars on a string are digits
Submitted: 17 Sep 2006 5:35 Modified: 18 Sep 2006 7:55
Reporter: David Almeida Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.13 OS:Apache
Assigned to: CPU Architecture:Any
Tags: digits, first, where

[17 Sep 2006 5:35] David Almeida
Description:
When I make this "SELECT user_id FROM nuke_users WHERE username=998" it give me results for records that have "username" like:

998abcd
998ydsfkjlsdf
998xxxxxx

it won't produce result for:

998545jjjj
9989999
998000

This just happens, if digits are the first chars. Does not happen if letters are the first chars on the field.

David Almeida

How to repeat:
Create a number of records where you have some strings that start with digits.
then made a select like the one above where the search string contains only the first chars that match with the digits of one of the strings that you have inserted before.
[18 Sep 2006 7:55] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

See also http://dev.mysql.com/doc/refman/4.1/en/type-conversion.html