Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.4(EOL)
-
None
Description
If I use a traditional unique constraint, the table correctly rejects the second record:
CREATE OR REPLACE TABLE t1 (a VARCHAR(2000) COLLATE utf8_unicode_nopad_ci, UNIQUE(a(3))); |
INSERT INTO t1 VALUES ('ss '); |
INSERT INTO t1 VALUES ('ß '); |
ERROR 1062 (23000): Duplicate entry 'ß ' for key 'a'
|
Now if I do the same thing with UNIQUE USING HASH, it accepts the duplicate record:
CREATE OR REPLACE TABLE t1 (a VARCHAR(2000) COLLATE utf8_unicode_nopad_ci, UNIQUE(a(3)) USING HASH); |
INSERT INTO t1 VALUES ('ss '); |
INSERT INTO t1 VALUES ('ß '); |
This is wrong. The second record should be rejected.
Attachments
Issue Links
- is caused by
-
MDEV-371 Unique indexes for blobs
- Closed
-
MDEV-25904 New collation functions to compare InnoDB style trimmed NO PAD strings
- Closed
- relates to
-
MDEV-30048 Prefix keys for CHAR work differently for MyISAM vs InnoDB
- Closed
-
MDEV-30050 Inconsistent results of DISTINCT with NOPAD
- Closed
-
MDEV-30072 Wrong ORDER BY for a partitioned prefix key + NOPAD
- Closed
-
MDEV-27670 Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
- Closed
-
MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
- Closed