Commit 33a377c7 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi
Browse files

Remove remains of old getopt

parent 0e759036
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include "ftdefs.h"
#include <my_getopt.h>

static void get_options(int argc,char *argv[]);
static void get_options(int *argc,char **argv[]);
static void usage();
static void complain(int val);

@@ -66,7 +66,7 @@ int main(int argc,char *argv[])
  struct { MI_INFO *info; } aio0, *aio=&aio0; /* for GWS_IN_USE */

  MY_INIT(argv[0]);
  get_options(argc,argv);
  get_options(&argc, &argv);
  if (count || dump)
    verbose=0;
  if (!count && !dump && !lstats && !query)
@@ -75,17 +75,18 @@ int main(int argc,char *argv[])
  if (verbose)
    setbuf(stdout,NULL);

  if (argc-optind < 2)
  if (argc < 2)
    usage();

  if (!(info=mi_open(argv[optind],2,HA_OPEN_ABORT_IF_LOCKED)))
  if (!(info=mi_open(argv[0],2,HA_OPEN_ABORT_IF_LOCKED)))
    goto err;

  inx=atoi(argv[optind+1]);
  inx=atoi(argv[1]);
  *buf2=0;
  aio->info=info;

  if ((inx >= info->s->base.keys) || !(info->s->keyinfo[inx].flag & HA_FULLTEXT))
  if ((inx >= info->s->base.keys) ||
      !(info->s->keyinfo[inx].flag & HA_FULLTEXT))
  {
    printf("Key %d in table %s is not a FULLTEXT key\n", inx, info->filename);
    goto err;
@@ -240,11 +241,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  return 0;
}

static void get_options(int argc, char *argv[])

static void get_options(int *argc, char **argv[])
{
  int ho_error;

  if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
  if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
    exit(ho_error);
} /* get options */

+1 −1
Original line number Diff line number Diff line
@@ -274,8 +274,8 @@ multi_delete::initialize_tables(JOIN *join)
    {
      /* We are going to delete from this table */
      TABLE *tbl=walk->table=tab->table;
      /* Don't use KEYREAD optimization on this table */
      tbl->no_keyread=1;
      tbl->used_keys=0;
      walk=walk->next;
      if (!not_trans_safe && !tbl->file->has_transactions())
	not_trans_safe=true;