~stewart/drizzle/embedded-innodb-rnd-read

« back to all changes in this revision

Viewing changes to client/drizzleslap.cc

  • Committer: Stewart Smith
  • Date: 2010-03-30 13:09:42 UTC
  • mfrom: (1310.1.38)
  • Revision ID: stewart@flamingspork.com-20100330130942-859uivdm20p36sk3
Merged embedded-innodb-write-row into embedded-innodb-rnd-read.

Show diffs side-by-side

added added

removed removed

Lines of Context:
727
727
  my_print_help(my_long_options);
728
728
}
729
729
 
730
 
static bool get_one_option(int optid, const struct my_option *, char *argument)
 
730
static int get_one_option(int optid, const struct my_option *, char *argument)
731
731
{
732
732
  char *endchar= NULL;
733
733
  uint64_t temp_drizzle_port= 0;
742
742
    if (strlen(endchar) != 0)
743
743
    {
744
744
      fprintf(stderr, _("Non-integer value supplied for port.  If you are trying to enter a password please use --password instead.\n"));
745
 
      exit(1);
 
745
      return EXIT_ARGUMENT_INVALID;
746
746
    }
747
747
    /* If the port number is > 65535 it is not a valid port
748
748
       This also helps with potential data loss casting unsigned long to a
750
750
    if ((temp_drizzle_port == 0) || (temp_drizzle_port > 65535))
751
751
    {
752
752
      fprintf(stderr, _("Value supplied for port is not valid.\n"));
753
 
      exit(1);
 
753
      return EXIT_ARGUMENT_INVALID;
754
754
    }
755
755
    else
756
756
    {
768
768
      {
769
769
        fprintf(stderr, "Memory allocation error while copying password. "
770
770
                        "Aborting.\n");
771
 
        exit(ENOMEM);
 
771
        return EXIT_OUT_OF_MEMORY;
772
772
      }
773
773
      while (*argument)
774
774
      {