Hi Sergei,

On 06/10/2015 06:47 PM, Sergei Golubchik wrote:
SET sql_mode='STRICT_ALL_TABLES';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a DECIMAL);
>> ...
INSERT INTO t1 VALUES(CAST('' AS DECIMAL));
ERROR 1292 (22007): Truncated incorrect DECIMAL value: ''

I think this is not OK.

I wrote an explicit CAST, so I expect:
- CAST to return 0 with a warning, like in #2
- INSERT to write 0 into the table normally, as I'm actually inserting
    the CAST result, which is 0.

Agree


I created a separate issue for this:

MDEV-8300 CAST('' AS DECIMAL) is too strict on INSERT in strict mode

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

Reply via email to