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",
|
||||
NULL,
|
||||
NULL,
|
||||
&cio_npipe_methods,
|
||||
NULL,
|
||||
NULL
|
||||
&cio_npipe_methods
|
||||
};
|
||||
|
||||
struct st_cio_npipe {
|
||||
|
@@ -84,8 +84,7 @@ MARIADB_CIO_PLUGIN _mysql_client_plugin_declaration_=
|
||||
NULL,
|
||||
NULL,
|
||||
&cio_shm_methods,
|
||||
NULL,
|
||||
NULL
|
||||
|
||||
};
|
||||
|
||||
enum enum_shm_events
|
||||
|
@@ -29,7 +29,10 @@
|
||||
#include <mysql/client_plugin.h>
|
||||
#include <string.h>
|
||||
#include <m_string.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* function prototypes */
|
||||
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];
|
||||
else
|
||||
{
|
||||
struct timeval tp;
|
||||
int random_nr;
|
||||
#ifndef WIN32
|
||||
struct timeval tp;
|
||||
gettimeofday(&tp,NULL);
|
||||
srand(tp.tv_usec / 1000 + tp.tv_sec * 1000);
|
||||
#else
|
||||
srand(GetTickCount());
|
||||
#endif
|
||||
|
||||
random_nr= rand() % num_slaves;
|
||||
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
|
||||
struct st_mysql_client_plugin trace_example_plugin=
|
||||
#else
|
||||
struct st_mysql_client_plugin _mysql_client_plugin_declare_=
|
||||
struct st_mysql_client_plugin _mysql_client_plugin_declaration_ =
|
||||
#endif
|
||||
{
|
||||
MARIADB_CLIENT_TRACE_PLUGIN,
|
||||
|
Reference in New Issue
Block a user