diff options
author | unknown <monty@work.mysql.com> | 2001-09-13 09:52:35 +0200 |
---|---|---|
committer | unknown <monty@work.mysql.com> | 2001-09-13 09:52:35 +0200 |
commit | c96bf55b9c8641d4b1c2ece0c0314071bc1022df (patch) | |
tree | 1fb0fbca5b7a4edebe2c26a5ed0b272e92bc21f2 /client | |
parent | 9e4206b990df875e063a07784c77cc39dc394654 (diff) | |
parent | c88dd9b291cf7fe9086102d74d255f4b880d1486 (diff) | |
download | mariadb-git-c96bf55b9c8641d4b1c2ece0c0314071bc1022df.tar.gz |
Merge with 3.23.42
configure.in:
Auto merged
BitKeeper/deleted/.del-violite.c~d7b85be615595ace:
Auto merged
BitKeeper/deleted/.del-violite.c~984c09cffe14a11b:
Auto merged
client/Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
heap/hp_test2.c:
Auto merged
include/global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/myisam.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysql/net.c:
Auto merged
myisam/sort.c:
Auto merged
sql-bench/test-create.sh:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mini_client.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/net_serv.cc:
Auto merged
mysql-test/t/merge.test:
Auto merged
sql/ha_innobase.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/t/bdb.test:
Auto merged
Docs/manual.texi:
merge
myisam/myisampack.c:
merge
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 559cb27f01e..e39c663de15 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -19,6 +19,7 @@ INCLUDES = -I$(srcdir)/../include $(openssl_includes) \ -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 ec8b6689dcd..43df5037a68 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -27,17 +27,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> #include <violite.h> @@ -405,10 +400,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}, |