Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

bschoate (202)

bschoate
  (email not shown publicly)
http://www.bradchoate.com/
+ -

  Comment: MySQL is just trying to cater to us scripting folk (Score 1) on 2009.02.25 17:18

by bschoate on 2009.02.25 17:18 (#67621)
Attached to: MySQL Stupidity

For instance...

perl -wle "print '111|1' == 111"

javascript:alert(parseInt("111|1"))

Granted, the perl example throws a warning, but it does evaluate that statement as true.

You may consider it a bug; others might consider it a feature. And if you were to change how "111|1" gets cast to a number, or return an error for comparing a varchar to a number, who knows what that would break/fix.

Incidentally, SQLite and PostgreSQL don't have this problem/feature.

Read More 4 comments
Comments: 4