~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Brian Aker
  • Date: 2009-07-11 08:51:36 UTC
  • mfrom: (1089.3.11 merge)
  • Revision ID: brian@gaz-20090711085136-qj01nwm3qynghwtc
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2008 Drizzle Open Source Development Project
 
1
/* Copyright 2000-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
2
2
 
3
3
   This program is free software; you can redistribute it and/or modify
4
4
   it under the terms of the GNU General Public License as published by
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/* drizzledump.cc  - Dump a tables contents and format to an ASCII file
 
17
 
 
18
 * Derived from mysqldump, which originally came from:
17
19
**
18
20
** The author's original notes follow :-
19
21
**
22
24
** WARRANTY: None, expressed, impressed, implied
23
25
**          or other
24
26
** STATUS: Public domain
 
27
 
 
28
* and more work by Monty, Jani & Sinisa
 
29
* and all the MySQL developers over the years.
25
30
*/
26
31
 
27
 
#define DUMP_VERSION "10.13"
28
 
 
29
32
#include "client_priv.h"
30
33
#include <string>
31
34
 
342
345
  {"show-progress-size", OPT_SHOW_PROGRESS_SIZE, N_("Number of rows before each output progress report (requires --verbose)."),
343
346
   (char**) &show_progress_size, (char**) &show_progress_size, 0, GET_UINT32, REQUIRED_ARG,
344
347
   10000, 0, 0, 0, 0, 0},
345
 
#ifndef DONT_ALLOW_USER_CHANGE
346
348
  {"user", 'u', "User for login if not current user.",
347
349
   (char**) &current_user, (char**) &current_user, 0, GET_STR, REQUIRED_ARG,
348
350
   0, 0, 0, 0, 0, 0},
349
 
#endif
350
351
  {"verbose", 'v', "Print info about the various stages.",
351
352
   (char**) &verbose, (char**) &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
352
353
  {"version",'V', "Output version information and exit.", 0, 0, 0,
416
417
 
417
418
static void print_version(void)
418
419
{
419
 
  printf(_("%s  Ver %s Distrib %s, for %s-%s (%s)\n"),my_progname,DUMP_VERSION,
420
 
         drizzle_version(),HOST_VENDOR,HOST_OS,HOST_CPU);
 
420
  printf(_("%s  Drizzle %s libdrizzle %s, for %s-%s (%s)\n"), my_progname,
 
421
         VERSION, drizzle_version(), HOST_VENDOR, HOST_OS, HOST_CPU);
421
422
} /* print_version */
422
423
 
423
424
 
433
434
static void usage(void)
434
435
{
435
436
  print_version();
436
 
  puts(_("By Igor Romanenko, Monty, Jani & Sinisa"));
 
437
  puts("");
437
438
  puts(_("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"));
438
 
  puts(_("Dumping definition and data DRIZZLE database or table"));
 
439
  puts(_("Dumps definitions and data from a Drizzle database server"));
439
440
  short_usage_sub();
440
441
  print_defaults("drizzle",load_default_groups);
441
442
  my_print_help(my_long_options);
469
470
    if (opt_comments)
470
471
    {
471
472
      fprintf(sql_file,
472
 
              "-- DRIZZLE dump %s  Distrib %s, for %s-%s (%s)\n--\n",
473
 
              DUMP_VERSION, drizzle_version(), HOST_VENDOR, HOST_OS, HOST_CPU);
 
473
              "-- drizzledump %s libdrizzle %s, for %s-%s (%s)\n--\n",
 
474
              VERSION, drizzle_version(), HOST_VENDOR, HOST_OS, HOST_CPU);
474
475
      fprintf(sql_file, "-- Host: %s    Database: %s\n",
475
476
              current_host ? current_host : "localhost", db_name ? db_name :
476
477
              "");