1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

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
This commit is contained in:
unknown
2001-08-10 12:37:36 -04:00
parent 4bb4018743
commit b538ff90da
9 changed files with 98 additions and 64 deletions

View File

@@ -15,8 +15,6 @@
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA */
/* defines for the libmysql library */
#ifndef _mysql_h
#define _mysql_h
@@ -222,6 +220,20 @@ typedef struct st_mysql_res {
my_bool eof; /* Used my mysql_fetch_row */
} MYSQL_RES;
/* Set up and bring down the server; to ensure that applications will
* work when linked against either the standard client library or the
* embedded server library, these functions should be called. */
void mysql_server_init(int argc, char **argv, const char **groups);
void mysql_server_end();
/* Set up and bring down a thread; these function should be called
* for each thread in an application which opens at least one MySQL
* connection. All uses of the connection(s) should be between these
* function calls. */
my_bool mysql_thread_init();
void mysql_thread_end();
/* Functions to get information from the MYSQL and MYSQL_RES structures */
/* Should definitely be used if one uses shared libraries */
@@ -359,15 +371,13 @@ unsigned int STDCALL mysql_thread_safe(void);
#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
#ifndef USE_OLD_FUNCTIONS
#ifdef USE_OLD_FUNCTIONS
MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host,
const char *user, const char *passwd);
int STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
#endif
/* new api functions */
#define HAVE_MYSQL_REAL_CONNECT
#ifndef MYSQL_SERVER