diff options
author | unknown <igor@olga.mysql.com> | 2007-05-08 17:50:19 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-05-08 17:50:19 -0700 |
commit | 0ba14149aade1857b97ac61e34823aa589a152b2 (patch) | |
tree | a538488e0ace77bbd2a40d64e1135135cbb37fec /mysql-test/t/loaddata.test | |
parent | a15fe8d972c7feb1c8eb940f8cd43c75f1256896 (diff) | |
parent | c863f1eeb6288527ffdb298e14e25506310f0adf (diff) | |
download | mariadb-git-0ba14149aade1857b97ac61e34823aa589a152b2.tar.gz |
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.1-opt
mysql-test/t/loaddata.test:
Auto merged
sql/sql_load.cc:
Auto merged
mysql-test/r/loaddata.result:
SCCS merged
Diffstat (limited to 'mysql-test/t/loaddata.test')
-rw-r--r-- | mysql-test/t/loaddata.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 6a6e59f6173..ba0edc341b0 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -156,6 +156,32 @@ select * from t2; --exec rm $MYSQLTEST_VARDIR/tmp/t1 SET @@SQL_MODE=@OLD_SQL_MODE; drop table t1,t2; + +# +# Bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a +# TIMESTAMP field when no value has been provided. +# +create table t1(f1 int, f2 timestamp not null default current_timestamp); +create table t2(f1 int); +insert into t2 values(1),(2); +disable_query_log; +eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1; +enable_query_log; +select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +--exec rm $MYSQLTEST_VARDIR/tmp/t2 +delete from t1; +disable_query_log; +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2' +FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' +FROM t2; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1 +FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; +enable_query_log; +select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +--exec rm $MYSQLTEST_VARDIR/tmp/t2 +drop table t1,t2; + # End of 5.0 tests |