summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-12-31 00:50:30 +0200
committerunknown <monty@mysql.com>2004-12-31 00:50:30 +0200
commit12a215b0833d9aa688ba16fe56eb3411a83e7d4f (patch)
treed4dfebc9b9c93790a9be3f9e6807f3923a6b3d3e /client
parentcdf70f2ede108267ce492abada82ca753f269e25 (diff)
parent2e8d13c73ec986dde580c9c840f421af4279611a (diff)
downloadmariadb-git-12a215b0833d9aa688ba16fe56eb3411a83e7d4f.tar.gz
Merge with global tree
BitKeeper/etc/logging_ok: auto-union client/mysqltest.c: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/include/dict0dict.h: Auto merged libmysql/errmsg.c: Auto merged myisam/mi_open.c: Auto merged myisam/mi_write.c: Auto merged mysql-test/r/grant.result: Auto merged mysql-test/r/merge.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/t/derived.test: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/system_mysql_db_fix.test: Auto merged scripts/mysql_install_db.sh: Auto merged sql/ha_innodb.cc: Auto merged sql/handler.cc: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sp.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged sql/tztime.h: Auto merged
Diffstat (limited to 'client')
-rw-r--r--client/Makefile.am5
-rw-r--r--client/mysql.cc4
-rw-r--r--client/mysqldump.c10
-rw-r--r--client/mysqltest.c5
4 files changed, 15 insertions, 9 deletions
diff --git a/client/Makefile.am b/client/Makefile.am
index 95000fff5c5..bd39ad6c664 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -21,6 +21,7 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \
$(openssl_includes) -I$(top_srcdir)/extra
LIBS = @CLIENT_LIBS@
DEPLIB= ../libmysql/libmysqlclient.la
+REGEXLIB= ../regex/libregex.a
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB)
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
@@ -37,8 +38,8 @@ mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
mysqltest_SOURCES= mysqltest.c ../mysys/my_getsystime.c
-mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
-mysqltest_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a
+mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(REGEXLIB) $(DEPLIB)
+mysqltest_LDADD = $(REGEXLIB) $(LDADD)
mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c
mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
mysqlmanagerc_SOURCES = mysqlmanagerc.c
diff --git a/client/mysql.cc b/client/mysql.cc
index cb3a56972fa..ace595f9cad 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1677,7 +1677,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
if (num_fields == 2)
{
put_info("Many help items for your request exist.", INFO_INFO);
- put_info("To make a more specific request, please type 'help <item>',\nwhere item is one of the following", INFO_INFO);
+ put_info("To make a more specific request, please type 'help <item>',\nwhere <item> is one of the following", INFO_INFO);
num_name= 0;
num_cat= 1;
last_char= '_';
@@ -1685,7 +1685,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
else if ((cur= mysql_fetch_row(result)))
{
tee_fprintf(PAGER, "You asked for help about help category: \"%s\"\n", cur[0]);
- put_info("For more information, type 'help <item>', where item is one of the following", INFO_INFO);
+ put_info("For more information, type 'help <item>', where <item> is one of the following", INFO_INFO);
num_name= 1;
num_cat= 2;
print_help_item(&cur,1,2,&last_char);
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 8fb48753a8c..042ce7e28a5 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -160,7 +160,7 @@ static struct my_option my_long_options[] =
(gptr*) &opt_compatible_mode_str, (gptr*) &opt_compatible_mode_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"compact", OPT_COMPACT,
- "Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --no-set-names --skip-disable-keys --skip-lock-tables",
+ "Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --no-set-names --skip-disable-keys --skip-add-locks",
(gptr*) &opt_compact, (gptr*) &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"complete-insert", 'c', "Use complete insert statements.", (gptr*) &cFlag,
@@ -1848,8 +1848,6 @@ static void dumpTable(uint numFields, char *table)
err:
if (query != query_buf)
my_free(query, MYF(MY_ALLOW_ZERO_PTR));
- if (order_by)
- my_free(order_by, MYF(0));
safe_exit(error);
return;
} /* dumpTable */
@@ -1967,7 +1965,7 @@ static int init_dumping(char *database)
sprintf(qbuf,"SHOW CREATE DATABASE IF NOT EXISTS %s",
qdatabase);
- if (mysql_query_with_error_report(sock, &dbinfo, qbuf))
+ if (mysql_query(sock, qbuf) || !(dbinfo = mysql_store_result(sock)))
{
/* Old server version, dump generic CREATE DATABASE */
fprintf(md_result_file,
@@ -2029,6 +2027,8 @@ static int dump_all_tables_in_db(char *database)
numrows = getTableStructure(table, database);
if (!dFlag && numrows > 0)
dumpTable(numrows,table);
+ my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
+ order_by= 0;
}
if (opt_xml)
{
@@ -2130,6 +2130,8 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
numrows = getTableStructure(table_names[i], db);
if (!dFlag && numrows > 0)
dumpTable(numrows, table_names[i]);
+ my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
+ order_by= 0;
}
if (was_views)
{
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 8ddcfb90cad..bf8f0935067 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -227,7 +227,7 @@ typedef struct
int alloced;
} VAR;
-#ifdef __NETWARE__
+#if defined(__NETWARE__) || defined(__WIN__)
/*
Netware doesn't proved environment variable substitution that is done
by the shell in unix environments. We do this in the following function:
@@ -4609,6 +4609,9 @@ static char *subst_env_var(const char *str)
*/
#undef popen /* Remove wrapper */
+#ifdef __WIN__
+#define popen _popen /* redefine for windows */
+#endif
FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
{