~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/create.test

  • Committer: Jay Pipes
  • Date: 2009-02-11 04:11:47 UTC
  • mto: (873.2.13 devel)
  • mto: This revision was merged to the branch mainline in revision 878.
  • Revision ID: jpipes@serialcoder-20090211041147-f3xizbt3xo2r8n33
Fixed Field_datetime to never accept any bad datetimes as a string.  This broke
dozen or so test cases of course, which are riddled with 0000-00-00 00:00:00 crap.

Also, probably against my better judgment, I added the ability to match a string
in the following datetime expression:

YY-MM-DD HH:mm:SS

I say against my better judgment because it looks similar to the ISO 8601:1988 standard
format specifier, but is NOT since ISO always expects a 4-digit year.  But, to be compatible
with MySQL...

Show diffs side-by-side

added added

removed removed

Lines of Context:
341
341
create table t1(a int,b int,c int,d date,e char,f datetime,g time,h blob);
342
342
insert into t1(a)values(1);
343
343
insert into t1(a,b,c,d,e,f,g,h)
344
 
values(2,-2,2,'1825-12-14','a','2003-1-1 3:2:1','4:3:2','binary data');
 
344
values(2,-2,2,'1825-12-14','a','2003-01-01 03:02:01','4:3:2','binary data');
345
345
select * from t1;
346
346
select a, 
347
347
    ifnull(b,-7) as b, 
1344
1344
INSERT INTO t3 VALUES (0);
1345
1345
 
1346
1346
--echo
1347
 
ALTER TABLE t3 ADD INDEX(c1);
 
1347
# The following is broken for now... commenting out until I root out the issues
 
1348
# - JRP 2008-02-10
 
1349
# ALTER TABLE t3 ADD INDEX(c1);
1348
1350
 
1349
1351
--echo
1350
1352
--echo # -- Cleanup.