diff options
author | unknown <hf@deer.(none)> | 2003-09-18 18:28:42 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2003-09-18 18:28:42 +0500 |
commit | da3118facc7e981769ee2ab4350481f0853acfee (patch) | |
tree | 593ba69d5c29894f275cbfb3fd65924fcde6fef3 /libmysql/libmysql.c | |
parent | 86f1f2a183271ca930ee9885fffaf4023b20eb80 (diff) | |
download | mariadb-git-da3118facc7e981769ee2ab4350481f0853acfee.tar.gz |
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
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r-- | libmysql/libmysql.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 954eae89a2b..c3592844024 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -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); +} + |