summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2010-11-26 17:22:06 +0300
committerAlexander Barkov <bar@mysql.com>2010-11-26 17:22:06 +0300
commitf826970656fa52884fbc7f0f6c86465cb7f0453f (patch)
tree022e1f7c9bd939d0bebdc56c40c2aae935a8fd0e /client
parente3dee8a7fd3e16147145b877917d4aa85346dfcb (diff)
parenta7c09ea9f8f730bcfe285ad8b3672f41dac5e468 (diff)
downloadmariadb-git-f826970656fa52884fbc7f0f6c86465cb7f0453f.tar.gz
Merging from mysql-5.1-bugteam
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 51c8b34b0a8..241cca49a5d 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1456,8 +1456,8 @@ static struct my_option my_long_options[] =
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"one-database", 'o',
- "Only update the default database. This is useful for skipping updates "
- "to other database in the update log.",
+ "Ignore statements except those that occur while the default "
+ "database is the one named at the command line.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef USE_POPEN
{"pager", OPT_PAGER,
@@ -2692,6 +2692,10 @@ static void get_current_db()
{
MYSQL_RES *res;
+ /* If one_database is set, current_db is not supposed to change. */
+ if (one_database)
+ return;
+
my_free(current_db);
current_db= NULL;
/* In case of error below current_db will be NULL */