-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Wrong select result in case of special sort character. #7140
Comments
Fixed in #7131 |
Result should be this, correct?
|
exactly thank you |
asfernandes
added a commit
that referenced
this issue
Mar 16, 2022
- #7093 - Improve indexed lookup speed of strings when the last keys characters are part of collated contractions. - #7094 - Incorrect indexed lookup of strings when the last keys characters are part of collated contractions and there is multi-segment insensitive descending index. - #7140 - Wrong select result in case of special sort character.
asfernandes
added a commit
that referenced
this issue
Mar 17, 2022
- #7093 - Improve indexed lookup speed of strings when the last keys characters are part of collated contractions. - #7094 - Incorrect indexed lookup of strings when the last keys characters are part of collated contractions and there is multi-segment insensitive descending index. - #7140 - Wrong select result in case of special sort character.
asfernandes
added a commit
that referenced
this issue
Mar 17, 2022
- #7093 - Improve indexed lookup speed of strings when the last keys characters are part of collated contractions. - #7094 - Incorrect indexed lookup of strings when the last keys characters are part of collated contractions and there is multi-segment insensitive descending index. - #7140 - Wrong select result in case of special sort character.
=== QA notes === |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Originally discovered with Polish collation but same problem for Czech. Tested with FB3, FB4 and ICU4.2, ICU 5.2, ICU 6.3
To get wrong result you must meet all of the following conditions:
create collation test_cz for UTF8 FROM UNICODE CASE INSENSITIVE ACCENT SENSITIVE 'LOCALE=cs_CZ';
CREATE TABLE TBL_TEST
( C1 VARCHAR(50) collate test_cz
);
CREATE INDEX IDX_c1 ON TBL_TEST (C1);
CREATE DESCENDING INDEX IDX_c1_d ON TBL_TEST (C1);
INSERT INTO TBL_TEST (C1) VALUES ('aaa');
INSERT INTO TBL_TEST (C1) VALUES ('bbb');
INSERT INTO TBL_TEST (C1) VALUES ('ccc');
INSERT INTO TBL_TEST (C1) VALUES ('ddd');
INSERT INTO TBL_TEST (C1) VALUES (NULL);
select * from TBL_TEST where c1 < 'b' or c1 is null order by c1 desc
result:
1 aaa
2 [null]
select * from TBL_TEST where c1 < 'c' or c1 is null order by c1 desc
result:
1 [null]
select * from TBL_TEST where c1 < 'd' or c1 is null order by c1 desc
result:
1 ccc
2 bbb
3 aaa
4 [null]
The text was updated successfully, but these errors were encountered: