MXS-1275: Move SetSqlModeParser to .../server/core/maxscale

The parser is needed not only by mysql_client but also by the test
program of the qc-plugins, so it need to be available someplace
common.

Not that nice that both a qc-component and mysql_client will include
stuff from server/core/maxscale, but at least temporarily ok.
This commit is contained in:
Johan Wikman 2017-05-31 16:01:22 +03:00
parent 3084e95772
commit b385e862b0
5 changed files with 11 additions and 9 deletions

View File

@ -17,7 +17,10 @@
#include <maxscale/protocol/mysql.h>
class SetSqlModeParser : public maxscale::CustomParser
namespace maxscale
{
class SetSqlModeParser : public CustomParser
{
public:
enum sql_mode_t
@ -649,3 +652,5 @@ private:
return token;
}
};
}

View File

@ -12,6 +12,7 @@ add_executable(test_poll testpoll.c)
add_executable(test_queuemanager testqueuemanager.c)
add_executable(test_server testserver.c)
add_executable(test_service testservice.c)
add_executable(test_setsqlmodeparser test_setsqlmodeparser.cc)
add_executable(test_spinlock testspinlock.c)
add_executable(test_trxcompare testtrxcompare.cc ../../../query_classifier/test/testreader.cc)
add_executable(test_trxtracking testtrxtracking.cc)
@ -35,6 +36,7 @@ target_link_libraries(test_poll maxscale-common)
target_link_libraries(test_queuemanager maxscale-common)
target_link_libraries(test_server maxscale-common)
target_link_libraries(test_service maxscale-common)
target_link_libraries(test_setsqlmodeparser maxscale-common)
target_link_libraries(test_spinlock maxscale-common)
target_link_libraries(test_trxcompare maxscale-common)
target_link_libraries(test_trxtracking maxscale-common)
@ -60,6 +62,7 @@ add_test(TestPoll test_poll)
add_test(TestQueueManager test_queuemanager)
add_test(TestServer test_server)
add_test(TestService test_service)
add_test(test_setsqlmodeparser test_setsqlmodeparser)
add_test(TestSpinlock test_spinlock)
add_test(TestUsers test_users)
add_test(TestModulecmd testmodulecmd)

View File

@ -11,13 +11,14 @@
* Public License.
*/
#include "../setsqlmodeparser.hh"
#include "../core/maxscale/setsqlmodeparser.hh"
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include <maxscale/buffer.h>
#include <maxscale/paths.h>
using namespace maxscale;
using namespace std;
namespace

View File

@ -2,7 +2,3 @@ add_library(MySQLClient SHARED mysql_client.cc)
target_link_libraries(MySQLClient maxscale-common MySQLCommon)
set_target_properties(MySQLClient PROPERTIES VERSION "1.0.0")
install_module(MySQLClient core)
if(BUILD_TESTS)
add_subdirectory(test)
endif()

View File

@ -1,3 +0,0 @@
add_executable(test_setsqlmodeparser test_setsqlmodeparser.cc)
target_link_libraries(test_setsqlmodeparser maxscale-common)
add_test(test_setsqlmodeparser test_setsqlmodeparser)