• svoj@may.pils.ru's avatar
    BUG#14770 - LOAD DATA INFILE doesn't respect default values for · 6c6f435b
    svoj@may.pils.ru authored
                columns
    Fixed confusing warning.
    
    Quoting INSERT section of the manual:
    ----
    Inserting NULL into a column that has been declared NOT NULL. For
    multiple-row INSERT statements or INSERT INTO ... SELECT statements, the
    column is set to the implicit default value for the column data type. This
    is 0 for numeric types, the empty string ('') for string types, and the
    "zero" value for date and time types. INSERT INTO ... SELECT statements are
    handled the same way as multiple-row inserts because the server does not
    examine the result set from the SELECT to see whether it returns a single
    row. (For a single-row INSERT, no warning occurs when NULL is inserted into
    a NOT NULL column. Instead, the statement fails with an error.)
    ----
    This is also true for LOAD DATA INFILE. For INSERT user can specify
    DEFAULT keyword as a value to set column default. There is no similiar
    feature available for LOAD DATA INFILE.
    6c6f435b
view.result 80.5 KB