Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-26294 Duplicate entries in unique index not detected when changi…
…ng collation 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.
- Loading branch information
Showing
6 changed files
with
249 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # | ||
| # MDEV-26294 Duplicate entries in unique index not detected when | ||
| # changing collation with INPLACE algorithm | ||
| # | ||
| 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, 'ååå'); | ||
| ALTER TABLE t1 | ||
| MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, | ||
| ALGORITHM=NOCOPY; | ||
| ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Collation change on an indexed column. Try ALGORITHM=COPY | ||
| ALTER TABLE t1 DROP INDEX msg, | ||
| MODIFY msg VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci, | ||
| ALGORITHM=NOCOPY; | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.