mirror of
https://github.com/MariaDB/server.git
synced 2025-06-15 00:02:46 +03:00
SCRUM:
embedded library I decided to get rid of #define mysql_some_function in mysql.h It puzzles users and makes problems with dynamic libraries Finally, there are only two functions left, that are covered with the #define-s and it won't hurt performance at all client/mysqltest.c: that'll be faster include/mysql.h: #defines changed to functions libmysql/libmysql.c: that'll be faster that calls of wrapper functions libmysqld/libmysqld.c: skip wrapper function sql-common/client.c: skip wrapper function
This commit is contained in:
@ -279,7 +279,7 @@ my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q,
|
||||
DBUG_ENTER("mysql_master_query");
|
||||
if (mysql_master_send_query(mysql, q, length))
|
||||
DBUG_RETURN(1);
|
||||
DBUG_RETURN(mysql_read_query_result(mysql));
|
||||
DBUG_RETURN((*mysql->methods->read_query_result)(mysql));
|
||||
}
|
||||
|
||||
my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
|
||||
@ -301,7 +301,7 @@ my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
|
||||
DBUG_ENTER("mysql_slave_query");
|
||||
if (mysql_slave_send_query(mysql, q, length))
|
||||
DBUG_RETURN(1);
|
||||
DBUG_RETURN(mysql_read_query_result(mysql));
|
||||
DBUG_RETURN((*mysql->methods->read_query_result)(mysql));
|
||||
}
|
||||
|
||||
|
||||
@ -1982,7 +1982,7 @@ static my_bool execute(MYSQL_STMT * stmt, char *packet, ulong length)
|
||||
if (cli_advanced_command(mysql, COM_EXECUTE, buff,
|
||||
MYSQL_STMT_HEADER, packet,
|
||||
length, 1) ||
|
||||
mysql_read_query_result(mysql))
|
||||
(*mysql->methods->read_query_result)(mysql))
|
||||
{
|
||||
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
|
||||
DBUG_RETURN(1);
|
||||
@ -3480,7 +3480,18 @@ my_bool STDCALL mysql_next_result(MYSQL *mysql)
|
||||
mysql->affected_rows= ~(my_ulonglong) 0;
|
||||
|
||||
if (mysql->last_used_con->server_status & SERVER_MORE_RESULTS_EXISTS)
|
||||
DBUG_RETURN(mysql_read_query_result(mysql));
|
||||
DBUG_RETURN((*mysql->methods->read_query_result)(mysql));
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql)
|
||||
{
|
||||
return (*mysql->methods->use_result)(mysql);
|
||||
}
|
||||
|
||||
my_bool STDCALL mysql_read_query_result(MYSQL *mysql)
|
||||
{
|
||||
return (*mysql->methods->read_query_result)(mysql);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user