Bug #28914 | Alter table does not handle all error cases in statement commit | ||
---|---|---|---|
Submitted: | 6 Jun 2007 5:23 | Modified: | 15 Jun 2007 8:15 |
Reporter: | Jan Lindström | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.41 & 5.1.x | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution |
[6 Jun 2007 5:23]
Jan Lindström
[6 Jun 2007 11:38]
Sveta Smirnova
Thank you for the report. But error "alter table t0 add unique index abc (a)' failed: 1062: Duplicate entry '2' for key 1" is expected. Or do you want to handle this error inside the storage engine?
[6 Jun 2007 11:47]
Jan Lindström
My problem is that ha_enable_transactions calls ha_commit_stmt but does not update error in copy_data_between_tables. Following call to ha_commit_stmt and ha_commit do succeed. Thus, return value of the ha_enable_transactions should be stored. With provided proposed fix I get correct error, without it I don't see any errors.
[15 Jun 2007 8:15]
Sveta Smirnova
Thank you for the comment. This bug has been fixed by patch for Bug #28652. See also http://mysql.bkbits.net:8080/mysql-5.1/sql/sql_table.cc?PAGE=diffs&REV=1.239.55.1