From 4826ed009186289b1b3f7a39a8bd0076cb85b712 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Nov 2002 18:51:38 -0800 Subject: =?UTF-8?q?select=5Ftest.c,=20insert=5Ftest.c:=20=20=20Added=20my?= =?UTF-8?q?=5Fglobal.h=20to=20compile=20after=20my=5Flist.h=20is=20added?= =?UTF-8?q?=20to=20mysql.h=20sql=5Fprepare.cc:=20=20=20Handle=20close=20st?= =?UTF-8?q?mt=20from=20client=20=20=20Minor=20fixups=20to=20make=20SET=20v?= =?UTF-8?q?ariable=3D=3F=20to=20work=20sql=5Fparse.cc:=20=20=20Added=20mis?= =?UTF-8?q?sed=20COM=5FCLOSE=5FSTMT=20mysql=5Fpriv.h:=20=20=20Change=20mys?= =?UTF-8?q?ql=5Fstmt=5Fclose=20to=20mysql=5Fstmt=5Ffree=20to=20not=20to=20?= =?UTF-8?q?conflict=20with=20client=20type=20libmysql.c:=20=20=20Clean=20a?= =?UTF-8?q?ll=20open=20stmts=20during=20mysql=5Fclose()=20implicitly?= libmysql/libmysql.c: Clean all open stmts during mysql_close() implicitly sql/mysql_priv.h: Handle close_stmt from client Change mysql_stmt_close to mysql_stmt_free to not to conflict with client type sql/sql_parse.cc: Added missed COM_CLOSE_STMT sql/sql_prepare.cc: Handle close stmt from client Change mysql_stmt_close to mysql_stmt_free to not to conflict with client type Minor fixups to make SET variable=? to work client/insert_test.c: Added my_global.h to compile after my_list.h is added to mysql.h client/select_test.c: Added my_global.h to compile after my_list.h is added to mysql.h --- include/mysql.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mysql.h b/include/mysql.h index 230c0aad9df..67558e39cdb 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -61,6 +61,8 @@ typedef int my_socket; #define CHECK_EXTRA_ARGUMENTS #endif +#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ + extern unsigned int mysql_port; extern char *mysql_unix_port; @@ -213,6 +215,8 @@ typedef struct st_mysql struct st_mysql* last_used_slave; /* needed for round-robin slave pick */ /* needed for send/read/store/use result to work correctly with replication */ struct st_mysql* last_used_con; + + LIST *stmts; /* list of all statements */ } MYSQL; @@ -457,6 +461,7 @@ typedef struct st_mysql_stmt MYSQL_RES *result; /* resultset */ MYSQL_BIND *bind; /* row binding */ MYSQL_FIELD *fields; /* prepare meta info */ + LIST list; /* list to keep track of all stmts */ char *query; /* query buffer */ MEM_ROOT mem_root; /* root allocations */ MYSQL_RES tmp_result; /* Used by mysql_prepare_result */ @@ -469,8 +474,8 @@ typedef struct st_mysql_stmt char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ my_bool long_alloced; /* flag to indicate long alloced */ my_bool send_types_to_server; /* to indicate types supply to server */ - my_bool param_buffers; /* to indicate the param bound buffers */ - my_bool res_buffers; /* to indicate the result bound buffers */ + my_bool param_buffers; /* to indicate the param bound buffers */ + my_bool res_buffers; /* to indicate the output bound buffers */ } MYSQL_STMT; -- cgit v1.2.1