Details
-
Bug
-
Status: Open (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
10.9.1, 10.11, 11.4, 11.8, 12.0(EOL)
-
None
Description
CREATE TABLE t (a INT); |
ALTER TABLE t COLLATE utf8_general_ci, COLLATE utf8_bin; |
|
DROP TABLE t; |
Before 10.9.1, specifically before this commit
commit 208addf48444c0a36a2cc16cd2558ae694e905d5
|
Author: Alexander Barkov
|
Date: Tue May 17 12:52:23 2022 +0400
|
|
Main patch MDEV-27896 Wrong result upon `COLLATE latin1_bin CHARACTER SET latin1` on the table or the database level
|
the above ALTER would succeed quietly, altering the table to the second collation.
Starting from this commit, it fails with ER_CONFLICTING_DECLARATIONS:
10.11 2d1e019f4f5ada670aa6baaea0a126a4d32abe30 |
mysqltest: At line 2: query 'ALTER TABLE t COLLATE utf8_general_ci, COLLATE utf8_bin' failed: ER_CONFLICTING_DECLARATIONS (1302): Conflicting declarations: 'COLLATE utf8mb3_general_ci' and 'COLLATE utf8mb3_bin' |
The error as such is not big news, with CHARACTER SET it happened before; but as with any tightening in behavior, it may cause a replication failure: the statement passes on an old primary, gets written to the binlog, fails on a replica, replication aborts.
I'm setting it to trivial as the workaround is obvious – don't do it, there should be no practical reason to use two COLLATE clauses in the same ALTER.
Attachments
Issue Links
- is caused by
-
MDEV-27896 Wrong result upon `COLLATE latin1_bin CHARACTER SET latin1` on the table or the database level
-
- Closed
-