On Thu, Jan 8, 2009 at 4:08 PM, Sheeri K. Cabral <[email protected]> wrote:

> On 1/8/09, Jay Pipes <[email protected]> wrote:
>
>> Would anyone have a problem if I converted the above to an error?
>> FROM_UNIXTIME() only takes unsigned integers in the range of 0 to INT32_MAX.
>>  It doesn't take strings, or strings that "look like numbers", or anything
>> of the sort.
>>
>> IMHO, the above behaviour is dangerous, as it:
>>
>> * Implicitly tries to convert a string to an integer (based on the
>> warning)
>> * Produces an invalid TIMESTAMP value
>> * Doesn't error, therefore giving the unassuming user the impression that
>> FROM_UNIXTIME() indeed takes string parameters.
>>
>> Anyone object to me making the above an error?
>
>
> No.  Please make this an error.  If you can find the code that does the
> implicit conversions of things like this and kill it, throwing an error
> instead, that'd be great.  Because MySQL says "aha, I can make this into a
> number, let's see, the first character is a digit, I can use that!  Same
> with the second, third and fourth -- AWESOME!  The 5th character...oops, not
> a digit, no worry, I have a number, I'll just use that instead!"
>

+1

Jeremy
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to