Bug #6372 LOAD DATA INFILE
Submitted: 1 Nov 2004 20:28 Modified: 1 Nov 2004 21:26
Reporter: Oliver Peters Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.7 OS:Windows (Windows2000)
Assigned to: CPU Architecture:Any

[1 Nov 2004 20:28] Oliver Peters
Description:
loading a file with 1 integer column and 2 successive date columns (dates without separator) leads to an incorrect result for the 2nd date column

How to repeat:
Data-Source (example 1 line):
42138\t20020321\t20051231#(\t for TABULATOR)

Table:
CREATE TABLE `eh_url` (
  `KDNR` mediumint(5) unsigned NOT NULL default '0',
  `URL_VON` date NOT NULL default '0000-00-00',
  `URL_BIS` date NOT NULL default '0000-00-00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1';

BATCH-FILE:
mysql -v <"C:\\Programme\\MySQL\\MySQL Server 4.1\\scripts\\fruehremi\\alternat.txt"

alternat.txt
TRUNCATE TABLE frueh_neu.eh_url;
LOAD DATA INFILE 'C:\\Programme\\MySQL\\MySQL Server 4.1\\Import\\fruehremi\\check.txt'
INTO TABLE frueh_neu.eh_url
FIELDS TERMINATED BY '\t' ESCAPED BY '';
[1 Nov 2004 20:32] Oliver Peters
Sorry, I forgot, the false result is:

42138\t20020321\t0000-00-00
[1 Nov 2004 20:58] Oliver Peters
Sorry, it's just the DAU,

I've never had before a problem with linetermination:

LINES TERMINATED BY '\r\n';

is the solution
[1 Nov 2004 21:26] MySQL Verification Team
According bug reporter.