summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <tim@black.box>2001-08-10 12:37:36 -0400
committerunknown <tim@black.box>2001-08-10 12:37:36 -0400
commitb538ff90dad25d5975b68182bd064bc7a95ebfc2 (patch)
tree0b1bf2d0aed5c3d69b112448bb146dcc526f9890 /libmysql
parent4bb40187438bdfb8b1d8b091399bd01e0e3425c1 (diff)
downloadmariadb-git-b538ff90dad25d5975b68182bd064bc7a95ebfc2.tar.gz
Embedded mysql fixes.
There is now a mysql_server_init() function which needs to be called at the beginning of the program (and _end() for the end of the program). This routine handles argument parsing for the embedded server. Use the embedded version of mysql_load_file() (ignore the LOCAL argument, since the client and server are the same program). There are now mysql_thread_init/end() functions for the client to use in a multi-threaded app. They are just wrappers for my_thread_init/end(). BitKeeper/deleted/.del-README~434e9cae5fa9a4c4: Delete: libmysqld/README libmysqld/lib_load.cc: minor cleanup include/mysql.h: add mysql_server/thread_init/end() libmysql/libmysql.c: add mysql_server/thread_init/end() libmysqld/lib_sql.cc: add mysql_server/thread_init/end() libmysqld/libmysqld.c: add mysql_server/thread_init/end() sql/mysqld.cc: allow get_options() to be called more than once libmysqld/Makefile.am: use lib_load.cc instead of sql_load.cc BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 22b3c75fcb9..9334f7949bd 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -94,6 +94,28 @@ static sig_handler pipe_sig_handler(int sig);
static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to,
const char *from, ulong length);
+void mysql_server_init(int argc __attribute__((unused)),
+ char **argv __attribute__((unused)),
+ const char **groups __attribute__((unused))) {}
+
+void mysql_server_end() {}
+
+my_bool mysql_thread_init()
+{
+#ifdef THREAD
+ return my_thread_init();
+#else
+ return 0;
+#endif
+}
+
+void mysql_thread_end()
+{
+#ifdef THREAD
+ my_thread_end();
+#endif
+}
+
/*
Let the user specify that we don't want SIGPIPE; This doesn't however work
with threaded applications as we can have multiple read in progress.