MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:May 12 2006 3:53pm
Subject:bk commit into 5.0 tree (msvensson:1.2129) BUG#18209
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2129 06/05/12 17:53:04 msvensson@neptunus.(none) +1 -0
  Bug#18209 mysqldump: ignoring option '--databases' due to invalid value 'xcc'

  client/mysqldump.c
    1.227 06/05/12 17:53:00 msvensson@neptunus.(none) +6 -2
    Add option --database and let it select which database to dump if 
    no name arguments are specified. It will be ignored it user specifies
    databases or tables on the command line.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/my50-bug18209

--- 1.226/client/mysqldump.c	2006-04-18 17:58:22 +02:00
+++ 1.227/client/mysqldump.c	2006-05-12 17:53:00 +02:00
@@ -99,7 +99,7 @@
 static MYSQL mysql_connection,*sock=0;
 static my_bool insert_pat_inited=0;
 static DYNAMIC_STRING insert_pat;
-static char  *opt_password=0,*current_user=0,
+static char  *opt_password=0,*current_user=0, *opt_database=0,
              *current_host=0,*path=0,*fields_terminated=0,
              *lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0,
              *where=0, *order_by=0,
@@ -202,6 +202,8 @@
    "Include all MySQL specific create options.",
    (gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1,
    0, 0, 0, 0, 0},
+  {"database", 'D', "Database to dump.", (gptr*) &opt_database,
+   (gptr*) &opt_database, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
   {"databases", 'B',
    "To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.",
    (gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
@@ -798,7 +800,7 @@
       !(charset_info= get_charset_by_csname(default_charset, 
   					    MY_CS_PRIMARY, MYF(MY_WME))))
     exit(1);
-  if ((*argc < 1 && !opt_alldbs) || (*argc > 0 && opt_alldbs))
+  if ((*argc < 1 && !opt_alldbs && !opt_database) || (*argc > 0 && opt_alldbs))
   {
     short_usage();
     return 1;
@@ -3526,6 +3528,8 @@
 
   if (opt_alldbs)
     dump_all_databases();
+  if (opt_database && argc == 0)
+    dump_all_tables_in_db(opt_database);
   else if (argc > 1 && !opt_databases)
   {
     /* Only one database and selected table(s) */
Thread
bk commit into 5.0 tree (msvensson:1.2129) BUG#18209msvensson12 May