Commit 66ecacb3 authored by hf@deer.(none)'s avatar hf@deer.(none)

Last part of resolving conflicts after pull

Some intersections with Monty encountered
parent b82e89d8
......@@ -41,7 +41,3 @@ my_bool send_file_to_server(MYSQL *mysql, const char *filename);
#define reset_sigpipe(mysql)
#endif
#define CLI_MYSQL_USE_RESULT cli_mysql_use_result
MYSQL_RES * STDCALL cli_mysql_use_result(MYSQL *mysql);
......@@ -69,10 +69,6 @@ my_bool net_flush(NET *net);
#endif
uint mysql_port=0;
my_string mysql_unix_port=0;
#if defined(MSDOS) || defined(__WIN__)
/* socket_errno is defined in my_global.h for all platforms */
#define perror(A)
......@@ -141,6 +137,7 @@ void mysql_once_init(void)
#endif
}
#ifndef EMBEDDED_LIBRARY
int STDCALL mysql_server_init(int argc __attribute__((unused)),
char **argv __attribute__((unused)),
char **groups __attribute__((unused)))
......@@ -841,54 +838,6 @@ STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
return 0;
}
/**************************************************************************
Alloc struct for use with unbuffered reads. Data is fetched by domand
when calling to mysql_fetch_row.
mysql_data_seek is a noop.
No other queries may be specified with the same MYSQL handle.
There shouldn't be much processing per row because mysql server shouldn't
have to wait for the client (and will not wait more than 30 sec/packet).
**************************************************************************/
MYSQL_RES * STDCALL CLI_MYSQL_USE_RESULT(MYSQL *mysql)
{
MYSQL_RES *result;
DBUG_ENTER("mysql_use_result");
mysql = mysql->last_used_con;
if (!mysql->fields)
DBUG_RETURN(0);
if (mysql->status != MYSQL_STATUS_GET_RESULT)
{
strmov(mysql->net.sqlstate, unknown_sqlstate);
strmov(mysql->net.last_error,
ER(mysql->net.last_errno=CR_COMMANDS_OUT_OF_SYNC));
DBUG_RETURN(0);
}
if (!(result=(MYSQL_RES*) my_malloc(sizeof(*result)+
sizeof(ulong)*mysql->field_count,
MYF(MY_WME | MY_ZEROFILL))))
DBUG_RETURN(0);
result->lengths=(ulong*) (result+1);
if (!(result->row=(MYSQL_ROW)
my_malloc(sizeof(result->row[0])*(mysql->field_count+1), MYF(MY_WME))))
{ /* Ptrs: to one row */
my_free((gptr) result,MYF(0));
DBUG_RETURN(0);
}
result->fields= mysql->fields;
result->field_alloc= mysql->field_alloc;
result->field_count= mysql->field_count;
result->current_field=0;
result->handle= mysql;
result->current_row= 0;
mysql->fields=0; /* fields is now in result */
mysql->status=MYSQL_STATUS_USE_RESULT;
DBUG_RETURN(result); /* Data is read to be fetched */
}
/**************************************************************************
Return next field of the query results
**************************************************************************/
......
......@@ -60,10 +60,6 @@ my_bool net_flush(NET *net);
#define CLI_MYSQL_REAL_CONNECT mysql_real_connect
#endif /*EMBEDDED_LIBRARY*/
#ifdef MYSQL_CLIENT
static my_bool mysql_client_init=0;
#endif
#if !defined(MYSQL_SERVER) && (defined(__WIN__) || defined(_WIN32) || defined(_WIN64))
#include <winsock.h>
......@@ -1441,6 +1437,7 @@ my_bool mysql_autenticate(MYSQL *mysql, const char *passwd)
static void STDCALL cli_mysql_close(MYSQL *mysql);
static my_bool STDCALL cli_mysql_read_query_result(MYSQL *mysql);
static MYSQL_RES * STDCALL cli_mysql_store_result(MYSQL *mysql);
static MYSQL_RES * STDCALL cli_mysql_use_result(MYSQL *mysql);
static MYSQL_METHODS client_methods=
{
......@@ -1448,7 +1445,7 @@ static MYSQL_METHODS client_methods=
cli_mysql_read_query_result,
cli_advanced_command,
cli_mysql_store_result,
CLI_MYSQL_USE_RESULT
cli_mysql_use_result
};
MYSQL * STDCALL
......@@ -2378,8 +2375,7 @@ static MYSQL_RES * STDCALL cli_mysql_store_result(MYSQL *mysql)
have to wait for the client (and will not wait more than 30 sec/packet).
**************************************************************************/
MYSQL_RES * STDCALL
mysql_use_result(MYSQL *mysql)
static MYSQL_RES * STDCALL cli_mysql_use_result(MYSQL *mysql)
{
MYSQL_RES *result;
DBUG_ENTER("mysql_use_result");
......
......@@ -30,6 +30,5 @@
#define mysql_slave_send_query(A, B, C) 1
#define mysql_rpl_probe(mysql) 0
#undef HAVE_SMEM
#define CLI_MYSQL_USE_RESULT NULL
#undef _CUSTOMCONFIG_
......@@ -20,6 +20,7 @@
#include <mysql_priv.h>
#ifdef CLEAN_DUP
/*
Function called by my_net_init() to set some check variables
*/
......@@ -37,6 +38,7 @@ void my_net_local_init(NET *net)
#endif
}
}
#endif /*CLEAN_DUP*/
extern "C" {
void mysql_once_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment