summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-09-29 14:09:51 +0500
committerunknown <hf@deer.(none)>2003-09-29 14:09:51 +0500
commit15779a96d719e42aaf3c56a65ead971ec08465fc (patch)
treee6a406a016c1af6cb1f6d39ec322de1723cf85f1 /libmysqld
parent9a942c854fb232341037b7bc12e4e084be1b4692 (diff)
downloadmariadb-git-15779a96d719e42aaf3c56a65ead971ec08465fc.tar.gz
SCRUM
embedded library some fixes - cleanup procedure changed for embedded library - deletion of embedded mysql->thd include/mysql.h: free_embedded_thd added to the list of virtual methods libmysqld/embedded_priv.h: function deleted libmysqld/lib_sql.cc: function moved upper in file sql-common/client.c: call of free_embedded_thd added
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/embedded_priv.h1
-rw-r--r--libmysqld/lib_sql.cc21
2 files changed, 10 insertions, 12 deletions
diff --git a/libmysqld/embedded_priv.h b/libmysqld/embedded_priv.h
index 75461bbfbe0..833cc1b1f80 100644
--- a/libmysqld/embedded_priv.h
+++ b/libmysqld/embedded_priv.h
@@ -26,7 +26,6 @@ C_MODE_START
extern void lib_connection_phase(NET *net, int phase);
extern void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db);
extern void *create_embedded_thd(int client_flag, char *db);
-extern void free_embedded_thd(MYSQL *mysql);
extern MYSQL_METHODS embedded_methods;
void free_old_query(MYSQL *mysql);
extern my_bool server_inited;
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 38fc3cce9ee..36b03279707 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -210,6 +210,14 @@ int STDCALL emb_unbuffered_fetch(MYSQL *mysql, char **row)
return 0;
}
+static void STDCALL emb_free_embedded_thd(MYSQL *mysql)
+{
+ THD *thd= (THD*)mysql->thd;
+ if (thd->data)
+ free_rows(thd->data);
+ delete thd;
+}
+
MYSQL_METHODS embedded_methods=
{
emb_mysql_read_query_result,
@@ -221,7 +229,8 @@ MYSQL_METHODS embedded_methods=
emb_read_prepare_result,
emb_stmt_execute,
emb_read_binary_rows,
- emb_unbuffered_fetch
+ emb_unbuffered_fetch,
+ emb_free_embedded_thd
};
C_MODE_END
@@ -493,16 +502,6 @@ err:
}
#endif
-void free_embedded_thd(MYSQL *mysql)
-{
- THD *thd= (THD*)mysql->thd;
- if (!thd)
- return;
- if (thd->data)
- free_rows(thd->data);
- delete thd;
-}
-
C_MODE_END
bool Protocol::send_fields(List<Item> *list, uint flag)