329
329
select * from t1;
330
330
charcol varcharcol varbinarycol
332
create table t1 (col1 datetime);
333
insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i'));
334
ERROR 22007: Truncated incorrect datetime value: '31.10.2004 15.30 abc'
335
insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
336
ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
337
insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));
338
ERROR HY000: Incorrect time value: '22:22:33 AM' for function str_to_date
339
insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));
340
ERROR HY000: Incorrect time value: 'abc' for function str_to_date
341
insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i'));
342
ERROR 22007: Truncated incorrect datetime value: '31.10.2004 15.30 abc'
343
insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
344
ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
345
insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));
346
ERROR HY000: Incorrect time value: '22:22:33 AM' for function str_to_date
347
insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));
348
ERROR HY000: Incorrect time value: 'abc' for function str_to_date
349
insert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i'));
350
insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r'));
351
insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T'));
357
select count(*) from t1 where STR_TO_DATE('2004.12.12 10:22:61','%Y.%m.%d %T') IS NULL;
361
Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
362
Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
363
Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
365
332
create table t1 (col1 char(3), col2 integer);
366
333
insert into t1 (col1) values (cast(1000 as char(3)));
367
334
ERROR 22007: Truncated incorrect CHAR(3) value: '1000'