[MDEV-31136] Online ALTER is allowed on master but fails on slave with ER_ALTER_OPERATION_NOT_SUPPORTED_REASON Created: 2023-04-26  Updated: 2024-01-01  Resolved: 2024-01-01

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Replication
Affects Version/s: N/A
Fix Version/s: 11.2.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Nikita Malyavin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-31058 ER_KEY_NOT_FOUND upon concurrent CHAN... Closed
Problem/Incident
is caused by MDEV-16329 Engine-independent online ALTER TABLE Closed
Relates
relates to MDEV-28808 Test MDEV-16329 (ALTER ONLINE TABLE) ... Stalled

 Description   

--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
 
CREATE TABLE t (f INT);
INSERT INTO t VALUES (NULL),(NULL);
ALTER TABLE t MODIFY COLUMN f INT AUTO_INCREMENT UNIQUE, ALGORITHM=COPY, LOCK=NONE;
 
--sync_slave_with_master
 
# Cleanup
--connection master
DROP TABLE t;
--source include/rpl_end.inc

Error on the slave:

bb-11.0-oalter b840a7810

2023-04-27  2:26:22 8 [ERROR] Slave SQL: Error 'LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED' on query. Default database: 'test'. Query: 'ALTER TABLE t MODIFY COLUMN f INT AUTO_INCREMENT UNIQUE, ALGORITHM=COPY, LOCK=NONE', Gtid 0-1-3, Internal MariaDB error code: 1846


Generated at Thu Feb 08 10:21:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.