| Bug #29130 | TRUNCATE misimplemented with row-based logging | ||
|---|---|---|---|
| Submitted: | 15 Jun 2007 9:13 | Modified: | 23 Jun 2007 10:28 |
| Reporter: | Mats Kindahl | ||
| Status: | Closed | ||
| Category: | Server: General | Severity: | S2 (Serious) |
| Version: | 5.1 | OS: | Any |
| Assigned to: | Mats Kindahl | Target Version: | |
[15 Jun 2007 9:13]
Mats Kindahl
[15 Jun 2007 13:51]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/28860 ChangeSet@1.2556, 2007-06-15 13:50:56+02:00, mats@kindahl-laptop.dnsalias.net +1 -0 BUG#29130 (The logic for using delete_all_rows() is wrong): Correcting the logic for deciding when to use delete_all_rows() so that the behavior of TRUNCATE to not be dependent on binary logging format in effect. A TRUNCATE statement is always logged as a statement, so in this case, delete_all_rows() can always be used provided the other logic is correct. If a DELETE FROM without a WHERE clause is used, and row-based binlogging is used, the rows has to be deleted from the table on a per-row basis.
[21 Jun 2007 22:15]
Bugs System
Pushed into 5.1.20-beta
[23 Jun 2007 10:28]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of
that product and will be incorporated into the next release.
If necessary, you can access the source repository and build the latest available
version, including the bug fix. More information about accessing the source trees is
available at
http://dev.mysql.com/doc/en/installing-source.html
Documented bugfix in 5.1.20 changelog as:
The <literal>TRUNCATE</literal> statement was handled
differently by the server when row-based logging was in
effect, even though the binlogging format in effect does not
effect the fact that <literal>TRUNCATE</literal> is always
logged as a statement.
Updated synopsis.
