mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
11
mysql-test/r/loaddata.result
Normal file
11
mysql-test/r/loaddata.result
Normal file
@ -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;
|
3
mysql-test/std_data/loaddata1.dat
Normal file
3
mysql-test/std_data/loaddata1.dat
Normal file
@ -0,0 +1,3 @@
|
||||
,\N,NULL,,
|
||||
00,0,000000,,
|
||||
2003-03-03, 20030303,030303,\N
|
11
mysql-test/t/loaddata.test
Normal file
11
mysql-test/t/loaddata.test
Normal file
@ -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;
|
Reference in New Issue
Block a user