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:
@ -17,7 +17,10 @@
|
|||||||
#include <maxscale/protocol/mysql.h>
|
#include <maxscale/protocol/mysql.h>
|
||||||
|
|
||||||
|
|
||||||
class SetSqlModeParser : public maxscale::CustomParser
|
namespace maxscale
|
||||||
|
{
|
||||||
|
|
||||||
|
class SetSqlModeParser : public CustomParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum sql_mode_t
|
enum sql_mode_t
|
||||||
@ -649,3 +652,5 @@ private:
|
|||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@ -12,6 +12,7 @@ add_executable(test_poll testpoll.c)
|
|||||||
add_executable(test_queuemanager testqueuemanager.c)
|
add_executable(test_queuemanager testqueuemanager.c)
|
||||||
add_executable(test_server testserver.c)
|
add_executable(test_server testserver.c)
|
||||||
add_executable(test_service testservice.c)
|
add_executable(test_service testservice.c)
|
||||||
|
add_executable(test_setsqlmodeparser test_setsqlmodeparser.cc)
|
||||||
add_executable(test_spinlock testspinlock.c)
|
add_executable(test_spinlock testspinlock.c)
|
||||||
add_executable(test_trxcompare testtrxcompare.cc ../../../query_classifier/test/testreader.cc)
|
add_executable(test_trxcompare testtrxcompare.cc ../../../query_classifier/test/testreader.cc)
|
||||||
add_executable(test_trxtracking testtrxtracking.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_queuemanager maxscale-common)
|
||||||
target_link_libraries(test_server maxscale-common)
|
target_link_libraries(test_server maxscale-common)
|
||||||
target_link_libraries(test_service 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_spinlock maxscale-common)
|
||||||
target_link_libraries(test_trxcompare maxscale-common)
|
target_link_libraries(test_trxcompare maxscale-common)
|
||||||
target_link_libraries(test_trxtracking 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(TestQueueManager test_queuemanager)
|
||||||
add_test(TestServer test_server)
|
add_test(TestServer test_server)
|
||||||
add_test(TestService test_service)
|
add_test(TestService test_service)
|
||||||
|
add_test(test_setsqlmodeparser test_setsqlmodeparser)
|
||||||
add_test(TestSpinlock test_spinlock)
|
add_test(TestSpinlock test_spinlock)
|
||||||
add_test(TestUsers test_users)
|
add_test(TestUsers test_users)
|
||||||
add_test(TestModulecmd testmodulecmd)
|
add_test(TestModulecmd testmodulecmd)
|
||||||
|
|||||||
@ -11,13 +11,14 @@
|
|||||||
* Public License.
|
* Public License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../setsqlmodeparser.hh"
|
#include "../core/maxscale/setsqlmodeparser.hh"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <maxscale/buffer.h>
|
#include <maxscale/buffer.h>
|
||||||
#include <maxscale/paths.h>
|
#include <maxscale/paths.h>
|
||||||
|
|
||||||
|
using namespace maxscale;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@ -2,7 +2,3 @@ add_library(MySQLClient SHARED mysql_client.cc)
|
|||||||
target_link_libraries(MySQLClient maxscale-common MySQLCommon)
|
target_link_libraries(MySQLClient maxscale-common MySQLCommon)
|
||||||
set_target_properties(MySQLClient PROPERTIES VERSION "1.0.0")
|
set_target_properties(MySQLClient PROPERTIES VERSION "1.0.0")
|
||||||
install_module(MySQLClient core)
|
install_module(MySQLClient core)
|
||||||
|
|
||||||
if(BUILD_TESTS)
|
|
||||||
add_subdirectory(test)
|
|
||||||
endif()
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
add_executable(test_setsqlmodeparser test_setsqlmodeparser.cc)
|
|
||||||
target_link_libraries(test_setsqlmodeparser maxscale-common)
|
|
||||||
add_test(test_setsqlmodeparser test_setsqlmodeparser)
|
|
||||||
Reference in New Issue
Block a user