Details
Description
CREATE OR REPLACE TABLE t1 (a VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci); |
INSERT INTO t1 VALUES ('aaaa'),('åå'); |
SELECT * FROM t1 WHERE a='aaaa'; |
+------+
|
| a |
|
+------+
|
| aaaa |
|
| åå |
|
+------+
|
Looks good so far. It returns two records, because in Danish collation 'å' is equal to 'aa'.
Now I join the table to itself:
SET join_cache_level=1; |
SELECT * FROM t1 NATURAL JOIN t1 t2; |
+------+
|
| a |
|
+------+
|
| aaaa |
|
| åå |
|
| aaaa |
|
| åå |
|
+------+
|
Looks good so far.
Now I enable the BNLH join:
SET join_cache_level=3; |
SELECT * FROM t1 NATURAL JOIN t1 t2; |
+------+
|
| a |
|
+------+
|
| aaaa |
|
| åå |
|
+------+
|
Half of the records disappeared. Looks wrong.
Attachments
Issue Links
- causes
-
MDEV-34580 Assertion `(key_part->key_part_flag & 4) == 0' failed key_hashnr
- Closed
- is duplicated by
-
MDEV-34352 Execution time for Block Nested Loop Hash (BNLH) join with charset utf8mb4 is 7-20 times slower than with latin1
- Closed
- relates to
-
MDEV-34232 Check performance of BNL-H vs MySQL's hash join
- Open
-
MDEV-34352 Execution time for Block Nested Loop Hash (BNLH) join with charset utf8mb4 is 7-20 times slower than with latin1
- Closed
-
MDEV-34427 BNL-H has not optimal implementation for varchar type
- Open