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
Windows build fixes
This commit is contained in:
@@ -116,5 +116,6 @@ my_bool ma_cio_is_blocking(MARIADB_CIO *cio);
|
|||||||
int ma_cio_wait_io_or_timeout(MARIADB_CIO *cio, my_bool is_read, int timeout);
|
int ma_cio_wait_io_or_timeout(MARIADB_CIO *cio, my_bool is_read, int timeout);
|
||||||
my_bool ma_cio_connect(MARIADB_CIO *cio, MA_CIO_CINFO *cinfo);
|
my_bool ma_cio_connect(MARIADB_CIO *cio, MA_CIO_CINFO *cinfo);
|
||||||
my_bool ma_cio_is_alive(MARIADB_CIO *cio);
|
my_bool ma_cio_is_alive(MARIADB_CIO *cio);
|
||||||
|
my_bool ma_cio_get_handle(MARIADB_CIO *cio, void *handle);
|
||||||
|
|
||||||
#endif /* _ma_cio_h_ */
|
#endif /* _ma_cio_h_ */
|
||||||
|
@@ -117,7 +117,6 @@ char* get_tty_password(char *prompt, char *buffer, int length)
|
|||||||
HANDLE Hdl;
|
HANDLE Hdl;
|
||||||
int Offset= 0;
|
int Offset= 0;
|
||||||
DWORD CharsProcessed= 0;
|
DWORD CharsProcessed= 0;
|
||||||
char inChar;
|
|
||||||
|
|
||||||
if (prompt)
|
if (prompt)
|
||||||
fprintf(stderr, "%s", prompt);
|
fprintf(stderr, "%s", prompt);
|
||||||
|
@@ -133,6 +133,7 @@ my_bool ma_cio_is_alive(MARIADB_CIO *cio)
|
|||||||
{
|
{
|
||||||
if (cio->methods->is_alive)
|
if (cio->methods->is_alive)
|
||||||
return cio->methods->is_alive(cio);
|
return cio->methods->is_alive(cio);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
@@ -314,7 +314,7 @@ size_t cio_socket_async_read(MARIADB_CIO *cio, const uchar *buffer, size_t lengt
|
|||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
r= recv(csock->socket,(void *)buffer, length, read_flags);
|
r= recv(csock->socket,(void *)buffer, length, read_flags);
|
||||||
#else
|
#else
|
||||||
r= recv(csock->socket, buffer, length, 0);
|
r= recv(csock->socket, (char *)buffer, length, 0);
|
||||||
#endif
|
#endif
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@@ -245,7 +245,7 @@ void repl_close(MYSQL *mysql)
|
|||||||
my_free(data->url);
|
my_free(data->url);
|
||||||
my_free(data);
|
my_free(data);
|
||||||
mysql->net.conn_hdlr->data= NULL;
|
mysql->net.conn_hdlr->data= NULL;
|
||||||
return mysql_close(mysql);
|
mysql_close(mysql);
|
||||||
}
|
}
|
||||||
|
|
||||||
static my_bool is_slave_command(const char *buffer, size_t buffer_len)
|
static my_bool is_slave_command(const char *buffer, size_t buffer_len)
|
||||||
|
@@ -216,6 +216,7 @@ static int trace_deinit()
|
|||||||
trace_info= trace_info->next;
|
trace_info= trace_info->next;
|
||||||
}
|
}
|
||||||
register_callback(FALSE, trace_callback);
|
register_callback(FALSE, trace_callback);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void trace_set_command(TRACE_INFO *info, char *buffer, size_t size)
|
static void trace_set_command(TRACE_INFO *info, char *buffer, size_t size)
|
||||||
@@ -250,7 +251,7 @@ static void dump_reference(TRACE_INFO *info, my_bool is_error)
|
|||||||
|
|
||||||
static void dump_command(TRACE_INFO *info, my_bool is_error)
|
static void dump_command(TRACE_INFO *info, my_bool is_error)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
printf("%8d: %s(", info->thread_id, commands[info->last_command]);
|
printf("%8d: %s(", info->thread_id, commands[info->last_command]);
|
||||||
for (i= 0; info->command && i < strlen(info->command); i++)
|
for (i= 0; info->command && i < strlen(info->command); i++)
|
||||||
if (info->command[i] == '\n')
|
if (info->command[i] == '\n')
|
||||||
|
@@ -204,6 +204,7 @@ static int test_conc129(MYSQL *my)
|
|||||||
{
|
{
|
||||||
MYSQL *mysql= mysql_init(NULL);
|
MYSQL *mysql= mysql_init(NULL);
|
||||||
FAIL_IF(mysql_close_start(mysql), "No error expected");
|
FAIL_IF(mysql_close_start(mysql), "No error expected");
|
||||||
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -802,7 +802,7 @@ static int test_conc49(MYSQL *mysql)
|
|||||||
rc= mysql_query(mysql, "SELECT a FROM conc49");
|
rc= mysql_query(mysql, "SELECT a FROM conc49");
|
||||||
check_mysql_rc(rc, mysql);
|
check_mysql_rc(rc, mysql);
|
||||||
res= mysql_store_result(mysql);
|
res= mysql_store_result(mysql);
|
||||||
rc= mysql_num_rows(res);
|
rc= (int)mysql_num_rows(res);
|
||||||
mysql_free_result(res);
|
mysql_free_result(res);
|
||||||
FAIL_IF(rc != 3, "3 rows expected");
|
FAIL_IF(rc != 3, "3 rows expected");
|
||||||
return OK;
|
return OK;
|
||||||
@@ -922,7 +922,7 @@ static int test_connect_attrs(MYSQL *my)
|
|||||||
rc= mysql_query(mysql, "SELECT * FROM performance_schema.session_connect_attrs where attr_name like 'foo%'");
|
rc= mysql_query(mysql, "SELECT * FROM performance_schema.session_connect_attrs where attr_name like 'foo%'");
|
||||||
check_mysql_rc(rc, mysql);
|
check_mysql_rc(rc, mysql);
|
||||||
result= mysql_store_result(mysql);
|
result= mysql_store_result(mysql);
|
||||||
rc= mysql_num_rows(result);
|
rc= (int)mysql_num_rows(result);
|
||||||
mysql_free_result(result);
|
mysql_free_result(result);
|
||||||
|
|
||||||
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, NULL);
|
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, NULL);
|
||||||
|
Reference in New Issue
Block a user