From afe9738efb8d9704b66f6b7cea57ccb011d79a1a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 5 May 2003 14:52:39 +0300 Subject: Fixed that reading a DATE string of 000000 is interpreted as 0000-00-00 instead of 2000-00-00 sql/time.cc: Removed not used code Fixed that reading a DATE string of 000000 is interpreted as 0000-00-00 instead of 2000-00-00 --- mysql-test/r/loaddata.result | 11 +++++++++++ mysql-test/std_data/loaddata1.dat | 3 +++ mysql-test/t/loaddata.test | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100644 mysql-test/r/loaddata.result create mode 100644 mysql-test/std_data/loaddata1.dat create mode 100644 mysql-test/t/loaddata.test (limited to 'mysql-test') diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result new file mode 100644 index 00000000000..d121a4e6c40 --- /dev/null +++ b/mysql-test/r/loaddata.result @@ -0,0 +1,11 @@ +drop table if exists t1; +create table t1 (a date, b date, c date not null, d date); +load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +SELECT * from t1; +a b c d +0000-00-00 NULL 0000-00-00 0000-00-00 +0000-00-00 0000-00-00 0000-00-00 0000-00-00 +2003-03-03 2003-03-03 2003-03-03 NULL +2003-03-03 2003-03-03 2003-03-03 NULL +drop table t1; diff --git a/mysql-test/std_data/loaddata1.dat b/mysql-test/std_data/loaddata1.dat new file mode 100644 index 00000000000..c9e8549b211 --- /dev/null +++ b/mysql-test/std_data/loaddata1.dat @@ -0,0 +1,3 @@ +,\N,NULL,, +00,0,000000,, +2003-03-03, 20030303,030303,\N diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test new file mode 100644 index 00000000000..ceb5c47af11 --- /dev/null +++ b/mysql-test/t/loaddata.test @@ -0,0 +1,11 @@ +# +# Some simple test of load data +# + +drop table if exists t1; + +create table t1 (a date, b date, c date not null, d date); +load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +SELECT * from t1; +drop table t1; -- cgit v1.2.1