Bug #28244 | CREATE VIEW breaks replication when view exists | ||
---|---|---|---|
Submitted: | 4 May 2007 14:50 | Modified: | 6 Jun 2007 15:11 |
Reporter: | Baron Schwartz (Basic Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.0.38 | OS: | Linux (Gentoo) |
Assigned to: | Gleb Shchepa | CPU Architecture: | Any |
Tags: | binlog, qc, replication, VIEW |
[4 May 2007 14:50]
Baron Schwartz
[4 May 2007 18:50]
Sveta Smirnova
Thank you for the report. Verified as described. All versions are affected.
[29 May 2007 9:32]
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/27543 ChangeSet@1.2506, 2007-05-29 14:47:58+05:00, gshchepa@gleb.loc +3 -0 Fixed bug #28244. When the same VIEW was created at the master side twice, malformed (truncated after the word 'AS') query string as forwarded to client side, so error messages on the master and client was different, and replication was broken. The mysql_register_view() was failed too early: fields of `view' output argument of this function call was not filled yet with correct data. Checking of existence of VIEW .frm file has been moved down to the place, when `view' argument is completely filled with proper data.
[29 May 2007 9:41]
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/27546 ChangeSet@1.2506, 2007-05-29 14:57:00+05:00, gshchepa@gleb.loc +3 -0 Fixed bug #28244. When the same VIEW was created at the master side twice, malformed (truncated after the word 'AS') query string was forwarded to client side, so error messages on the master and client was different, and replication was broken. The mysql_register_view() functioin call was failed too early: fields of `view' output argument of this function was not filled yet with correct data required for query replication. Checking of existence of VIEW .frm file has been moved down to the place, when `view' argument is completely filled with proper data.
[31 May 2007 12:14]
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/27808 ChangeSet@1.2506, 2007-05-31 17:30:56+05:00, gshchepa@gleb.loc +3 -0 Fixed bug #28244. When the same VIEW was created at the master side twice, malformed (truncated after the word 'AS') query string was forwarded to client side, so error messages on the master and client was different, and replication was broken. The mysql_register_view function call failed too early: fields of `view' output argument of this function was not filled yet with correct data required for query replication. The mysql_register_view function also copied pointers to local buffers into a memory allocated by the caller.
[31 May 2007 21:07]
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/27849 ChangeSet@1.2515, 2007-06-01 02:25:11+05:00, gshchepa@gleb.loc +1 -0 sql_view.cc: Additional patch for bug #28244 to workaround valgrind warnings.
[4 Jun 2007 21:21]
Bugs System
Pushed into 5.1.20-beta
[4 Jun 2007 21:23]
Bugs System
Pushed into 5.0.44
[6 Jun 2007 15:11]
MC Brown
A note has been added to the 5.0.44 and 5.1.20 changelog.