Sort order is wrong when ordering by multiple columns starting with collate 
UNICODE_CI or UNICODE_CI_AI
-------------------------------------------------------------------------------------------------------

                 Key: CORE-5940
                 URL: http://tracker.firebirdsql.org/browse/CORE-5940
             Project: Firebird Core
          Issue Type: Bug
          Components: Charsets/Collation
    Affects Versions: 3.0.4
         Environment: Firebird 2.5 embedded(Win32) and 3.0(Win32), Windows 7
            Reporter: Hiro Nonomura


If a sorting was ordered by a single column with collate UNICODE, the result 
could be shared with collate UNICODE_CI or UNICODE_CI_AI. But when it comes to 
ordering by multiple columns, it should be a different story.

UNICODE_CI and UNICODE_CI_AI are working as if requested by collate UNICODE 
even in ordering by multiple columns. 

I have tested in Firebird 2.5 and 3.0. The following is a result by Firebird 
3.0; iSQL (Windows 7)

SQL> CREATE DATABASE 'TEST.FDB';
SQL> CREATE TABLE A (F1 INTEGER NOT NULL PRIMARY KEY, F2 VARCHAR(10) CHARACTER 
SET UTF8 NOT NULL);
SQL> INSERT INTO A (F1,F2)  VALUES (1,'a');
SQL> INSERT INTO A (F1,F2)  VALUES (2,'A');
SQL> INSERT INTO A (F1,F2)  VALUES (3,'a');
SQL> SELECT F2,F1 FROM A ORDER BY F2 COLLATE UNICODE_CI, F1;

F2                   F1
========== ============
a                     1
a                     3
A                     2

Correct result should be:

F2                   F1
========== ============
a                     1
A                     2
a                     3


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to