Trouble with surname "Null" and LOAD DATA INFILE
How can I prevent the string 'NULL' from being interpreted as a NULL value in the context of a SET clause of a LOAD DATA INFILE command? (Assigning to a nullable varchar column.)


Provide a FIELDS ENCLOSED BY from the docs


  If FIELDS ENCLOSED BY is not empty, a field containing the literal word NULL as its value is read as a NULL value. This differs from the word NULL enclosed within FIELDS ENCLOSED BY characters, which is read as the string 'NULL'.


Essentially if you set FIELDS ENCLOSED BY '"' then you can provide surname "Null", as "Null", and nulls as null (no quotes).