summaryrefslogtreecommitdiff
path: root/include/mysql.h
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-09-16 16:06:25 +0500
committerunknown <hf@deer.(none)>2003-09-16 16:06:25 +0500
commitd05807153b640bee039746cc449273e0672e43c4 (patch)
treee38da8c154875ca2ff180275d93d7dfa211f0f14 /include/mysql.h
parent774c65c7a37b0b02912940dd3c804fb526b68afa (diff)
downloadmariadb-git-d05807153b640bee039746cc449273e0672e43c4.tar.gz
SCRUM
Prepared statements in embedded server Several changes in library code with two goals: to make mysql_prepare_stmt working in embedded server to get rid of #define mysql_interface_func mysql->methods->interface_func in user's interface include/mysql.h: modifications of interface two goals: to implement prepared statements and to get rid of #define mysql_proc (mysql->smth) in interface include/sql_common.h: read_rows function got 'virtual' libmysql/client_settings.h: interface of some functions declared in client.c moved here libmysql/libmysql.c: several functions changed with declared goals libmysqld/embedded_priv.h: libmysqld.c <--> lib_sql.cc interface moved here libmysqld/lib_sql.cc: all embedded 'virtual' functions moved here so they can be static libmysqld/libmysqld.c: embedded 'virtual' function was moved out of here sql-common/client.c: several changes with the declared goal sql/sql_class.h: place to store statement data added to THD sql/sql_prepare.cc: storing of prepare_statement result for embedded server added
Diffstat (limited to 'include/mysql.h')
-rw-r--r--include/mysql.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 453325453af..c2f653e24d7 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -250,7 +250,6 @@ typedef struct st_mysql
LIST *stmts; /* list of all statements */
const struct st_mysql_methods *methods;
- struct st_mysql_res *result;
void *thd;
} MYSQL;
@@ -359,6 +358,8 @@ int STDCALL mysql_send_query(MYSQL *mysql, const char *q,
unsigned long length);
int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
unsigned long length);
+MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
+
/* perform query on master */
my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q,
unsigned long length);
@@ -427,6 +428,8 @@ MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
+MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
+ const char *wild);
unsigned long STDCALL mysql_escape_string(char *to,const char *from,
unsigned long from_length);
unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
@@ -538,9 +541,7 @@ typedef struct st_mysql_stmt
#define mysql_read_query_result(mysql) (*(mysql)->methods->read_query_result)(mysql)
-#define mysql_store_result(mysql) (*(mysql)->methods->store_result)(mysql)
#define mysql_use_result(mysql) (*(mysql)->methods->use_result)(mysql)
-#define mysql_list_fields(mysql, table, wild) (*(mysql)->methods->list_fields)(mysql, table, wild)
typedef struct st_mysql_methods
{
@@ -552,12 +553,12 @@ typedef struct st_mysql_methods
const char *arg,
unsigned long arg_length,
my_bool skip_check);
- MYSQL_RES * (STDCALL *store_result)(MYSQL *mysql);
+ MYSQL_DATA *(STDCALL *read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+ uint fields);
MYSQL_RES * (STDCALL *use_result)(MYSQL *mysql);
void (STDCALL *fetch_lengths)(unsigned long *to,
MYSQL_ROW column, uint field_count);
- MYSQL_RES * (STDCALL *list_fields)(MYSQL *mysql, const char *table,
- const char *wild);
+ MYSQL_FIELD * (STDCALL *list_fields)(MYSQL *mysql);
my_bool (STDCALL *read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
} MYSQL_METHODS;