1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-9293 - Use MariaDB's Connector/C in server

This commit is contained in:
Vladislav Vaintroub
2016-08-19 20:03:05 +00:00
committed by Sergei Golubchik
parent 31a8cf54c8
commit 56c4cfe0be
53 changed files with 572 additions and 351 deletions

View File

@@ -52,14 +52,18 @@
#include <algorithm>
#define my_net_write ma_net_write
#define net_flush ma_net_flush
#define cli_safe_read mysql_net_read_packet
#define my_net_read ma_net_read
extern "C" unsigned char *mysql_net_store_length(unsigned char *packet, size_t length);
#define net_store_length mysql_net_store_length
Rpl_filter *binlog_filter= 0;
#define BIN_LOG_HEADER_SIZE 4
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
/* Needed for Rpl_filter */
CHARSET_INFO* system_charset_info= &my_charset_utf8_general_ci;
@@ -1764,6 +1768,7 @@ static int parse_args(int *argc, char*** argv)
*/
static Exit_status safe_connect()
{
my_bool reconnect= 1;
/* Close any old connections to MySQL */
if (mysql)
mysql_close(mysql);
@@ -1809,7 +1814,7 @@ static Exit_status safe_connect()
error("Failed on connect: %s", mysql_error(mysql));
return ERROR_STOP;
}
mysql->reconnect= 1;
mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect);
return OK_CONTINUE;
}
@@ -2843,6 +2848,8 @@ struct encryption_service_st encryption_handler=
#include "my_decimal.h"
#include "decimal.c"
#include "my_decimal.cc"
#include "../sql-common/my_time.c"
#include "password.c"
#include "log_event.cc"
#include "log_event_old.cc"
#include "rpl_utility.cc"