mariadb/libmysqld/lib_load.cc
unknown b538ff90da 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
2001-08-10 12:37:36 -04:00

39 lines
1.3 KiB
C++

/*
* Copyright (c) 2000
* SWsoft company
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* Copy data from a textfile to table */
#include "mysql_priv.h"
#include <my_dir.h>
#include <m_ctype.h>
int
mysql_load_internal(THD * thd, sql_exchange * ex, TABLE_LIST * table_list,
List<Item> & fields, enum enum_duplicates handle_duplicates,
bool read_file_from_client, thr_lock_type lock_type);
int
mysql_load(THD * thd, sql_exchange * ex, TABLE_LIST * table_list,
List<Item> & fields, enum enum_duplicates handle_duplicates,
bool read_file_from_client, thr_lock_type lock_type)
{
read_file_from_client = 0; //server is always in the same process
return mysql_load_internal(thd, ex, table_list, fields, handle_duplicates,
read_file_from_client, lock_type);
}
#define mysql_load mysql_load_internal
#include "../sql/sql_load.cc"