REPLACE and charset of third parameter
--------------------------------------

                 Key: CORE-5919
                 URL: http://tracker.firebirdsql.org/browse/CORE-5919
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 3.0.4
            Reporter: Kovalenko Dmitry


Connection charset: win1251

CREATE TABLE TEST_MODIFY_ROW (
    TEST_ID            T_TEST_ID NOT NULL /* T_TEST_ID = BIGINT */,
    COL_VARCHAR_10     T_VARCHAR_10 /* T_VARCHAR_10 = VARCHAR(10), CHARSET: 
WIN1251 */,
);

For query1
SELECT "r"."TEST_ID", "r"."COL_VARCHAR_10" FROM "TEST_MODIFY_ROW" AS "r"
WHERE (POSITION(REPLACE("r"."COL_VARCHAR_10", 'ABC', :__vv_0), 
"r"."COL_VARCHAR_10") > 0) AND ("r"."TEST_ID" = :__8__locals1_testID_1)

Server returns that "__vv_0" parameter has NON OCTETS charset.

For query2:
SELECT "r"."TEST_ID", "r"."COL_VARCHAR_10" FROM "TEST_MODIFY_ROW" AS "r"
WHERE (POSITION(REPLACE("r"."COL_VARCHAR_10", 'ABC'||x'00'||'123', :__vv_0), 
"r"."COL_VARCHAR_10") > 0) AND ("r"."TEST_ID" = :__8__locals1_testID_1)

Server returns that "__vv_0" parameter has OCTETS charset.

Difference of these queries in second parameter of REPLACE: 'ABC' and 
'ABC'||x'00'||'123'.

For me - in second query parameter "__vv_0" should has NON OCTETS charset.

Could anybody confirm this behaviour and explain the reason?


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