[MDEV-9490] MariaDB Galera Cluster does not enforce slave_type_conversions Created: 2016-01-29  Updated: 2018-02-16  Resolved: 2016-03-08

Status: Closed
Project: MariaDB Server
Component/s: Documentation, Galera
Affects Version/s: 10.2.13
Fix Version/s: 10.0.25-galera

Type: Bug Priority: Major
Reporter: Guillaume Lefranc Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: Documentation
Environment:

CentOS 6


Issue Links:
Relates
relates to MDEV-15309 MariaDB-server w/ Galera not enforcin... Closed

 Description   

Test case on two node cluster:

-- On node 1
set global slave_type_conversions='ALL_LOSSY';
create table testconv (id int primary key);
set wsrep_osu_method='RSU';
alter table testconv modify column id bigint unsigned;
set wsrep_osu_method='TOI';
-- On node 2
insert into testconv values(1);

Failure on node 1:

160129  9:51:46 [ERROR] Slave SQL: Column 0 of table 'test.testconv' cannot be converted from type 'int' to type 'bigint(20) unsigned', Internal MariaDB error code: 1677
160129  9:51:46 [Warning] WSREP: RBR event 3 Write_rows_v1 apply warning: 3, 11
160129  9:51:46 [Warning] WSREP: Failed to apply app buffer: seqno: 11, status: 1



 Comments   
Comment by Nirbhay Choubey (Inactive) [ 2016-03-04 ]

This issue also affects traditional replication.

Comment by Stefan Midjich [ 2016-03-04 ]

Not sure if I have the same issue.

Variable_name Value
slave_type_conversions  
wsrep_osu_method TOI

I was doing an alter table to change varchar(16) to varchar(32) on mariadb 10.1 using innodb. The table was about 50 million lines.

It was blocking connections so I stupidly aborted the query on master01. Master02 continued the query as system user so I could not kill it.

I took master01 out of cluster, let master02 continue and was planning on using master02 as donor when it had finished.

All worked well until progress of alter table query was at around 55.000 and then this error was logged and the node went down.

After that I had to restore the node with the most recent data with wsrep-new-cluster and restore the cluster.

{{[ERROR] Slave SQL: Column 7 of table 'netadmin_logging.sla_acct' cannot be converted from type 'varchar(16)' to type 'varchar(32)', Internal MariaDB error code: 1677
[Warning] WSREP: RBR event 2 Write_rows_v1 apply warning: 3, 65437549
[Warning] WSREP: Failed to apply app buffer: seqno: 65437549, status: 1
...
[ERROR] WSREP: Node consistency compromized, aborting...}}

Comment by Nirbhay Choubey (Inactive) [ 2016-03-08 ]

Its an expected behavior. The KB entry has been updated to reflect the correct behavior.

https://mariadb.com/kb/en/mariadb/replication-and-binary-log-server-system-variables/#slave_type_conversions

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