Bug #5108 Problem with integer to string conversion when function LEFT() is used.
Submitted: 19 Aug 2004 13:34 Modified: 19 Aug 2004 14:36
Reporter: Viktor Kaydalov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.3b OS:Windows (Win32)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[19 Aug 2004 13:34] Viktor Kaydalov
Description:
Probably problem with integer to string conversion when function LEFT() is used.

How to repeat:
CREATE TABLE `table1` (`ID` int(11) default NULL,`SUM` int(11) default NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;

insert into table1 values (1000,5),(1000,5),(2000,6),(2000,6);

select * from table1 where left(id,1)=1;

Error Code : 2013
Lost connection to MySQL server during query
(6640 ms taken)

MySQL Server goes down...
[19 Aug 2004 14:36] Ramil Kalimullin
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.

Additional info:

Tested against the latest 4.1. No crash.
Probably it's similar to bug#4878 ('Service crashes on query execution').