Commit 214c43ba authored by Sergei Golubchik's avatar Sergei Golubchik

bugfix: storage engine might return a negative error code, but it shouldn't

be ignored on return
parent 38e2340a
...@@ -7531,11 +7531,13 @@ copy_data_between_tables(THD *thd, TABLE *from,TABLE *to, ...@@ -7531,11 +7531,13 @@ copy_data_between_tables(THD *thd, TABLE *from,TABLE *to,
AUTO_INCREMENT_FLAG)) AUTO_INCREMENT_FLAG))
err_msg= ER(ER_DUP_ENTRY_AUTOINCREMENT_CASE); err_msg= ER(ER_DUP_ENTRY_AUTOINCREMENT_CASE);
to->file->print_keydup_error(key_nr, err_msg, MYF(0)); to->file->print_keydup_error(key_nr, err_msg, MYF(0));
error= 1;
break; break;
} }
} }
to->file->print_error(error,MYF(0)); to->file->print_error(error,MYF(0));
error= 1;
break; break;
} }
to->file->restore_auto_increment(prev_insert_id); to->file->restore_auto_increment(prev_insert_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment