diff options
-rw-r--r-- | .bzrignore | 1 | ||||
-rw-r--r-- | sql/mini_client.cc | 99 | ||||
-rw-r--r-- | sql/mini_client.h | 48 |
3 files changed, 1 insertions, 147 deletions
diff --git a/.bzrignore b/.bzrignore index bfde1876164..dd77bcb1d12 100644 --- a/.bzrignore +++ b/.bzrignore @@ -619,3 +619,4 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +sql/client.c diff --git a/sql/mini_client.cc b/sql/mini_client.cc deleted file mode 100644 index 8c431c0d1be..00000000000 --- a/sql/mini_client.cc +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - mini MySQL client to be included into the server to do server to server - commincation by Sasha Pachev - - Note: all file-global symbols must begin with mc_ , even the static ones, just - in case we decide to make them external at some point -*/ - -#include <my_global.h> - -#ifdef HAVE_EXTERNAL_CLIENT - -/* my_pthread must be included early to be able to fix things */ -#if defined(THREAD) -#include <my_pthread.h> /* because of signal() */ -#endif -#include <thr_alarm.h> -#include <mysql_embed.h> -#include <mysql_com.h> -#include <violite.h> -#include <my_sys.h> -#include <mysys_err.h> -#include <m_string.h> -#include <m_ctype.h> -#include "mysql.h" -#include "mini_client.h" -#include "mysql_version.h" -#include "mysqld_error.h" -#include "errmsg.h" -#include <assert.h> - -#if defined( OS2) && defined(MYSQL_SERVER) -#undef ER -#define ER CER -#endif - -extern "C" { // Because of SCO 3.2V4.2 -#include <sys/stat.h> -#include <signal.h> -#ifdef HAVE_PWD_H -#include <pwd.h> -#endif -#if !defined(MSDOS) && !defined(__WIN__) -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netdb.h> -#ifdef HAVE_SELECT_H -# include <select.h> -#endif -#ifdef HAVE_SYS_SELECT_H -#include <sys/select.h> -#endif -#endif /*!defined(MSDOS) && !defined(__WIN__) */ -#ifdef HAVE_SYS_UN_H -# include <sys/un.h> -#endif -#ifndef INADDR_NONE -#define INADDR_NONE -1 -#endif -} - -#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \ - CLIENT_LOCAL_FILES | CLIENT_SECURE_CONNECTION) - - -#if defined(MSDOS) || defined(__WIN__) -#define perror(A) -#else -#include <errno.h> -#define SOCKET_ERROR -1 -#endif - -extern ulong slave_net_timeout; -#define _mini_client_c -#define init_sigpipe_variables -#define set_sigpipe(mysql) -#define reset_sigpipe(mysql) -#include "../sql-common/client.c" - -#endif /* HAVE_EXTERNAL_CLIENT */ - - diff --git a/sql/mini_client.h b/sql/mini_client.h deleted file mode 100644 index 3388c342312..00000000000 --- a/sql/mini_client.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef _MINI_CLIENT_H -#define _MINI_CLIENT_H - -MYSQL * -mysql_real_connect(MYSQL *mysql,const char *host, const char *user, - const char *passwd, const char *db, - uint port, const char *unix_socket,ulong client_flag, - uint net_read_timeout); - -my_bool simple_command(MYSQL *mysql,enum enum_server_command command, - const char *arg, unsigned long length, - my_bool skip_check); -void mysql_close(MYSQL *mysql); -MYSQL *mysql_init(MYSQL *mysql); -void mysql_debug(const char *debug); -ulong net_safe_read(MYSQL *mysql); -const char *mysql_error(MYSQL *mysql); -unsigned int mysql_errno(MYSQL *mysql); -my_bool mysql_reconnect(MYSQL* mysql); -int mysql_send_query(MYSQL* mysql, const char* query, uint length); -my_bool mysql_read_query_result(MYSQL *mysql); -int mysql_real_query(MYSQL *mysql, const char *q, unsigned long length); -MYSQL_RES * mysql_store_result(MYSQL *mysql); -void mysql_free_result(MYSQL_RES *result); -void mysql_data_seek(MYSQL_RES *result, my_ulonglong row); -my_ulonglong mysql_num_rows(MYSQL_RES *res); -unsigned int mysql_num_fields(MYSQL_RES *res); -MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *res); -int mysql_select_db(MYSQL *mysql, const char *db); -void end_server(MYSQL *mysql); - -#endif |