~vjsamuel/drizzle/bug-616035

« back to all changes in this revision

Viewing changes to client/drizzlecheck.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:
50
50
static int my_end_arg;
51
51
static char * opt_drizzle_unix_port= NULL;
52
52
static char *opt_password= NULL, *current_user= NULL,
53
 
      *default_charset= (char *)DRIZZLE_DEFAULT_CHARSET_NAME,
54
53
      *current_host= NULL;
55
54
static int first_error= 0;
56
55
 
88
87
  {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
89
88
   (char**) &debug_info_flag, (char**) &debug_info_flag,
90
89
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
91
 
  {"default-character-set", OPT_DEFAULT_CHARSET,
92
 
   "Set the default character set.", (char**) &default_charset,
93
 
   (char**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
94
90
  {"fast",'F', "Check only tables that haven't been closed properly.",
95
91
   (char**) &opt_fast, (char**) &opt_fast, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
96
92
   0},
179
175
 
180
176
static void print_version(void)
181
177
{
182
 
  printf("%s  Ver %s Distrib %s, for %s (%s)\n", my_progname, CHECK_VERSION,
183
 
         drizzle_version(), SYSTEM_TYPE, MACHINE_TYPE);
 
178
  printf("%s  Ver %s Distrib %s, for %s-%s (%s)\n", my_progname, CHECK_VERSION,
 
179
         drizzle_version(), HOST_VENDOR, HOST_OS, HOST_CPU);
184
180
} /* print_version */
185
181
 
186
182
static void usage(void)
240
236
    break;
241
237
  case OPT_FIX_DB_NAMES:
242
238
    what_to_do= DO_UPGRADE;
243
 
    default_charset= (char*) "utf8";
244
239
    opt_databases= 1;
245
240
    break;
246
241
  case OPT_FIX_TABLE_NAMES:
247
242
    what_to_do= DO_UPGRADE;
248
 
    default_charset= (char*) "utf8";
249
243
    break;
250
244
  case 'p':
251
245
    temp_drizzle_port= (uint64_t) strtoul(argument, &endchar, 10);
343
337
      what_to_do = DO_CHECK;
344
338
  }
345
339
 
346
 
  /* TODO: This variable is not yet used */
347
 
  if (strcmp(default_charset, charset_info->csname) &&
348
 
      !(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY)))
349
 
      exit(1);
350
340
  if (*argc > 0 && opt_alldbs)
351
341
  {
352
342
    printf("You should give only options, no arguments at all, with option\n");