From 285425b17972d7238d69874d8b4856305e3e2bfe Mon Sep 17 00:00:00 2001 From: Rohit Bhagat Date: Tue, 26 Dec 2023 17:09:52 +0000 Subject: [PATCH] added tests Signed-off-by: Rohit Bhagat --- test/JDBC/expected/BABEL-4638-vu-cleanup.out | 5 + test/JDBC/expected/BABEL-4638-vu-prepare.out | 19 +++ test/JDBC/expected/BABEL-4638-vu-verify.out | 135 +++++++++++++++++++ test/JDBC/input/BABEL-4638-vu-cleanup.sql | 5 + test/JDBC/input/BABEL-4638-vu-prepare.sql | 11 ++ test/JDBC/input/BABEL-4638-vu-verify.sql | 39 ++++++ 6 files changed, 214 insertions(+) create mode 100644 test/JDBC/expected/BABEL-4638-vu-cleanup.out create mode 100644 test/JDBC/expected/BABEL-4638-vu-prepare.out create mode 100644 test/JDBC/expected/BABEL-4638-vu-verify.out create mode 100644 test/JDBC/input/BABEL-4638-vu-cleanup.sql create mode 100644 test/JDBC/input/BABEL-4638-vu-prepare.sql create mode 100644 test/JDBC/input/BABEL-4638-vu-verify.sql diff --git a/test/JDBC/expected/BABEL-4638-vu-cleanup.out b/test/JDBC/expected/BABEL-4638-vu-cleanup.out new file mode 100644 index 0000000000..5e2d086272 --- /dev/null +++ b/test/JDBC/expected/BABEL-4638-vu-cleanup.out @@ -0,0 +1,5 @@ +DROP TABLE babel_4638_t1 +DROP TABLE babel_4638_t2 +DROP TABLE babel_4638_t3 +DROP TABLE babel_4638_t4 +GO diff --git a/test/JDBC/expected/BABEL-4638-vu-prepare.out b/test/JDBC/expected/BABEL-4638-vu-prepare.out new file mode 100644 index 0000000000..c2f7f3d2a6 --- /dev/null +++ b/test/JDBC/expected/BABEL-4638-vu-prepare.out @@ -0,0 +1,19 @@ +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); +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('ב'), ('א'), ('קקק'), ('מממ'); +GO +~~ROW COUNT: 4~~ + +~~ROW COUNT: 4~~ + +~~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 new file mode 100644 index 0000000000..9f3ea5815b --- /dev/null +++ b/test/JDBC/expected/BABEL-4638-vu-verify.out @@ -0,0 +1,135 @@ +-- arabic_ci_as +SELECT * FROM babel_4638_t1 +GO +~~START~~ +varchar +ح +غ +سسس +للل +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t1 +GO +~~START~~ +text +ح| +غ| +س| +ل| +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t1 +GO +~~START~~ +text +ح | +غ | +سسس | +للل | +~~END~~ + + +-- chinese_prc_ci_as +SELECT * FROM babel_4638_t2 +GO +~~START~~ +varchar +五 +九 +乙乙乙 +魚魚魚 +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t2 +GO +~~START~~ +text + | + | + | + | +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t2 +GO +~~START~~ +text +五 | +九 | +乙乙 | +魚魚 | +~~END~~ + + +-- japanese_ci_as +SELECT * FROM babel_4638_t3 +GO +~~START~~ +varchar +あ +九 +ちちち +さささ +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t3 +GO +~~START~~ +text + | + | + | + | +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t3 +GO +~~START~~ +text +あ | +九 | +ちち | +ささ | +~~END~~ + + +-- hebrew_ci_as +SELECT * FROM babel_4638_t4 +GO +~~START~~ +varchar +ב +א +קקק +מממ +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t4 +GO +~~START~~ +text +ב| +א| +ק| +מ| +~~END~~ + + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t4 +GO +~~START~~ +text +ב | +א | +קקק | +מממ | +~~END~~ + diff --git a/test/JDBC/input/BABEL-4638-vu-cleanup.sql b/test/JDBC/input/BABEL-4638-vu-cleanup.sql new file mode 100644 index 0000000000..5e2d086272 --- /dev/null +++ b/test/JDBC/input/BABEL-4638-vu-cleanup.sql @@ -0,0 +1,5 @@ +DROP TABLE babel_4638_t1 +DROP TABLE babel_4638_t2 +DROP TABLE babel_4638_t3 +DROP TABLE babel_4638_t4 +GO diff --git a/test/JDBC/input/BABEL-4638-vu-prepare.sql b/test/JDBC/input/BABEL-4638-vu-prepare.sql new file mode 100644 index 0000000000..769bd78771 --- /dev/null +++ b/test/JDBC/input/BABEL-4638-vu-prepare.sql @@ -0,0 +1,11 @@ +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); +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('ב'), ('א'), ('קקק'), ('מממ'); +GO diff --git a/test/JDBC/input/BABEL-4638-vu-verify.sql b/test/JDBC/input/BABEL-4638-vu-verify.sql new file mode 100644 index 0000000000..4a82fc01b5 --- /dev/null +++ b/test/JDBC/input/BABEL-4638-vu-verify.sql @@ -0,0 +1,39 @@ +-- arabic_ci_as +SELECT * FROM babel_4638_t1 +GO + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t1 +GO + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t1 +GO + +-- chinese_prc_ci_as +SELECT * FROM babel_4638_t2 +GO + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t2 +GO + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t2 +GO + +-- japanese_ci_as +SELECT * FROM babel_4638_t3 +GO + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t3 +GO + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t3 +GO + +-- hebrew_ci_as +SELECT * FROM babel_4638_t4 +GO + +SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t4 +GO + +SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t4 +GO