mirror of
https://github.com/MariaDB/server.git
synced 2025-04-14 11:15:34 +02:00

ha_innobase::check_if_supported_inplace_alter(): Refuse to change the collation of a column that would become or remain indexed as part of the ALTER TABLE operation. In MariaDB Server 10.6, we will allow this type of operation; that fix depends on MDEV-15250.
24 lines
733 B
Text
24 lines
733 B
Text
--source include/have_innodb.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-26294 Duplicate entries in unique index not detected when
|
|
--echo # changing collation with INPLACE algorithm
|
|
--echo #
|
|
|
|
# Detect the duplicate entry after collation change of column
|
|
|
|
SET NAMES utf8;
|
|
CREATE TABLE t1 (
|
|
id INT PRIMARY KEY,
|
|
msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_swedish_ci UNIQUE
|
|
) ENGINE=INNODB;
|
|
INSERT INTO t1 VALUES (1, 'aaa');
|
|
INSERT INTO t1 VALUES (2, 'ååå');
|
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
|
ALTER TABLE t1
|
|
MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
|
ALGORITHM=NOCOPY;
|
|
ALTER TABLE t1 DROP INDEX msg,
|
|
MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
|
ALGORITHM=NOCOPY;
|
|
DROP TABLE t1;
|