Issue Details (XML | Word | Printable)

Key: CORE-3928
Type: Bug Bug
Status: Reopened Reopened
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Pablo León
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

order select * from table where ci_ai_field collate UNICODE = 'c' is case insensitive

Created: 19/Sep/12 05:44 PM   Updated: 20/Sep/12 07:27 PM
Component/s: Charsets/Collation
Affects Version/s: 2.5.1, 2.5.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Windows 7 64 bit

Planning Status: Unspecified


 Description  « Hide
In a field with UNICODE_CI_AI collation, the following sentence is case insensitive, witch IMHO is wrong behavior:

          select * from table where ci_ai_field collate UNICODE = 'c'

furthermore, the following sentence is case sensitive (as expected):

          select * from table where ci_ai_field collate UNICODE like 'c'



 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 20/Sep/12 02:57 PM
Cannot reproduce! Reopen if you have reproducible testcase.

isql -ch utf8 t.fdb

SQL> create table tab (ci_ai_field varchar(5) character set utf8 collate unicode_ci_ai);
SQL> insert into tab values ('c');
SQL> insert into tab values ('C');
SQL> commit;
SQL>
SQL> select * from tab where ci_ai_field = 'c';

CI_AI_FIELD
====================
c
C

SQL> select * from tab where ci_ai_field collate UNICODE = 'c';

CI_AI_FIELD
====================
c

SQL> select * from tab where ci_ai_field collate UNICODE like 'c';

CI_AI_FIELD
====================
c

Pablo León added a comment - 20/Sep/12 07:22 PM
It seems that this only fails when the database is created with default collation set:

create database "testdb" user "theuser" password "secret" page_size 16384 default character set utf8 collation unicode_ci_ai;


Adriano dos Santos Fernandes added a comment - 20/Sep/12 07:27 PM
I do not tested, but I know this is a important reason to reproduce this bug.