mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge with 4.0
BitKeeper/etc/ignore: auto-union VC++Files/comp_err/comp_err.dsp: Auto merged VC++Files/my_print_defaults/my_print_defaults.dsp: Auto merged VC++Files/myisampack/myisampack.dsp: Auto merged acinclude.m4: Auto merged innobase/buf/buf0buf.c: Auto merged innobase/com/com0shm.c: Auto merged innobase/data/data0data.c: Auto merged innobase/ha/ha0ha.c: Auto merged innobase/include/buf0buf.ic: Auto merged innobase/include/dict0dict.h: Auto merged innobase/include/ibuf0ibuf.h: Auto merged innobase/include/lock0lock.h: Auto merged innobase/include/mtr0log.h: Auto merged innobase/include/mtr0mtr.h: Auto merged innobase/include/os0proc.h: Auto merged innobase/include/os0thread.h: Auto merged innobase/include/srv0srv.h: Auto merged innobase/include/sync0sync.h: Auto merged innobase/lock/lock0lock.c: Auto merged innobase/log/log0recv.c: Auto merged innobase/mem/mem0dbg.c: Auto merged innobase/mtr/mtr0mtr.c: Auto merged innobase/os/os0proc.c: Auto merged innobase/page/page0page.c: Auto merged innobase/que/que0que.c: Auto merged innobase/rem/rem0cmp.c: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/sync/sync0sync.c: Auto merged innobase/trx/trx0rec.c: Auto merged innobase/trx/trx0trx.c: Auto merged innobase/ut/ut0mem.c: Auto merged innobase/ut/ut0ut.c: Auto merged libmysql/libmysql.c: Auto merged scripts/mysql_config.sh: Auto merged sql/net_serv.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_yacc.yy: Auto merged
This commit is contained in:
@ -20,9 +20,9 @@
|
||||
#include "ftdefs.h"
|
||||
#include <my_getopt.h>
|
||||
|
||||
static void get_options(int *argc,char **argv[]);
|
||||
static void usage();
|
||||
static void complain(int val);
|
||||
static my_bool get_one_option(int, const struct my_option *, char *);
|
||||
|
||||
static int count=0, stats=0, dump=0, lstats=0;
|
||||
static my_bool verbose;
|
||||
@ -68,7 +68,8 @@ 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);
|
||||
if (error=handle_options(&argc, &argv, my_long_options, get_one_option))
|
||||
exit(error);
|
||||
if (count || dump)
|
||||
verbose=0;
|
||||
if (!count && !dump && !lstats && !query)
|
||||
@ -80,12 +81,21 @@ int main(int argc,char *argv[])
|
||||
if (argc < 2)
|
||||
usage();
|
||||
|
||||
{
|
||||
char *end;
|
||||
inx= strtoll(argv[1], &end, 10);
|
||||
if (*end)
|
||||
usage();
|
||||
}
|
||||
|
||||
init_key_cache(dflt_key_cache,MI_KEY_BLOCK_LENGTH,USE_BUFFER_INIT, 0, 0);
|
||||
|
||||
if (!(info=mi_open(argv[0],2,HA_OPEN_ABORT_IF_LOCKED)))
|
||||
{
|
||||
error=my_errno;
|
||||
goto err;
|
||||
}
|
||||
|
||||
inx=atoi(argv[1]);
|
||||
*buf2=0;
|
||||
aio->info=info;
|
||||
|
||||
@ -96,6 +106,8 @@ int main(int argc,char *argv[])
|
||||
goto err;
|
||||
}
|
||||
|
||||
mi_lock_database(info, F_EXTRA_LCK);
|
||||
|
||||
if (query)
|
||||
{
|
||||
#if 0
|
||||
@ -112,7 +124,7 @@ int main(int argc,char *argv[])
|
||||
printf("%d rows matched\n",result->ndocs);
|
||||
|
||||
for(i=0 ; i<result->ndocs ; i++)
|
||||
printf("%9qx %20.7f\n",result->doc[i].dpos,result->doc[i].weight);
|
||||
printf("%9lx %20.7f\n",(ulong)result->doc[i].dpos,result->doc[i].weight);
|
||||
|
||||
ft_nlq_close_search(result);
|
||||
#else
|
||||
@ -179,6 +191,7 @@ int main(int argc,char *argv[])
|
||||
if (verbose && (total%HOW_OFTEN_TO_WRITE)==0)
|
||||
printf("%10ld\r",total);
|
||||
}
|
||||
mi_lock_database(info, F_UNLCK);
|
||||
|
||||
if (stats)
|
||||
{
|
||||
@ -252,15 +265,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
}
|
||||
|
||||
|
||||
static void get_options(int *argc, char **argv[])
|
||||
{
|
||||
int ho_error;
|
||||
|
||||
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||
exit(ho_error);
|
||||
} /* get options */
|
||||
|
||||
|
||||
static void usage()
|
||||
{
|
||||
printf("Use: ft_dump <table_name> <index_no>\n");
|
||||
|
Reference in New Issue
Block a user