diff --git a/test/JDBC/expected/BABEL-4638-vu-cleanup.out b/test/JDBC/expected/BABEL-4638-vu-cleanup.out index 5e2d086272..5a3b7dec2f 100644 --- a/test/JDBC/expected/BABEL-4638-vu-cleanup.out +++ b/test/JDBC/expected/BABEL-4638-vu-cleanup.out @@ -2,4 +2,15 @@ DROP TABLE babel_4638_t1 DROP TABLE babel_4638_t2 DROP TABLE babel_4638_t3 DROP TABLE babel_4638_t4 +DROP TABLE babel_4638_t5 +DROP TABLE babel_4638_char_t1 +DROP TABLE babel_4638_char_t2 +DROP TABLE babel_4638_char_t3 +DROP TABLE babel_4638_char_t4 +DROP TABLE babel_4638_char_t5 +DROP TABLE babel_4638_nchar_t1 +DROP TABLE babel_4638_nchar_t2 +DROP TABLE babel_4638_nchar_t3 +DROP TABLE babel_4638_nchar_t4 +DROP TABLE babel_4638_nchar_t5 GO diff --git a/test/JDBC/expected/BABEL-4638-vu-prepare.out b/test/JDBC/expected/BABEL-4638-vu-prepare.out index c2f7f3d2a6..7b622ef33e 100644 --- a/test/JDBC/expected/BABEL-4638-vu-prepare.out +++ b/test/JDBC/expected/BABEL-4638-vu-prepare.out @@ -2,12 +2,28 @@ CREATE TABLE babel_4638_t1(a VARCHAR(10) COLLATE arabic_ci_as); CREATE TABLE babel_4638_t2(a VARCHAR(10) COLLATE chinese_prc_ci_as); CREATE TABLE babel_4638_t3(a VARCHAR(10) COLLATE japanese_ci_as); CREATE TABLE babel_4638_t4(a VARCHAR(10) COLLATE hebrew_ci_as); +CREATE TABLE babel_4638_t5(a VARCHAR(10)); +GO + +CREATE TABLE babel_4638_char_t1(a CHAR(10) COLLATE arabic_ci_as); +CREATE TABLE babel_4638_char_t2(a CHAR(10) COLLATE chinese_prc_ci_as); +CREATE TABLE babel_4638_char_t3(a CHAR(10) COLLATE japanese_ci_as); +CREATE TABLE babel_4638_char_t4(a CHAR(10) COLLATE hebrew_ci_as); +CREATE TABLE babel_4638_char_t5(a CHAR(10)); +GO + +CREATE TABLE babel_4638_nchar_t1(a NCHAR(10) COLLATE arabic_ci_as); +CREATE TABLE babel_4638_nchar_t2(a NCHAR(10) COLLATE chinese_prc_ci_as); +CREATE TABLE babel_4638_nchar_t3(a NCHAR(10) COLLATE japanese_ci_as); +CREATE TABLE babel_4638_nchar_t4(a NCHAR(10) COLLATE hebrew_ci_as); +CREATE TABLE babel_4638_nchar_t5(a NCHAR(10)); GO INSERT INTO babel_4638_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل'); INSERT INTO babel_4638_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚'); INSERT INTO babel_4638_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ'); INSERT INTO babel_4638_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ'); +INSERT INTO babel_4638_t5 VALUES('a'), ('🙂'), ('🙂🙂🙂'), ('さささ'); GO ~~ROW COUNT: 4~~ @@ -17,3 +33,5 @@ GO ~~ROW COUNT: 4~~ +~~ROW COUNT: 4~~ + diff --git a/test/JDBC/expected/BABEL-4638-vu-verify.out b/test/JDBC/expected/BABEL-4638-vu-verify.out index 9f3ea5815b..b78b341448 100644 --- a/test/JDBC/expected/BABEL-4638-vu-verify.out +++ b/test/JDBC/expected/BABEL-4638-vu-verify.out @@ -32,6 +32,60 @@ text ~~END~~ +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t1 +GO +~~START~~ +text +ح| +غ| +س| +ل| +~~END~~ + + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t1 +GO +~~START~~ +text +ح | +غ | +سسس | +للل | +~~END~~ + + +INSERT INTO babel_4638_char_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل') +INSERT INTO babel_4638_nchar_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل') +GO +~~ROW COUNT: 4~~ + +~~ROW COUNT: 4~~ + + +-- here a is defined as CHAR(10) COLLATE arabic_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t1 +GO +~~START~~ +text +ح | +غ | +سسس | +للل | +~~END~~ + + +-- here a is defined as NCHAR(10) COLLATE arabic_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t1 +GO +~~START~~ +text +ح | +غ | +سسس | +للل | +~~END~~ + + -- chinese_prc_ci_as SELECT * FROM babel_4638_t2 GO @@ -66,6 +120,60 @@ text ~~END~~ +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t2 +GO +~~START~~ +text +五| +九| +乙| +魚| +~~END~~ + + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t2 +GO +~~START~~ +text +五 | +九 | +乙乙乙 | +魚魚魚 | +~~END~~ + + +INSERT INTO babel_4638_char_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚') +INSERT INTO babel_4638_nchar_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚') +GO +~~ROW COUNT: 4~~ + +~~ROW COUNT: 4~~ + + +-- here a is defined as CHAR(10) COLLATE chinese_prc_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t2 +GO +~~START~~ +text +五 | +九 | +乙乙乙 | +魚魚魚 | +~~END~~ + + +-- here a is defined as NCHAR(10) COLLATE chinese_prc_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t2 +GO +~~START~~ +text +五 | +九 | +乙乙乙 | +魚魚魚 | +~~END~~ + + -- japanese_ci_as SELECT * FROM babel_4638_t3 GO @@ -100,6 +208,60 @@ text ~~END~~ +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t3 +GO +~~START~~ +text +あ| +九| +ち| +さ| +~~END~~ + + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t3 +GO +~~START~~ +text +あ | +九 | +ちちち | +さささ | +~~END~~ + + +INSERT INTO babel_4638_char_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ') +INSERT INTO babel_4638_nchar_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ') +GO +~~ROW COUNT: 4~~ + +~~ROW COUNT: 4~~ + + +-- here a is defined as CHAR(10) COLLATE japanese_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t3 +GO +~~START~~ +text +あ | +九 | +ちちち | +さささ | +~~END~~ + + +-- here a is defined as NCHAR(10) COLLATE japanese_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t3 +GO +~~START~~ +text +あ | +九 | +ちちち | +さささ | +~~END~~ + + -- hebrew_ci_as SELECT * FROM babel_4638_t4 GO @@ -133,3 +295,175 @@ text מממ | ~~END~~ + +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t4 +GO +~~START~~ +text +ב| +א| +ק| +מ| +~~END~~ + + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t4 +GO +~~START~~ +text +ב | +א | +קקק | +מממ | +~~END~~ + + +INSERT INTO babel_4638_char_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ'); +INSERT INTO babel_4638_nchar_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ'); +GO +~~ROW COUNT: 4~~ + +~~ROW COUNT: 4~~ + + +-- here a is defined as CHAR(10) COLLATE hebrew_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t4 +GO +~~START~~ +text +ב | +א | +קקק | +מממ | +~~END~~ + + +-- here a is defined as NCHAR(10) COLLATE hebrew_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t4 +GO +~~START~~ +text +ב | +א | +קקק | +מממ | +~~END~~ + + + +-- Default +SELECT * FROM babel_4638_t5 +GO +~~START~~ +varchar +a +? +??? +??? +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t5 +GO +~~START~~ +text +a| +?| +?| +?| +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t5 +GO +~~START~~ +text +a | +? | +??? | +??? | +~~END~~ + + +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t5 +GO +~~START~~ +text +a| +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: value too long for type character(1) as UTF16 output)~~ + + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t5 +GO +~~START~~ +text +a | +? | +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: value too long for type character(5) as UTF16 output)~~ + + +SELECT CAST('🙂' as NCHAR(1)) +GO +~~ERROR (Code: 33557097)~~ + +~~ERROR (Message: value too long for type character(1) as UTF16 output)~~ + + +INSERT INTO babel_4638_char_t5 VALUES('a'), ('🙂'), ('🙂🙂🙂'), ('さささ'); +INSERT INTO babel_4638_nchar_t5 VALUES('a'), ('🙂'), ('🙂🙂🙂'), ('さささ'); +GO +~~ROW COUNT: 4~~ + +~~ROW COUNT: 4~~ + + +SELECT * FROM babel_4638_char_t5 +GO +~~START~~ +char +a +? +??? +??? +~~END~~ + + +-- here a is defined as CHAR(10) +SELECT CONCAT(a,'|') FROM babel_4638_char_t5 +GO +~~START~~ +text +a | +? | +??? | +??? | +~~END~~ + + +SELECT * FROM babel_4638_nchar_t5 +GO +~~START~~ +nchar +a +🙂 +🙂🙂🙂 +さささ +~~END~~ + + +-- here a is defined as NCHAR(10) +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t5 +GO +~~START~~ +text +a | +? | +??? | +??? | +~~END~~ + + diff --git a/test/JDBC/input/BABEL-4638-vu-cleanup.sql b/test/JDBC/input/BABEL-4638-vu-cleanup.sql index 5e2d086272..089aa75c01 100644 --- a/test/JDBC/input/BABEL-4638-vu-cleanup.sql +++ b/test/JDBC/input/BABEL-4638-vu-cleanup.sql @@ -2,4 +2,15 @@ DROP TABLE babel_4638_t1 DROP TABLE babel_4638_t2 DROP TABLE babel_4638_t3 DROP TABLE babel_4638_t4 -GO +DROP TABLE babel_4638_t5 +DROP TABLE babel_4638_char_t1 +DROP TABLE babel_4638_char_t2 +DROP TABLE babel_4638_char_t3 +DROP TABLE babel_4638_char_t4 +DROP TABLE babel_4638_char_t5 +DROP TABLE babel_4638_nchar_t1 +DROP TABLE babel_4638_nchar_t2 +DROP TABLE babel_4638_nchar_t3 +DROP TABLE babel_4638_nchar_t4 +DROP TABLE babel_4638_nchar_t5 +GO \ No newline at end of file diff --git a/test/JDBC/input/BABEL-4638-vu-prepare.sql b/test/JDBC/input/BABEL-4638-vu-prepare.sql index 769bd78771..09e485e9ec 100644 --- a/test/JDBC/input/BABEL-4638-vu-prepare.sql +++ b/test/JDBC/input/BABEL-4638-vu-prepare.sql @@ -2,10 +2,26 @@ CREATE TABLE babel_4638_t1(a VARCHAR(10) COLLATE arabic_ci_as); CREATE TABLE babel_4638_t2(a VARCHAR(10) COLLATE chinese_prc_ci_as); CREATE TABLE babel_4638_t3(a VARCHAR(10) COLLATE japanese_ci_as); CREATE TABLE babel_4638_t4(a VARCHAR(10) COLLATE hebrew_ci_as); +CREATE TABLE babel_4638_t5(a VARCHAR(10)); +GO + +CREATE TABLE babel_4638_char_t1(a CHAR(10) COLLATE arabic_ci_as); +CREATE TABLE babel_4638_char_t2(a CHAR(10) COLLATE chinese_prc_ci_as); +CREATE TABLE babel_4638_char_t3(a CHAR(10) COLLATE japanese_ci_as); +CREATE TABLE babel_4638_char_t4(a CHAR(10) COLLATE hebrew_ci_as); +CREATE TABLE babel_4638_char_t5(a CHAR(10)); +GO + +CREATE TABLE babel_4638_nchar_t1(a NCHAR(10) COLLATE arabic_ci_as); +CREATE TABLE babel_4638_nchar_t2(a NCHAR(10) COLLATE chinese_prc_ci_as); +CREATE TABLE babel_4638_nchar_t3(a NCHAR(10) COLLATE japanese_ci_as); +CREATE TABLE babel_4638_nchar_t4(a NCHAR(10) COLLATE hebrew_ci_as); +CREATE TABLE babel_4638_nchar_t5(a NCHAR(10)); GO INSERT INTO babel_4638_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل'); INSERT INTO babel_4638_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚'); INSERT INTO babel_4638_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ'); INSERT INTO babel_4638_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ'); +INSERT INTO babel_4638_t5 VALUES('a'), ('🙂'), ('🙂🙂🙂'), ('さささ'); GO diff --git a/test/JDBC/input/BABEL-4638-vu-verify.sql b/test/JDBC/input/BABEL-4638-vu-verify.sql index 4a82fc01b5..38a2d179a8 100644 --- a/test/JDBC/input/BABEL-4638-vu-verify.sql +++ b/test/JDBC/input/BABEL-4638-vu-verify.sql @@ -8,6 +8,24 @@ GO SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t1 GO +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t1 +GO + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t1 +GO + +INSERT INTO babel_4638_char_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل') +INSERT INTO babel_4638_nchar_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل') +GO + +-- here a is defined as CHAR(10) COLLATE arabic_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t1 +GO + +-- here a is defined as NCHAR(10) COLLATE arabic_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t1 +GO + -- chinese_prc_ci_as SELECT * FROM babel_4638_t2 GO @@ -18,6 +36,24 @@ GO SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t2 GO +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t2 +GO + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t2 +GO + +INSERT INTO babel_4638_char_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚') +INSERT INTO babel_4638_nchar_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚') +GO + +-- here a is defined as CHAR(10) COLLATE chinese_prc_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t2 +GO + +-- here a is defined as NCHAR(10) COLLATE chinese_prc_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t2 +GO + -- japanese_ci_as SELECT * FROM babel_4638_t3 GO @@ -28,6 +64,24 @@ GO SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t3 GO +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t3 +GO + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t3 +GO + +INSERT INTO babel_4638_char_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ') +INSERT INTO babel_4638_nchar_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ') +GO + +-- here a is defined as CHAR(10) COLLATE japanese_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t3 +GO + +-- here a is defined as NCHAR(10) COLLATE japanese_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t3 +GO + -- hebrew_ci_as SELECT * FROM babel_4638_t4 GO @@ -37,3 +91,60 @@ GO SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t4 GO + +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t4 +GO + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t4 +GO + +INSERT INTO babel_4638_char_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ'); +INSERT INTO babel_4638_nchar_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ'); +GO + +-- here a is defined as CHAR(10) COLLATE hebrew_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_char_t4 +GO + +-- here a is defined as NCHAR(10) COLLATE hebrew_ci_as +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t4 +GO + + +-- Default +SELECT * FROM babel_4638_t5 +GO + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t5 +GO + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t5 +GO + +SELECT CONCAT(CAST(a AS NCHAR(1)), '|') FROM babel_4638_t5 +GO + +SELECT CONCAT(CAST(a AS NCHAR(5)), '|') FROM babel_4638_t5 +GO + +SELECT CAST('🙂' as NCHAR(1)) +GO + +INSERT INTO babel_4638_char_t5 VALUES('a'), ('🙂'), ('🙂🙂🙂'), ('さささ'); +INSERT INTO babel_4638_nchar_t5 VALUES('a'), ('🙂'), ('🙂🙂🙂'), ('さささ'); +GO + +SELECT * FROM babel_4638_char_t5 +GO + +-- here a is defined as CHAR(10) +SELECT CONCAT(a,'|') FROM babel_4638_char_t5 +GO + +SELECT * FROM babel_4638_nchar_t5 +GO + +-- here a is defined as NCHAR(10) +SELECT CONCAT(a,'|') FROM babel_4638_nchar_t5 +GO +