* fix for ALTER TABLE ... MODIFY timestamp->timestamp.

Use dedicated  do_field_temporal() for Copy_field.
* check_time_range() needs to know TIME's precision to use the
  correct max value.
This commit is contained in:
Sergei Golubchik 2011-03-17 14:13:03 +01:00
commit 1cda265457
7 changed files with 37 additions and 11 deletions

View file

@ -86,9 +86,9 @@ create table t1 (f1 timestamp(6));
insert into t1 values ('2002-07-15 21:00:00');
select time(f1) from t1;
select time(f1) from t1 union all select time(f1) from t1;
#alter table t1 modify f1 timestamp;
#select time(f1) from t1;
#select time(f1) from t1 union all select time(f1) from t1;
alter table t1 modify f1 timestamp;
select time(f1) from t1;
select time(f1) from t1 union all select time(f1) from t1;
# but the effect cannot be eliminated completely:
alter table t1 modify f1 varchar(100);
select time(f1) from t1;