Bug #30336 ALTER TABLE via QueryBrowser does not replicate
Submitted: 9 Aug 2007 16:02 Modified: 10 Sep 2007 7:45
Reporter: Robin Clarke Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:mysqld 5.0.38-Debian_1 OS:Linux (Debian)
Assigned to: CPU Architecture:Any

[9 Aug 2007 16:02] Robin Clarke
Description:
I have a database on server Alpha replicating to slave server Beta.  If I add a column to a table in the database using the Edit... button under the Schemata tab in the query browser - the statement it says it will carry out is:

ALTER TABLE `database`.`table` ADD COLUMN `newcolumn` SMALLINT(5) UNSIGNED NOT NULL AFTER `lastcolumn`
, ENGINE = MyISAM;

Then the new column is created in the table on server Alpha, but is not created on server Beta, though no error occurs in the replication status...

If I run the same command on the command line client, the column is created on both servers (so replication is working as expected).

This took us some time to work out why some changes to database layout were being replicated and some weren't, and as a result of which many errors regarding non existant columns occurred in the replication.

It would be very interesting to hear if there is a solution to this bug already, or if there is a good reason for this behavior.

How to repeat:
On any table in any MyISAM database (only engine tested) which is being replicated, create a new column using the 'Edit...' dropdown menu under the Schemata tab in the Query Browser.  E.g.:

ALTER TABLE `database`.`table` ADD COLUMN `newcolumn` SMALLINT(5) UNSIGNED NOT NULL AFTER `lastcolumn`
, ENGINE = MyISAM;

This column will be created on the Master but not on the Slave.
[9 Aug 2007 17:47] Sveta Smirnova
Thank you for the report.

Please indicate which version of MySQL Query Browser you use. Also please note: Query Browser shows error in status bar. Are you sure is doesn't show any error when you run problem query?
[10 Aug 2007 7:40] Robin Clarke
Hello Sveta,

The Query Browser version I was using was 1.2.8 beta on Windows.  As it was done with the "Edit..." dropdown menue, and following the graphical column editor, there was no output visible in the status bar.

Using vQuery Browser version 1.2.5 beta on Linux the problem did not occur.
[10 Aug 2007 7:45] Sveta Smirnova
Thank you for the feedback.

Please try with current version 1.2.12 and if problem still exists run also command "SHOW CREATE TABLE `database`.`table`" on master to we can be sure query on master succeed.
[10 Sep 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".