• unknown's avatar
    Bug#28158 - table->read_set is set incorrectly, · afbac007
    unknown authored
            causing wrong error message in Falcon
    
    An error message about a duplicate key could show a wrong key
    value when not all columns of the key were used to select the
    rows for update.
    
    Some storage engines return a record with only the selected
    columns filled.
    
    This is fixed by re-reading the record with a read_set which
    includes all columns of the duplicate key after a duplicate key
    error happens and before the error message is printed.
    
    
    mysql-test/r/ndb_update.result:
      Bug#28158 - table->read_set is set incorrectly,
                  causing wrong error message in Falcon
      Added test result.
    mysql-test/t/ndb_update.test:
      Bug#28158 - table->read_set is set incorrectly,
                  causing wrong error message in Falcon
      Added test from falcon_bug_28158.
    sql/sql_update.cc:
      Bug#28158 - table->read_set is set incorrectly,
                  causing wrong error message in Falcon
      Added a function for re-reading a record with a read_set
      that contains all fields used by a duplicate key.
      Called the function before every call to handler::print_error(),
      which could print a duplicate key value.
    afbac007
ndb_update.result 1.94 KB