Link against Connector-C.

Now, qc_mysqlembedded is linked against MySQL's embedded library,
and MaxScale itself against Connector-C.

So, in order to build MaxScale, Connector-C must be installed.
This has been tested with Connector-C 2.2.1.

The build variable MYSQLCLIENT_LIBRARIES is no longer used.
This commit is contained in:
Johan Wikman
2016-01-29 16:50:31 +02:00
parent 0c6e9f3def
commit fc6f49fe8a
16 changed files with 52 additions and 39 deletions

View File

@ -64,6 +64,7 @@
#include <dbusers.h>
#include <version.h>
#include <housekeeper.h>
#include <mysql.h>
#define GW_MYSQL_VERSION "MaxScale " MAXSCALE_VERSION
#define GW_MYSQL_LOOP_TIMEOUT 300000000
@ -224,9 +225,15 @@ typedef enum
),
} gw_mysql_capabilities_t;
// mysql.h from Connector-C exposes this enum, while mysql.h from
// MariaDB does not.
// TODO: This should probably be removed as Connector-C will be
// TODO: a pre-requisite for building MaxScale.
#if defined(LIBMARIADB)
typedef enum enum_server_command mysql_server_cmd_t;
#else
/** Copy from enum in mariadb-5.5 mysql_com.h */
typedef enum mysql_server_cmd {
MYSQL_COM_UNDEFINED = -1,
MYSQL_COM_SLEEP = 0,
MYSQL_COM_QUIT,
MYSQL_COM_INIT_DB,
@ -259,7 +266,9 @@ typedef enum mysql_server_cmd {
MYSQL_COM_DAEMON,
MYSQL_COM_END /*< Must be the last */
} mysql_server_cmd_t;
#endif
static const mysql_server_cmd_t MYSQL_COM_UNDEFINED = (mysql_server_cmd_t)-1;
/**
* List of server commands, and number of response packets are stored here.