You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fixed windows build
This commit is contained in:
@@ -82,9 +82,7 @@ MARIADB_CIO_PLUGIN _mysql_client_plugin_declaration_ =
|
|||||||
"LGPL",
|
"LGPL",
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&cio_npipe_methods,
|
&cio_npipe_methods
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct st_cio_npipe {
|
struct st_cio_npipe {
|
||||||
|
@@ -84,8 +84,7 @@ MARIADB_CIO_PLUGIN _mysql_client_plugin_declaration_=
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&cio_shm_methods,
|
&cio_shm_methods,
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum enum_shm_events
|
enum enum_shm_events
|
||||||
|
@@ -29,7 +29,10 @@
|
|||||||
#include <mysql/client_plugin.h>
|
#include <mysql/client_plugin.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <m_string.h>
|
#include <m_string.h>
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* function prototypes */
|
/* function prototypes */
|
||||||
MYSQL *repl_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd,
|
MYSQL *repl_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd,
|
||||||
@@ -129,10 +132,14 @@ my_bool repl_parse_url(const char *url, REPL_DATA *data)
|
|||||||
data->host[MARIADB_SLAVE]= slaves[0];
|
data->host[MARIADB_SLAVE]= slaves[0];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct timeval tp;
|
|
||||||
int random_nr;
|
int random_nr;
|
||||||
|
#ifndef WIN32
|
||||||
|
struct timeval tp;
|
||||||
gettimeofday(&tp,NULL);
|
gettimeofday(&tp,NULL);
|
||||||
srand(tp.tv_usec / 1000 + tp.tv_sec * 1000);
|
srand(tp.tv_usec / 1000 + tp.tv_sec * 1000);
|
||||||
|
#else
|
||||||
|
srand(GetTickCount());
|
||||||
|
#endif
|
||||||
|
|
||||||
random_nr= rand() % num_slaves;
|
random_nr= rand() % num_slaves;
|
||||||
data->host[MARIADB_SLAVE]= slaves[random_nr];
|
data->host[MARIADB_SLAVE]= slaves[random_nr];
|
||||||
|
@@ -47,7 +47,7 @@ void trace_callback(int mode, MYSQL *mysql, const uchar *buffer, size_t length);
|
|||||||
#ifndef HAVE_TRACE_EXAMPLE_PLUGIN_DYNAMIC
|
#ifndef HAVE_TRACE_EXAMPLE_PLUGIN_DYNAMIC
|
||||||
struct st_mysql_client_plugin trace_example_plugin=
|
struct st_mysql_client_plugin trace_example_plugin=
|
||||||
#else
|
#else
|
||||||
struct st_mysql_client_plugin _mysql_client_plugin_declare_=
|
struct st_mysql_client_plugin _mysql_client_plugin_declaration_ =
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
MARIADB_CLIENT_TRACE_PLUGIN,
|
MARIADB_CLIENT_TRACE_PLUGIN,
|
||||||
|
Reference in New Issue
Block a user