summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2008-12-13 19:42:12 +0000
committerAlfranio Correia <alfranio.correia@sun.com>2008-12-13 19:42:12 +0000
commit19f859a27e60270f3cdc7e2edc34e88c29536c21 (patch)
tree3ca8c469534126c025304d8d96dbeb2b359a6c00 /client
parent5c16a315ca28c18949e27b91cddf0886329d1dd4 (diff)
parentba816c14a9bc8012759da9d58f858f1e73bec708 (diff)
downloadmariadb-git-19f859a27e60270f3cdc7e2edc34e88c29536c21.tar.gz
merge 5.1 --> 5.1-rpl
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc2
-rw-r--r--client/mysqlcheck.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 024194d81f6..ff53d623d07 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1627,8 +1627,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_nopager= 1;
break;
case OPT_MYSQL_PROTOCOL:
+#ifndef EMBEDDED_LIBRARY
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
+#endif
break;
case OPT_SERVER_ARG:
#ifdef EMBEDDED_LIBRARY
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index e71cf70d882..17ebca497e4 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -517,9 +517,14 @@ static int process_all_tables_in_db(char *database)
LINT_INIT(res);
if (use_db(database))
return 1;
- if (mysql_query(sock, "SHOW /*!50002 FULL*/ TABLES") ||
- !((res= mysql_store_result(sock))))
+ if ((mysql_query(sock, "SHOW /*!50002 FULL*/ TABLES") &&
+ mysql_query(sock, "SHOW TABLES")) ||
+ !(res= mysql_store_result(sock)))
+ {
+ my_printf_error(0, "Error: Couldn't get table list for database %s: %s",
+ MYF(0), database, mysql_error(sock));
return 1;
+ }
num_columns= mysql_num_fields(res);