diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-12 23:53:31 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-12 23:53:31 +0300 |
commit | 76989cf55c016a9d8619f582f753444241a4d934 (patch) | |
tree | 51a09b9e3466647e4386ab24f3c9aa89ff7a93b9 /client | |
parent | a53e8ea0ac4f7d53297b7942febf04e02d8c3b54 (diff) | |
download | mariadb-git-76989cf55c016a9d8619f582f753444241a4d934.tar.gz |
OS2 patch
Docs/manual.texi:
Updated section of how to change the socket file.
Changelog for 3.23.43
include/merge.h:
Fixed typo
include/my_pthread.h:
Fixed bug for WIN32
include/myisam.h:
Fixed typo
include/nisam.h:
Fixed typo
sql/handler.h:
Fixed typo
sql/sql_table.cc:
Fixed typo
sql/unireg.cc:
F
Diffstat (limited to 'client')
-rw-r--r-- | client/Makefile.am | 1 | ||||
-rw-r--r-- | client/client_priv.h | 31 | ||||
-rw-r--r-- | client/mysql.cc | 11 | ||||
-rw-r--r-- | client/mysqladmin.c | 9 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 16 | ||||
-rw-r--r-- | client/mysqlcheck.c | 12 | ||||
-rw-r--r-- | client/mysqlimport.c | 10 |
7 files changed, 43 insertions, 47 deletions
diff --git a/client/Makefile.am b/client/Makefile.am index a91c7d05f77..380c9f2acbe 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -19,6 +19,7 @@ INCLUDES = -I$(srcdir)/../include \ -I../include -I$(srcdir)/.. -I$(top_srcdir) \ -I.. +noinst_HEADERS = client_priv.h LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ diff --git a/client/client_priv.h b/client/client_priv.h new file mode 100644 index 00000000000..7bee03a8ab5 --- /dev/null +++ b/client/client_priv.h @@ -0,0 +1,31 @@ +/* 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 */ + +/* Common defines for all clients */ + +#include <global.h> +#include <my_sys.h> +#include <m_string.h> +#include <mysql.h> +#include <errmsg.h> +#include <getopt.h> + +/* We have to define 'enum options' identical in all files to keep OS2 happy */ + +enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, + OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE, + OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS, + OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES}; diff --git a/client/mysql.cc b/client/mysql.cc index e4db7e93256..96536c9d5f0 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -25,17 +25,12 @@ * **/ -#include <global.h> -#include <my_sys.h> -#include <m_string.h> +#include "client_priv.h" #include <m_ctype.h> -#include "mysql.h" -#include "errmsg.h" #include <my_dir.h> #ifndef __GNU_LIBRARY__ #define __GNU_LIBRARY__ // Skip warnings in getopt.h #endif -#include <getopt.h> #include "my_readline.h" #include <signal.h> @@ -380,10 +375,6 @@ sig_handler mysql_end(int sig) exit(status.exit_status); } -enum options {OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, - OPT_PAGER, OPT_NOPAGER, OPT_TEE, OPT_NOTEE} ; - - static struct option long_options[] = { {"i-am-a-dummy", optional_argument, 0, 'U'}, diff --git a/client/mysqladmin.c b/client/mysqladmin.c index e95d6492949..ca568a914f2 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -17,13 +17,8 @@ /* maintaince of mysql databases */ -#include <global.h> -#include <my_sys.h> -#include <m_string.h> +#include "client_priv.h" #include <signal.h> -#include "mysql.h" -#include "errmsg.h" -#include <getopt.h> #ifdef THREAD #include <my_pthread.h> /* because of signal() */ #endif @@ -102,8 +97,6 @@ static const char *command_names[]= { static TYPELIB command_typelib= { array_elements(command_names)-1,"commands", command_names}; -enum options { OPT_CHARSETS_DIR=256 }; - static struct option long_options[] = { {"compress", no_argument, 0, 'C'}, {"character-sets-dir", required_argument, 0, OPT_CHARSETS_DIR}, diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 289f5aa517f..ac2f3e4efda 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -17,23 +17,20 @@ #define MYSQL_CLIENT #undef MYSQL_SERVER -#include <global.h> -#include <m_string.h> -#include <my_sys.h> -#include <getopt.h> -#include <mysql.h> +#include "client_priv.h" #include <time.h> #include "log_event.h" #define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES) +#ifndef OS2 extern "C" { int simple_command(MYSQL *mysql,enum enum_server_command command, - const char *arg, - uint length, my_bool skipp_check); - int net_safe_read(MYSQL* mysql); + const char *arg, uint length, my_bool skipp_check); + uint net_safe_read(MYSQL* mysql); } +#endif char server_version[SERVER_VERSION_LENGTH]; uint32 server_id = 0; @@ -42,7 +39,8 @@ uint32 server_id = 0; ulong bytes_sent = 0L, bytes_received = 0L; ulong mysqld_net_retry_count = 10L; uint test_flags = 0; -FILE *result_file; + +static FILE *result_file; #ifndef DBUG_OFF static const char* default_dbug_option = "d:t:o,/tmp/mysqlbinlog.trace"; diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index ebaa8366c72..0f7bfb37ecf 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -18,19 +18,12 @@ #define CHECK_VERSION "1.02" -#include <global.h> -#include <my_sys.h> -#include <m_string.h> +#include "client_priv.h" #include <m_ctype.h> - -#include "mysql.h" #include "mysql_version.h" #include "mysqld_error.h" -#include <getopt.h> #include "sslopt-vars.h" -#include <m_string.h> - /* Exit codes */ #define EX_USAGE 1 @@ -50,9 +43,6 @@ DYNAMIC_ARRAY tables4repair; enum operations {DO_CHECK, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE}; -enum options {OPT_CHARSETS_DIR=256, OPT_COMPRESS, OPT_DEFAULT_CHARSET, - OPT_TABLES, OPT_AUTO_REPAIR}; - static struct option long_options[] = { {"all-databases", no_argument, 0, 'A'}, diff --git a/client/mysqlimport.c b/client/mysqlimport.c index cbdedf56cbe..d8f763b9653 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -27,13 +27,8 @@ */ #define IMPORT_VERSION "2.7" -#include <global.h> -#include <my_sys.h> -#include <m_string.h> -#include "mysql.h" +#include "client_priv.h" #include "mysql_version.h" -#include <getopt.h> - static void db_error_with_table(MYSQL *mysql, char *table); static void db_error(MYSQL *mysql); @@ -54,9 +49,6 @@ static uint opt_mysql_port=0; static my_string opt_mysql_unix_port=0; #include "sslopt-vars.h" -enum mi_options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, - OPT_LOW_PRIORITY, OPT_CHARSETS_DIR, OPT_DEFAULT_CHARSET}; - static struct option long_options[] = { {"character-sets-dir", required_argument, 0, OPT_CHARSETS_DIR}, |