You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
This is expected: you're using a hex-literal which makes it a character set octets string, which cause the rest of the strings to be converted to octets as well. If you don't want that, you need to explicitly cast (although with a nul-character, a different choice than octets is an odd choice anyway).
Submitted by: @ibprovider
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?
The text was updated successfully, but these errors were encountered: