~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzlecheck.cc

  • Committer: Lee
  • Date: 2008-10-03 23:31:06 UTC
  • mfrom: (413.2.3 drizzle)
  • mto: This revision was merged to the branch mainline in revision 459.
  • Revision ID: lbieber@lbieber-desktop-20081003233106-tgvzu0fh25gb3xeg
breaking out enum field classes

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
    if (argument)
259
259
    {
260
260
      char *start = argument;
261
 
      free(opt_password);
 
261
      my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
262
262
      opt_password = my_strdup(argument, MYF(MY_FAE));
263
263
      while (*argument) *argument++= 'x';    /* Destroy argument */
264
264
      if (*start)
340
340
    return 1;
341
341
  }
342
342
  if (tty_password)
343
 
    opt_password = get_tty_password(NULL);
 
343
    opt_password = get_tty_password(NullS);
344
344
  if (debug_info_flag)
345
345
    my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
346
346
  if (debug_check_flag)
413
413
    }
414
414
    *--end = 0;
415
415
    handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1);
416
 
    free(table_names_comma_sep);
 
416
    my_free(table_names_comma_sep, MYF(0));
417
417
  }
418
418
  else
419
419
    for (; tables > 0; tables--, table_names++)
506
506
    *--end = 0;
507
507
    if (tot_length)
508
508
      handle_request_for_tables(tables + 1, tot_length - 1);
509
 
    free(tables);
 
509
    my_free(tables, MYF(0));
510
510
  }
511
511
  else
512
512
  {
639
639
 
640
640
    ptr= my_stpcpy(my_stpcpy(query, op), " TABLE ");
641
641
    ptr= fix_table_name(ptr, tables);
642
 
    ptr= strxmov(ptr, " ", options, NULL);
 
642
    ptr= strxmov(ptr, " ", options, NullS);
643
643
    query_length= (uint) (ptr - query);
644
644
  }
645
645
  if (drizzle_real_query(sock, query, query_length))
649
649
    return 1;
650
650
  }
651
651
  print_result();
652
 
  free(query);
 
652
  my_free(query, MYF(0));
653
653
  return 0;
654
654
}
655
655
 
713
713
  }
714
714
  drizzle_create(&drizzle_connection);
715
715
  if (opt_compress)
716
 
    drizzle_options(&drizzle_connection, DRIZZLE_OPT_COMPRESS, NULL);
 
716
    drizzle_options(&drizzle_connection, DRIZZLE_OPT_COMPRESS, NullS);
717
717
  if (opt_protocol)
718
718
    drizzle_options(&drizzle_connection,DRIZZLE_OPT_PROTOCOL,(char*)&opt_protocol);
719
719
  if (!(sock = drizzle_connect(&drizzle_connection, host, user, passwd,
804
804
  }
805
805
 end:
806
806
  dbDisconnect(current_host);
807
 
  free(opt_password);
 
807
  my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
808
808
  my_end(my_end_arg);
809
809
  return(first_error!=0);
810
810
} /* main */