~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzleimport.cc

  • Committer: Monty Taylor
  • Date: 2009-06-30 18:09:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1083.
  • Revision ID: mordred@inaugust.com-20090630180907-r24363hlhgxg4cbw
Whole boat-load of build fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
static char  *opt_password= NULL, *current_user= NULL,
57
57
    *current_host= NULL, *current_db= NULL, *fields_terminated= NULL,
58
58
    *lines_terminated= NULL, *enclosed= NULL, *opt_enclosed= NULL,
59
 
    *escaped= NULL, *opt_columns= NULL,
60
 
    *default_charset= (char*) DRIZZLE_DEFAULT_CHARSET_NAME;
 
59
    *escaped= NULL, *opt_columns= NULL;
61
60
static uint32_t opt_drizzle_port= 0;
62
61
static char * opt_drizzle_unix_port= 0;
63
62
static int64_t opt_ignore_lines= -1;
64
 
static const CHARSET_INFO *charset_info= &my_charset_utf8_general_ci;
65
63
 
66
64
static struct my_option my_long_options[] =
67
65
{
68
 
  {"default-character-set", OPT_DEFAULT_CHARSET,
69
 
   "Set the default character set.", (char**) &default_charset,
70
 
   (char**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
71
66
  {"columns", 'c',
72
67
   "Use only these columns to import the data to. Give the column names in a comma separated list. This is same as giving columns to LOAD DATA INFILE.",
73
68
   (char**) &opt_columns, (char**) &opt_columns, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
157
152
 
158
153
static void print_version(void)
159
154
{
160
 
  printf("%s  Ver %s Distrib %s, for %s (%s)\n" ,my_progname,
161
 
    IMPORT_VERSION, drizzle_version(),SYSTEM_TYPE,MACHINE_TYPE);
 
155
  printf("%s  Ver %s Distrib %s, for %s-%s (%s)\n" ,my_progname,
 
156
    IMPORT_VERSION, drizzle_version(),HOST_VENDOR,HOST_OS,HOST_CPU);
162
157
}
163
158
 
164
159
 
269
264
    fprintf(stderr, "You can't use --ignore_unique (-i) and --replace (-r) at the same time.\n");
270
265
    return(1);
271
266
  }
272
 
  if (strcmp(default_charset, charset_info->csname) &&
273
 
      !(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY)))
274
 
    exit(1);
275
267
  if (*argc < 2)
276
268
  {
277
269
    usage();