~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/strict.test

Phase 1 - temporal changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
drop table t1;
244
244
 
245
245
#
246
 
# Bug #5902: STR_TO_DATE() didn't give errors in traditional mode
247
 
#
248
 
 
249
 
create table t1 (col1 datetime);
250
 
--error 1292
251
 
insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i'));
252
 
--error 1411
253
 
insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
254
 
--error 1411
255
 
insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));
256
 
--error 1411
257
 
insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));
258
 
--error ER_TRUNCATED_WRONG_VALUE
259
 
insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i'));
260
 
--error ER_WRONG_VALUE_FOR_TYPE
261
 
insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
262
 
--error ER_WRONG_VALUE_FOR_TYPE
263
 
insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));
264
 
--error ER_WRONG_VALUE_FOR_TYPE
265
 
insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));
266
 
 
267
 
# Some correct values, just to test the functions
268
 
insert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i'));
269
 
insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r'));
270
 
insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T'));
271
 
 
272
 
select * from t1;
273
 
 
274
 
select count(*) from t1 where STR_TO_DATE('2004.12.12 10:22:61','%Y.%m.%d %T') IS NULL;
275
 
 
276
 
drop table t1;
277
 
 
278
 
#
279
246
# Check insert with wrong CAST() (Bug #5912)
280
247
#
281
248