[MDEV-5786] mysql_upgrade on galera replicates "alter table" on system tables Created: 2014-03-04  Updated: 2014-07-11  Resolved: 2014-07-11

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.35-galera
Fix Version/s: 5.5.39-galera, 10.0.13-galera

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: galera

Issue Links:
Relates
relates to MDEV-5116 MariaDB upgrade breaks replication Closed

 Description   

same as MDEV-5116 except for galera. Same of having alter table changes propagate.

A solution could be http://www.codership.com/wiki/doku.php?id=rolling_schema_upgrade RSU #2 - finter control



 Comments   
Comment by Daniel Black [ 2014-03-13 ]

The error on the "slave" db1 from the update on db3 is:

Mar 13 03:24:02 db1 mysqld: 140313  3:24:02 [ERROR] Slave SQL: Error 'Duplicate column name 'File_priv'' on query. Default database: 'mysql'. Query: 'ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL', Error_code: 1060
Mar 13 03:24:02 db1 mysqld: 140313  3:24:02 [Warning] WSREP: RBR event 1 Query apply warning: 1, 25
Mar 13 03:24:02 db1 mysqld: 140313  3:24:02 [Warning] WSREP: Ignoring error for TO isolated action: source: d0cc6c2f-aa5e-11e3-9913-b2cfc1030243 version: 3 local: 0 state: APPLYING flags: 65 conn_id: 12 trx_id: -1 seqnos (l: 42, g: 25, s: 24, d: 24, ts: 2287771695569)
Mar 13 03:24:02 db1 mysqld: 140313  3:24:02 [ERROR] Slave SQL: Error 'Duplicate column name 'Grant_priv'' on query. Default database: 'mysql'. Query: 'ALTER TABLE user add Grant_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add References_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Index_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL,add Alter_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL', Error_code: 1060
Mar 13 03:24:02 db1 mysqld: 140313  3:24:02 [Warning] WSREP: RBR event 1 Query apply warning: 1, 26
Mar 13 03:24:02 db1 mysqld: 140313  3:24:02 [Warning] WSREP: Ignoring error for TO isolated action: source: d0cc6c2f-aa5e-11e3-9913-b2cfc1030243 version: 3 local: 0 state: APPLYING flags: 65 conn_id: 12 trx_id: -1 seqnos (l: 43, g: 26, s: 25, d: 25, ts: 2287780573237)
 

Comment by Daniel Black [ 2014-03-14 ]

Actually a session desync in the mysql_upgrade program would be sufficient and therefore non-impacting.

SET wsrep_desync=ON
...
SET wsrep_desync=OFF

Comment by Daniel Black [ 2014-05-05 ]

I haven't totally checked this however a /etc/mysql/debian-start having --skip-write-binlog for mysql_upgrade/mysql_check may be sufficient

MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --skip-write-binlog"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf --skip-write-binlog"

Comment by Daniel Black [ 2014-05-09 ]

sorry to add another complication.

After updating a db its normally catching up in IST or SST on startup. As such as mysql_update from the debian script is run immediately its gets a wsrep not ready or similar error.

Comment by Nirbhay Choubey (Inactive) [ 2014-07-10 ]

http://lists.askmonty.org/pipermail/commits/2014-July/006315.html

Comment by Daniel Black [ 2014-07-11 ]

thank you. Looks sane. If I come up with the problem of my previous comment I'll put in a new bug report.

Comment by Jan Lindström (Inactive) [ 2014-07-11 ]

Ok to push, please check also 10.x Galera.

Comment by Nirbhay Choubey (Inactive) [ 2014-07-11 ]

Pushed to maria-5.5-galera, maria-10.0-galera.

Generated at Thu Feb 08 07:07:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.