From da166ac49316218659cd54e19ad714d2be3dded1 Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Wed, 5 Feb 2025 14:53:22 +0500 Subject: [PATCH] Updated TAP tests with new SET statement parser --- test/tap/tests/Makefile | 10 +++++----- test/tap/tests/setparser_test.cpp | 4 ++-- test/tap/tests/setparser_test2.cpp | 2 +- test/tap/tests/setparser_test3.cpp | 4 ++-- test/tap/tests/setparser_test_common.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/tap/tests/Makefile b/test/tap/tests/Makefile index 0fe51d09e..5973132e4 100644 --- a/test/tap/tests/Makefile +++ b/test/tap/tests/Makefile @@ -314,20 +314,20 @@ test_admin_prometheus_metrics_dump-t: test_admin_prometheus_metrics_dump-t.cpp $ create_connection_annotation: test_connection_annotation-t.cpp $(TAP_LDIR)/libtap.so $(CXX) -DTEST_AURORA $< $(IDIRS) $(LDIRS) $(OPT) $(OBJ) $(MYLIBS) $(STATIC_LIBS) -o $@ -setparser_test: setparser_test.cpp $(TAP_LDIR)/libtap.so $(RE2_PATH)/util/test.cc $(PROXYSQL_LDIR)/set_parser.cpp $(LIBPROXYSQLAR) $(LIBCOREDUMPERAR) +setparser_test: setparser_test.cpp $(TAP_LDIR)/libtap.so $(RE2_PATH)/util/test.cc $(PROXYSQL_LDIR)/MySQL_Set_Stmt_Parser.cpp $(LIBPROXYSQLAR) $(LIBCOREDUMPERAR) $(CXX) $< $(RE2_PATH)/util/test.cc $(IDIRS) $(LDIRS) $(OPT) $(MYLIBS) $(LIBCOREDUMPERAR) -o $@ setparser_test2-t: setparser_test2 ln -fs setparser_test2 setparser_test2-t -setparser_test2: setparser_test2.cpp $(TAP_LDIR)/libtap.so $(PROXYSQL_LDIR)/set_parser.cpp setparser_test_common.h $(LIBPROXYSQLAR) $(LIBCOREDUMPERAR) - $(CXX) $< $(PROXYSQL_LDIR)/set_parser.cpp $(IDIRS) $(LDIRS) $(OPT) $(MYLIBS) $(LIBCOREDUMPERAR) -o $@ +setparser_test2: setparser_test2.cpp $(TAP_LDIR)/libtap.so $(PROXYSQL_LDIR)/MySQL_Set_Stmt_Parser.cpp setparser_test_common.h $(LIBPROXYSQLAR) $(LIBCOREDUMPERAR) + $(CXX) $< $(PROXYSQL_LDIR)/MySQL_Set_Stmt_Parser.cpp $(IDIRS) $(LDIRS) $(OPT) $(MYLIBS) $(LIBCOREDUMPERAR) -o $@ setparser_test3-t: setparser_test3 ln -fs setparser_test3 setparser_test3-t -setparser_test3: setparser_test3.cpp $(TAP_LDIR)/libtap.so $(PROXYSQL_LDIR)/set_parser.cpp setparser_test_common.h $(LIBPROXYSQLAR) $(LIBCOREDUMPERAR) - $(CXX) -DPARSERDEBUG $< $(PROXYSQL_LDIR)/set_parser.cpp $(IDIRS) $(LDIRS) $(OPT) $(MYLIBS) $(LIBCOREDUMPERAR) -o $@ +setparser_test3: setparser_test3.cpp $(TAP_LDIR)/libtap.so $(PROXYSQL_LDIR)/MySQL_Set_Stmt_Parser.cpp setparser_test_common.h $(LIBPROXYSQLAR) $(LIBCOREDUMPERAR) + $(CXX) -DPARSERDEBUG $< $(PROXYSQL_LDIR)/MySQL_Set_Stmt_Parser.cpp $(IDIRS) $(LDIRS) $(OPT) $(MYLIBS) $(LIBCOREDUMPERAR) -o $@ reg_test_3504-change_user_libmariadb_helper: reg_test_3504-change_user_helper.cpp $(TAP_LDIR)/libtap.so $(CXX) -DDISABLE_WARNING_COUNT_LOGGING $< $(IDIRS) $(LDIRS) $(OPT) $(MYLIBS) $(STATIC_LIBS) -o $@ diff --git a/test/tap/tests/setparser_test.cpp b/test/tap/tests/setparser_test.cpp index 8bc210ec4..7b1ab57ce 100644 --- a/test/tap/tests/setparser_test.cpp +++ b/test/tap/tests/setparser_test.cpp @@ -14,7 +14,7 @@ #include "re2/re2.h" #include "re2/regexp.h" #include "util/test.h" -#include "set_parser.h" +#include "MySQL_Set_Stmt_Parser.h" #include #include #include @@ -123,7 +123,7 @@ void TestParse(const Test* tests, int ntests, const std::string& title) { data[it->var] = it->values; } - SetParser parser(tests[i].query); + MySQL_Set_Stmt_Parser parser(tests[i].query); std::map> result = parser.parse1(); printMap("result", result); diff --git a/test/tap/tests/setparser_test2.cpp b/test/tap/tests/setparser_test2.cpp index 215d8b8d7..3de28e9a9 100644 --- a/test/tap/tests/setparser_test2.cpp +++ b/test/tap/tests/setparser_test2.cpp @@ -14,7 +14,7 @@ void TestParse(const Test* tests, int ntests, const std::string& title) { } cout << "Processing query: " << tests[i].query << endl; - SetParser parser(tests[i].query); + MySQL_Set_Stmt_Parser parser(tests[i].query); std::map> result = parser.parse1(); cout << endl; diff --git a/test/tap/tests/setparser_test3.cpp b/test/tap/tests/setparser_test3.cpp index b184b6d0e..1d611ab5a 100644 --- a/test/tap/tests/setparser_test3.cpp +++ b/test/tap/tests/setparser_test3.cpp @@ -6,7 +6,7 @@ #include "setparser_test_common.h" -SetParser *parser = NULL; +MySQL_Set_Stmt_Parser *parser = NULL; void TestParse(const Test* tests, int ntests, const std::string& title) { for (int i = 0; i < ntests; i++) { @@ -50,7 +50,7 @@ int main(int argc, char** argv) { p += arraysize(syntax_errors); p *= 2; plan(p); - parser = new SetParser("", 1); + parser = new MySQL_Set_Stmt_Parser("", 1); TestParse(sql_mode, arraysize(sql_mode), "sql_mode"); TestParse(time_zone, arraysize(time_zone), "time_zone"); TestParse(session_track_gtids, arraysize(session_track_gtids), "session_track_gtids"); diff --git a/test/tap/tests/setparser_test_common.h b/test/tap/tests/setparser_test_common.h index b7f34ae67..0ef1c190b 100644 --- a/test/tap/tests/setparser_test_common.h +++ b/test/tap/tests/setparser_test_common.h @@ -11,7 +11,7 @@ #include "re2/re2.h" #include "re2/regexp.h" #include "util/test.h" -#include "set_parser.h" +#include "MySQL_Set_Stmt_Parser.h" #include #include #include