Invalid result of comparing of the same character in different cases 
(upper/lower)
----------------------------------------------------------------------------------

                 Key: CORE-6194
                 URL: http://tracker.firebirdsql.org/browse/CORE-6194
             Project: Firebird Core
          Issue Type: Bug
         Environment: Firebird-4.0.0.1651-0_x64 / Windows 10 x64
            Reporter: Vladimir Lomov


Maybe I misunderstand something, but it seems that comparing the same character 
in different cases does not work correctly.
The same example works OK in Oracle.

Test case:

select ascii_val('Z')  as Z_Upper, -- = 90
       ascii_val('z')  as Z_Lower, -- = 122
       ascii_char(90)  as Z_Upper_num, -- = 'Z'
       ascii_char(122) as Z_Lower_num, -- = 'z'
       case
         when 'Z' = 'z' then 1 -- Why do we get here?
         else 2
       end as char_compare,
       case
         when ascii_char(90) = ascii_char(122) then 1
         else 2 -- We are here, it is correct
       end as ascii_char_compare
  from rdb$database;


-- 
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