• unknown's avatar
    Bug#27586: Wrong autoinc value assigned by LOAD DATA in the · 398b21a3
    unknown authored
    NO_AUTO_VALUE_ON_ZERO mode.
    
    The table->auto_increment_field_not_null variable wasn't reset after
    reading a row which may lead to inserting a wrong value to the auto-increment
    field to the following row.
    
    The table->auto_increment_field_not_null variable is reset now right after a
    row is being written in the read_fixed_length() and the read_sep_field()
    functions.
    Removed wrong setting of the table->auto_increment_field_not_null variable in
    the read_sep_field() function.
    
    
    mysql-test/t/loaddata.test:
      Added a test case for the bug#27586: Wrong autoinc value assigned by LOAD DATA in the
      NO_AUTO_VALUE_ON_ZERO mode.
    mysql-test/r/loaddata.result:
      Added a test case for the bug#27586: Wrong autoinc value assigned by LOAD DATA in the
      NO_AUTO_VALUE_ON_ZERO mode.
    sql/sql_load.cc:
      Bug#27586: Wrong autoinc value assigned by LOAD DATA in the
      NO_AUTO_VALUE_ON_ZERO mode.
      The table->auto_increment_field_not_null variable is reset now right after a
      row is being written in the read_fixed_length() and the read_sep_field()
      functions.
      Remove wrong setting of the table->auto_increment_field_not_null variable in
      the read_sep_field() function.
    398b21a3
loaddata.test 5.32 KB