[MDEV-27859] Instant change of ENUM is refused because of COLLATE mismatch Created: 2022-02-16  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: Data Definition - Alter Table
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Alexander Barkov
Resolution: Unresolved Votes: 1
Labels: instant

Issue Links:
Relates
relates to MDEV-11424 Instant ALTER TABLE of failure-free r... Closed
relates to MDEV-15564 Avoid table rebuild in ALTER TABLE on... Closed

 Description   

In the following test, the first ALTER TABLE unexpectedly fails:

--source include/have_innodb.inc
 
CREATE TABLE t1 (e enum('a','b','c') COLLATE utf8mb4_unicode_ci DEFAULT 'a') ENGINE=InnoDB;
 
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE t1 MODIFY e ENUM('a','b','c','d'), ALGORITHM=INSTANT;
 
ALTER TABLE t1 MODIFY e ENUM('a','b','c','d') COLLATE utf8mb4_unicode_ci, ALGORITHM=INSTANT;
DROP TABLE t1;

I believe that it is wrong to require that the collation matches in this case. Even if there was an index defined on the column, that index should use normal integer sorting rules, and the collation on the textual ENUM symbols that map to the integer symbols should not matter at all.


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