Bug #10648 bug or feature?
Submitted: 15 May 2005 21:33 Modified: 16 May 2005 9:02
Reporter: ervin ruci Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S3 (Non-critical)
Version:server version: 4.1.7 OS:Linux (linux. redhat fedora 3.)
Assigned to: Sergei Golubchik

[15 May 2005 21:33] ervin ruci
Description:
mysql> Select storeid from store where storeid = '123ddd';
+---------+
| storeid |
+---------+
|     123 |
+---------+
1 row in set (0.00 sec)

| store |CREATE TABLE `store` (
  storeid` int(11) default NULL,
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |

How to repeat:
create a table with an integer column. select from it, by putting a number followed by characters. it will return a result if the integer part of your query matches a row.
[16 May 2005 0:44] Miguel Solorzano
Thank you for the bug report.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.12-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table store (storeid int);
Query OK, 0 rows affected (0.06 sec)

mysql> insert into store values (123);
Query OK, 1 row affected (0.03 sec)

mysql> Select storeid from store where storeid = '123ddd';
+---------+
| storeid |
+---------+
|     123 |
+---------+
1 row in set (0.03 sec)

mysql> Select storeid from store where storeid like '123ddd';
Empty set (0.01 sec)
[16 May 2005 9:02] Sergei Golubchik
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

see http://dev.mysql.com/doc/mysql/en/comparison-operators.html