Bug #15615 SQLSTATE: HYT00 Native Error Code: 1265 when calling "Load infile"
Submitted: 9 Dec 2005 5:37 Modified: 28 May 2013 12:52
Reporter: Kevin xu Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51 OS:Windows (Win XP)
Assigned to: Bogdan Degtyariov CPU Architecture:Any

[9 Dec 2005 5:37] Kevin xu
Description:
After upgrading from 4.1 to 5.0, "load infile" commands fails when loading file into database. It seems to be OK to load small file, but for large file (e.g. a few KBytes), it will fail - See following error messages for details:

Error executing statement:[load data local infile 'cboe-tvolpc-20051208.csv' replace into table            PC_t fields terminated by ',' lin
rminated by '
'            (date,tc,tp,tt,tr)]
>--- ERROR -- RC = -1 Reported from \sql_load.c, line 120 ------------
Total Number of diagnostic records: 1949630464
         SQLSTATE: HYT00
Native Error Code: 1265
[MySQL][ODBC 3.51 Driver][mysqld-5.0.16-nt]Data truncated for column 'tr' at row 1

Appreciate any help on this issue.

How to repeat:
And large file will load data local infile should be able to reproduce the issue.
[9 Dec 2005 8:41] Valeriy Kravchuk
Thank you for a problem report. Can you, please, upload the table definition, exact statement used and the smallest possible file to load that demonstrates the problem? What exact version of Connector/ODBC do you use?
[9 Dec 2005 13:41] Kevin xu
database defination doesn't seem to be important, for example, in the case that I gave is that: date - DATE and tc,tp,tt,tr are all double. 1000 rows of these data would be enough to cause the error. 

As I indicated in the log, I was using ODBC 3.51. I have also tried ODBC 5.0 alpha, the problem is getting worse, 10 rows of data would cause the same error.

Again, I think this 5.0 problem, 4.1 works just fine.
[10 Dec 2005 9:20] Vasily Kishkin
I was not able to reproduce the bug. Probably I need your table definition and some example values. Could you please write here ?
[10 Dec 2005 22:16] Kevin xu
Here is the table that how I created. value of the data is not important - you can create a data file yourself with any valid value. You have to have at least a few hundreds rows in your data file.

CREATE TABLE PC_T
(
  date DATE NOT NULL,
  tc INTEGER,
  tp INTEGER,
  tt INTEGER,
  tr FLOAT(4,2),
	PRIMARY KEY (date)
);

create unique index PC_T_INDX on PC_T (date);
[11 Dec 2005 11:51] Vasily Kishkin
Sorry...I was not able to reproduce the bug. Could you please write here several rows from file ?
[11 Dec 2005 13:47] Kevin xu
Send me the file that you use, I'll tell you why you cannot reproduce the bug.
[11 Dec 2005 15:01] Vasily Kishkin
Just couple of rows. The file has huge size.

2005-12-10 1 2 3 4.56
2005-12-11 3 4 5 7.98
[11 Dec 2005 16:37] Kevin xu
data file

Attachment: cboe-tvolpc-20050923.csv (application/vnd.ms-excel, text), 19.96 KiB.

[11 Dec 2005 16:37] Kevin xu
Try the attached file.
[12 Dec 2005 18:50] Vasily Kishkin
I was not able to reproduce the bug with your file. I would like to notice that I used the next query:

LOAD DATA LOCAL INFILE 'C:/MySQL/BUGS/15615/cboe-tvolpc-20050923.csv.xls' INTO TABLE PC_T FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\r\n'

because file contains '\r\r\n' on the end of each line. Could you please write here your query ?
[14 Dec 2005 5:40] Kevin xu
my query is in the bug report.

Same query command seems to be fine when running on Query Browser. So this could be a ODBC bug. But I am using the same version of ODBC driver with MySQL 4.1, it also seems to be fine.

Wondering if there is anything special needs to setup between ODBC + MySQL 5.0?
[14 Dec 2005 18:07] Vasily Kishkin
Nothing special. Maybe you need to check ODBC options ? Could you please write here ODBC options ?
[15 Jan 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[15 Oct 2007 17:13] Susanne Ebrecht
Hi,

unfortunately this bug has had the wrong version number, I fixed it.

Please try to use our newest version MyODBC 5.1 and let us know, if the error still occurs.

Susanne
[16 Nov 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[28 May 2013 12:52] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.