diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-08-05 11:03:05 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-08-05 11:03:05 +0500 |
commit | a20bb92e9721285acf540236a3b49ab2a7d67850 (patch) | |
tree | 4cc952660aa92af2c01890655eecf3562e2bd7b5 /heap | |
parent | 715a6576cd6e45da9e400cab5afc51bd423a0d38 (diff) | |
download | mariadb-git-a20bb92e9721285acf540236a3b49ab2a7d67850.tar.gz |
Fix:
CREATE TABLE t1 (s1 CHAR(5) CHARACTER SET latin1 COLLATE latin1_german2_ci);
INSERT INTO t1 VALUES ('Ü');
INSERT INTO t1 VALUES ('ue');
SELECT DISTINCT s1 FROM t1;
The above returned two rows in error.
Now it returns one row, in latin1_german2_ci: Ü == ue
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_hash.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/heap/hp_hash.c b/heap/hp_hash.c index 2a946dcd7b9..2843407f3fe 100644 --- a/heap/hp_hash.c +++ b/heap/hp_hash.c @@ -371,8 +371,9 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2) } if (seg->type == HA_KEYTYPE_TEXT) { - if (my_strnncoll(seg->charset,(uchar*) rec1+seg->start,seg->length, - (uchar*) rec2+seg->start,seg->length)) + if (seg->charset->coll->strnncollsp(seg->charset, + (uchar*) rec1+seg->start,seg->length, + (uchar*) rec2+seg->start,seg->length)) return 1; } else @@ -404,8 +405,9 @@ int hp_key_cmp(HP_KEYDEF *keydef, const byte *rec, const byte *key) } if (seg->type == HA_KEYTYPE_TEXT) { - if (my_strnncoll(seg->charset,(uchar*) rec+seg->start, seg->length, - (uchar*) key, seg->length)) + if (seg->charset->coll->strnncollsp(seg->charset, + (uchar*) rec+seg->start, seg->length, + (uchar*) key, seg->length)) return 1; } else |