1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

BUG#24342 - Incorrect results with query over MERGE table

MERGE engine may return incorrect values when several representations
of equal keys are present in the index. For example "groß" and "gross"
or "gross" and "gross " (trailing space), which are considered equal,
but have different lengths.

The problem was that key length was not recalculated after key lookup.

Only MERGE engine is affected.
This commit is contained in:
svoj@mysql.com/april.(none)
2007-04-11 01:40:35 +05:00
parent db45dc5f02
commit bcbcacb8da
5 changed files with 31 additions and 1 deletions

View File

@ -819,3 +819,14 @@ ALTER TABLE m1 ENGINE=MERGE UNION=(t1);
SELECT * FROM m1;
c1 c2 c3 c4 c5 c6 c7 c8 c9
DROP TABLE t1, m1;
CREATE TABLE t1 (a VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_german2_ci,
b INT, INDEX(a,b));
CREATE TABLE t2 LIKE t1;
CREATE TABLE t3 LIKE t1;
ALTER TABLE t3 ENGINE=MERGE UNION=(t1,t2);
INSERT INTO t1 VALUES ('ss',1);
INSERT INTO t2 VALUES ('ss',2),(0xDF,2);
SELECT COUNT(*) FROM t3 WHERE a=0xDF AND b=2;
COUNT(*)
2
DROP TABLE t1,t2,t3;