diff options
author | evgen@moonbone.local <> | 2007-05-23 13:46:10 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2007-05-23 13:46:10 +0400 |
commit | 349f1023bfcf21d7bce453523d55f43f55af091d (patch) | |
tree | 1b70bd1e5505075b711cb82eaf168252153c30ea /mysql-test/r/alter_table.result | |
parent | 8ae4ebbaa4e1b1ea28630c104bc48d56294af01a (diff) | |
parent | debb054d4a155a8d70f3431cd281901fd210a98e (diff) | |
download | mariadb-git-349f1023bfcf21d7bce453523d55f43f55af091d.tar.gz |
Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
Diffstat (limited to 'mysql-test/r/alter_table.result')
-rw-r--r-- | mysql-test/r/alter_table.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 4481b56791f..3fa12f2997a 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -846,6 +846,25 @@ id 50 51 drop table t1; +set @orig_sql_mode = @@sql_mode; +set sql_mode="no_zero_date"; +create table t1(f1 int); +alter table t1 add column f2 datetime not null, add column f21 date not null; +insert into t1 values(1,'2000-01-01','2000-01-01'); +alter table t1 add column f3 datetime not null; +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'f3' at row 1 +alter table t1 add column f3 date not null; +ERROR 22007: Incorrect date value: '0000-00-00' for column 'f3' at row 1 +alter table t1 add column f4 datetime not null default '2002-02-02', +add column f41 date not null; +ERROR 22007: Incorrect date value: '0000-00-00' for column 'f41' at row 1 +alter table t1 add column f4 datetime not null default '2002-02-02', +add column f41 date not null default '2002-02-02'; +select * from t1; +f1 f2 f21 f4 f41 +1 2000-01-01 00:00:00 2000-01-01 2002-02-02 00:00:00 2002-02-02 +drop table t1; +set sql_mode= @orig_sql_mode; create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; |