List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 18 2002 8:12pm
Subject:Re: LOAD DATA, \N, and auto_increment
View as plain text  
>On Sun 2002-08-18 at 18:53:46 +0200, arjones@stripped wrote:
>>  To Whom it May Concern,
>>	I sincerely doubt it's relevant, but i'm running MySQL 3.23.52 on
>>	Linux 2.4.18 (RedHat build 5). Client and server are on the 
>>same machine
>>  and communicate via a Unix domain socket.
>>	Perhaps it is a conscious decision, but it would seem an odd one:
>>	When using LOAD DATA [LOCAL] INFILE, if the table has a column that is
>                   ^^^^^^^^
>\N means NULL with LOAD DATA. So you try to insert NULL values into a
>NOT NULL column. I find warnings about this quite reasonable.

I do too, but on the other hand, multi-row INSERT also reports info
including warnings and errors, and inserting NULL into an auto-increment
column isn't counted as a warning (I just tried it).  I guess that might
be considered inconsistent...

>	Benjamin.
>>  for that column, a warning is generated for every line inserted. Replacing
>>  \N with numbers in the infile gets rid of all warnings on import. Seems
>>  to be a matter of adding one little check to Field_longlong::store() in
>>, but i could be wrong. I strongly suspect that it is
>>  independant of integer size (e.g TINYINT, INT, BIGINT probably all
>>  behave the same way).
>>	Please send all replies to my personal address as well, as i am not
>>  subscribed to the list.

LOAD DATA, \N, and auto_incrementAndrew Rucker Jones18 Aug
  • Re: LOAD DATA, \N, and auto_incrementBenjamin Pflugmann18 Aug
    • Re: LOAD DATA, \N, and auto_incrementPaul DuBois19 Aug
    • Re: LOAD DATA, \N, and auto_incrementBenjamin Pflugmann19 Aug