0

MySQL 5.5.32, MyISAM

A LOAD DATA INFILE statement usually executes and returns normally, succeeding at loading the data. On rare occasion it fails, returning a generic syntax error, always indicating the same character as the problem spot.

ERROR 1064 (42000) at line 36: You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the right syntax to 
use near 'ull, @field_name)' 

I have no reason to believe there is a syntax error because the large majority of the time it succeeds, and it always succeeds on MySQL 5.5.19 and other versions. So all of these details might be red herrings. But, for what it's worth, that line in the statement is

field_name = if(@field_name='None', null, @field_name);

The question is whether this is a known bug, or a theoretically explainable behavior, and not what the syntax error is. Are there conditions in a database, or perhaps a file or filesystem, that could generate the same generic syntax error inconsistently but persistently like this?

0

See if this works as a workaround:

field_name = NULLIF(@field_name, 'None');

Suggest upgrading to 5.6, though I doubt if something this obscure is fixed.

Also, you should change from MyISAM to InnoDB.

  • I have a couple options to work around it. What I really want to know is if what I'm reporting is even possible. In other words, what could cause a syntax error to appear nondeterministically (from the user's perspective)? – WAF Jan 19 '17 at 12:59
  • Yes, non-deterministic is bad. I don't have a solution or answer. And 5.5 is so old, I don't think it is worth filing a bug. So, my answer was aimed at changes that might avoid whatever the problem is. – Rick James Jan 19 '17 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.