From 24e2e7546d58c1dc96f7800dfdaef06d33c2ad2d Mon Sep 17 00:00:00 2001 From: val Date: Thu, 27 Feb 2020 08:12:02 +0000 Subject: [PATCH] adding MariaDB ConnectorJ test case to set parser tests --- test/set_parser_test/setparsertest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/set_parser_test/setparsertest.cpp b/test/set_parser_test/setparsertest.cpp index 22ef30499..482cbf364 100644 --- a/test/set_parser_test/setparsertest.cpp +++ b/test/set_parser_test/setparsertest.cpp @@ -103,7 +103,7 @@ void TestParse(const Test* tests, int ntests, const string& title) { } SetParser parser(tests[i].query); - std::map> result = parser.parse(); + std::map> result = parser.parse1(); // printMap("result", result); // printMap("expected", data); @@ -202,6 +202,8 @@ static Test multiple[] = { { "SET NAMES utf8, @@SESSION.sql_mode = CONCAT(REPLACE(REPLACE(REPLACE(@@sql_mode, 'STRICT_TRANS_TABLES', ''), 'STRICT_ALL_TABLES', ''), 'TRADITIONAL', ''), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 3600", { Expected("names", {"utf8"}), Expected("sql_mode", {"CONCAT(REPLACE(REPLACE(REPLACE(@@sql_mode, 'STRICT_TRANS_TABLES', ''), 'STRICT_ALL_TABLES', ''), 'TRADITIONAL', ''), ',NO_AUTO_VALUE_ON_ZERO')"}), Expected("sql_auto_is_null", {"0"}), Expected("wait_timeout", {"3600"}) } }, + { "set autocommit=1, session_track_schema=1, sql_mode = concat(@@sql_mode,',STRICT_TRANS_TABLES'), @@SESSION.net_write_timeout=7200", { Expected("autocommit", {"1"}), Expected("session_track_schema", {"1"}), Expected("sql_mode", {"concat(@@sql_mode,',STRICT_TRANS_TABLES')"}), + Expected("net_write_timeout", {"7200"}) } }, }; TEST(TestParse, MULTIPLE) {