1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

Windows fixes for remote_io plugin

This commit is contained in:
Georg Richter
2016-01-04 10:02:10 +01:00
parent 97a6aeafff
commit b5cf443681
9 changed files with 22 additions and 14 deletions

View File

@@ -250,11 +250,13 @@ ENDIF()
MARK_AS_ADVANCED(SYSTEM_LIBS)
IF(NOT REMOTEIO_PLUGIN_TYPE MATCHES "OFF")
IF(CURL_FOUND)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
IF(REMOTEIO_PLUGIN_TYPE MATCHES "STATIC")
SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${CURL_LIBRARIES})
ENDIF()
ADD_DEFINITIONS("-DHAVE_REMOTEIO=1")
ENDIF()
ENDIF()
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(libmariadb)

View File

@@ -210,7 +210,9 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_PUTENV
#define HAVE_SELECT
#define HAVE_SETLOCALE
#ifndef HAVE_SOCKET
#define HAVE_SOCKET /* Giangi */
#endif
#define HAVE_FLOAT_H
#define HAVE_LIMITS_H
#define HAVE_STDDEF_H

View File

@@ -402,7 +402,6 @@ ENDIF()
ADD_LIBRARY(mariadbclient STATIC ${ariadbclient_RC} $<TARGET_OBJECTS:mariadb_obj> ${EMPTY_FILE} ${EXPORT_LINK})
TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS})
MESSAGE(STATUS "SYSLIBS: ${SYSTEM_LIBS}")
ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} $<TARGET_OBJECTS:mariadb_obj> ${EMPTY_FILE} ${EXPORT_LINK})
TARGET_LINK_LIBRARIES(libmariadb ${SYSTEM_LIBS})
IF(UNIX)

View File

@@ -104,6 +104,10 @@ extern int mthd_stmt_fetch_to_bind(MYSQL_STMT *stmt, unsigned char *row);
extern int mthd_stmt_read_all_rows(MYSQL_STMT *stmt);
extern void mthd_stmt_flush_unbuffered(MYSQL_STMT *stmt);
extern unsigned char *mysql_net_store_length(unsigned char *packet, size_t length);
extern void
my_context_install_suspend_resume_hook(struct mysql_async_context *b,
void (*hook)(my_bool, void *),
void *user_data);
uint mysql_port=0;
my_string mysql_unix_port=0;
@@ -3436,7 +3440,7 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
return(rc);
}
void STDCALL mysql_server_end()
void STDCALL mysql_server_end(void)
{
if (!mysql_client_init)
return;

View File

@@ -908,6 +908,7 @@ my_bool ma_ssl_get_protocol_version(MARIADB_SSL *cssl, struct st_ssl_version *ve
{
SC_CTX *sctx;
SecPkgContext_ConnectionInfo ConnectionInfo;
if (!cssl->ssl)
return 1;

View File

@@ -554,14 +554,12 @@ MYSQL *aurora_connect(MYSQL *mysql, const char *host, const char *user, const ch
if (!mariadb_api)
mariadb_api= mysql->methods->api;
mariadb_api->mariadb_get_info(mysql, MARIADB_CLIENT_ERRORS, &client_errors);
if ((aurora= (AURORA *)hdlr->data))
{
aurora_refresh_blacklist(aurora);
if (aurora->mysql[aurora->last_instance_type]->net.pvio)
{
SET_CLIENT_ERROR(mysql, CR_ALREADY_CONNECTED, SQLSTATE_UNKNOWN, 0);
mysql->methods->set_error(mysql, CR_ALREADY_CONNECTED, SQLSTATE_UNKNOWN, 0);
return NULL;
}
is_reconnect= 1;

View File

@@ -1,5 +1,5 @@
/************************************************************************************
* Copyright (C) 2015 Monty Program AB
* Copyright (C) 2015, 2016 Monty Program AB
* Copyright (c) 2003 Simtec Electronics
*
* Re-implemented by Vincent Sanders <vince@kyllikki.org> with extensive
@@ -92,7 +92,7 @@ CURLM *multi_handle= NULL;
#ifndef HAVE_REMOTEIO_DYNAMIC
MARIADB_REMOTEIO_PLUGIN remote_io_plugin=
#else
MARIADB_REMOTEIO_PLUGIN _mysql_client_plugin_declare_ =
MARIADB_REMOTEIO_PLUGIN _mysql_client_plugin_declaration_ =
#endif
{
MARIADB_CLIENT_REMOTEIO_PLUGIN,
@@ -126,6 +126,7 @@ int ma_rio_deinit(void)
multi_handle= NULL;
}
curl_global_cleanup();
return 0;
}
/* }}} */

View File

@@ -1,5 +1,5 @@
/************************************************************************************
Copyright (C) 2015 MariaDB Corporation AB,
Copyright (C) 2015,2016 MariaDB Corporation AB,
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -106,7 +106,7 @@ struct st_ma_pvio_methods pvio_socket_methods= {
#ifndef HAVE_SOCKET_DYNAMIC
MARIADB_PVIO_PLUGIN pvio_socket_plugin=
#else
MARIADB_PVIO_PLUGIN _mysql_client_plugin_declare_
MARIADB_PVIO_PLUGIN _mysql_client_plugin_declaration_
#endif
{
MARIADB_CLIENT_PVIO_PLUGIN,

View File

@@ -982,6 +982,7 @@ static int test_remote1(MYSQL *mysql)
if (!remote_plugin)
{
diag("skip - no remote io plugin available");
diag("error: %s", mysql_error(mysql));
return SKIP;
}