~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/alter_table_basic.result

  • Committer: Jay Pipes
  • Date: 2009-01-30 04:01:12 UTC
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090130040112-svbn774guj98pwi4
To remain in compatibility with MySQL, added ability to interpret
decimal arguments as datetime strings for temporal functions.

Fixed YEAR(), MONTH(), DAYOFMONTH(), DAYOFYEAR(), HOUR(), MINUTE(), SECOND(), and MICROSECOND()
to accept decimal parameters and interpret them the same way as MySQL.

Fixed an issue with the TemporalFormat::matches() method which was 
incorrectly assuming all microsecond arguments were specified as 6 digits.
Added power of 10 multiplier to usecond calculation. This fixes issues with
failures in type_date and func_sapdb test cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
create table t1 (v varchar(32) not null);
2
 
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
3
 
select * from t1;
4
 
v
5
 
3r4f
6
 
abc
7
 
def
8
 
hij
9
 
alter table t1 change v v2 varchar(32);
10
 
select * from t1;
11
 
v2
12
 
3r4f
13
 
abc
14
 
def
15
 
hij
16
 
alter table t1 change v2 v varchar(64);
17
 
select * from t1;
18
 
v
19
 
3r4f
20
 
abc
21
 
def
22
 
hij
23
 
update t1 set v = 'lmn' where v = 'hij';
24
 
select * from t1;
25
 
v
26
 
3r4f
27
 
abc
28
 
def
29
 
lmn
30
 
alter table t1 add i int auto_increment not null primary key first;
31
 
select * from t1;
32
 
i       v
33
 
1       def
34
 
2       abc
35
 
3       lmn
36
 
4       3r4f
37
 
update t1 set i=5 where i=3;
38
 
select * from t1;
39
 
i       v
40
 
1       def
41
 
2       abc
42
 
4       3r4f
43
 
5       lmn
44
 
alter table t1 change i i bigint;
45
 
select * from t1;
46
 
i       v
47
 
1       def
48
 
2       abc
49
 
4       3r4f
50
 
5       lmn
51
 
alter table t1 add unique key (i, v);
52
 
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
53
 
i       v
54
 
4       3r4f
55
 
drop table t1;