Commit 11648411 authored by Davi Arnaut's avatar Davi Arnaut

Backport: Remove unused and ancient files, functions, and facilities.

client/mysql.cc:
  Remove unused functions.
client/sql_string.cc:
  Remove unused functions.
include/my_pthread.h:
  Remove unused prototype.
mysys/my_pthread.c:
  Remove unused function.
sql/lock.cc:
  Remove unused function.
sql/lock.h:
  Remove unused and duplicated prototypes.
sql/sql_class.h:
  Removed unused variables.
sql/sql_const.h:
  Remove unused defines.
sql/sql_priv.h:
  Remove unused defines.
sql/sql_string.cc:
  Remove unused prototype.
sql/thr_malloc.cc:
  Remove unused function.
sql/thr_malloc.h:
  Remove unused prototype.
storage/myisam/CMakeLists.txt:
  Remove obsolete fulltext file.
storage/myisam/Makefile.am:
  Remove obsolete files (were already commented out).
storage/myisam/ft_eval.c:
  Remove obsolete fulltext file.
storage/myisam/ft_eval.h:
  Remove obsolete fulltext file.
storage/myisam/ft_stem.c:
  Remove obsolete fulltext file.
storage/myisam/ft_test1.c:
  Remove obsolete fulltext file.
storage/myisam/ft_test1.h:
  Remove obsolete fulltext file.
parent 92f659e7
......@@ -59,8 +59,6 @@ static char *server_version= NULL;
/* Array of options to pass to libemysqld */
#define MAX_SERVER_ARGS 64
void* sql_alloc(unsigned size); // Don't use mysqld alloc for these
void sql_element_free(void *ptr);
#include "sql_string.h"
extern "C" {
......@@ -4963,17 +4961,3 @@ static int com_prompt(String *buffer, char *line)
tee_fprintf(stdout, "PROMPT set to '%s'\n", current_prompt);
return 0;
}
#ifndef EMBEDDED_LIBRARY
/* Keep sql_string library happy */
void *sql_alloc(size_t Size)
{
return my_malloc(Size,MYF(MY_WME));
}
void sql_element_free(void *ptr)
{
my_free(ptr,MYF(0));
}
#endif /* EMBEDDED_LIBRARY */
......@@ -24,13 +24,6 @@
#include <m_string.h>
#include <m_ctype.h>
#include <mysql_com.h>
/*
The following extern declarations are ok as these are interface functions
required by the string function
*/
extern void sql_alloc(size_t size);
extern void sql_element_free(void *ptr);
#include "sql_string.h"
......
......@@ -712,7 +712,6 @@ extern my_bool my_thread_init(void);
extern void my_thread_end(void);
extern const char *my_thread_name(void);
extern my_thread_id my_thread_dbug_id(void);
extern int pthread_no_free(void *);
extern int pthread_dummy(int);
/* All thread specific variables are in the following struct */
......
......@@ -492,11 +492,6 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex)
/* Some help functions */
int pthread_no_free(void *not_used __attribute__((unused)))
{
return 0;
}
int pthread_dummy(int ret)
{
return ret;
......
......@@ -533,20 +533,6 @@ void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table)
}
}
/* Downgrade all locks on a table to new WRITE level from WRITE_ONLY */
void mysql_lock_downgrade_write(THD *thd, TABLE *table,
thr_lock_type new_lock_type)
{
MYSQL_LOCK *locked;
if ((locked = get_lock_data(thd, &table, 1, GET_LOCK_UNLOCK)))
{
for (uint i=0; i < locked->lock_count; i++)
thr_downgrade_write_lock(locked->locks[i], new_lock_type);
my_free((uchar*) locked,MYF(0));
}
}
/** Abort all other threads waiting to get lock in table. */
......
......@@ -53,52 +53,22 @@ typedef struct st_mysql_lock MYSQL_LOCK;
MYSQL_OPEN_HAS_MDL_LOCK)
#include "thr_lock.h" /* thr_lock_type */
struct TABLE_LIST;
class THD;
struct TABLE;
typedef struct st_mysql_lock MYSQL_LOCK;
MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count, uint flags);
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock);
void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock);
void mysql_unlock_some_tables(THD *thd, TABLE **table,uint count);
void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table);
void mysql_lock_abort(THD *thd, TABLE *table, bool upgrade_lock);
void mysql_lock_downgrade_write(THD *thd, TABLE *table,
thr_lock_type new_lock_type);
bool mysql_lock_abort_for_thread(THD *thd, TABLE *table);
MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b);
TABLE_LIST *mysql_lock_have_duplicate(THD *thd, TABLE_LIST *needle,
TABLE_LIST *haystack);
bool lock_global_read_lock(THD *thd);
void unlock_global_read_lock(THD *thd);
bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh,
bool is_not_commit);
void start_waiting_global_read_lock(THD *thd);
bool make_global_read_lock_block_commit(THD *thd);
bool set_protect_against_global_read_lock(void);
void unset_protect_against_global_read_lock(void);
/* Lock based on stored routine name */
bool lock_routine_name(THD *thd, bool is_function, const char *db,
const char *name);
void broadcast_refresh(void);
/* Lock based on name */
int lock_and_wait_for_table_name(THD *thd, TABLE_LIST *table_list);
int lock_table_name(THD *thd, TABLE_LIST *table_list, bool check_in_use);
void unlock_table_name(THD *thd, TABLE_LIST *table_list);
bool wait_for_locked_table_names(THD *thd, TABLE_LIST *table_list);
bool lock_table_names(THD *thd, TABLE_LIST *table_list);
void unlock_table_names(THD *thd);
bool lock_table_names_exclusively(THD *thd, TABLE_LIST *table_list);
bool is_table_name_exclusively_locked_by_this_thread(THD *thd,
TABLE_LIST *table_list);
bool is_table_name_exclusively_locked_by_this_thread(THD *thd, uchar *key,
int key_length);
void broadcast_refresh(void);
/* Lock based on stored routine name */
bool lock_routine_name(THD *thd, bool is_function, const char *db,
const char *name);
#endif /* LOCK_INCLUDED */
......@@ -2119,8 +2119,6 @@ public:
char scramble[SCRAMBLE_LENGTH+1];
bool slave_thread, one_shot_set;
bool locked, some_tables_deleted;
bool last_cuted_field;
bool no_errors, password;
/**
Set to TRUE if execution of the current compound statement
......
......@@ -136,7 +136,6 @@
#ifndef MYSQLD_NET_RETRY_COUNT
#define MYSQLD_NET_RETRY_COUNT 10 ///< Abort read after this many int.
#endif
#define TEMP_POOL_SIZE 128
#define QUERY_ALLOC_BLOCK_SIZE 8192
#define QUERY_ALLOC_PREALLOC_SIZE 8192
......@@ -146,11 +145,8 @@
#define ACL_ALLOC_BLOCK_SIZE 1024
#define UDF_ALLOC_BLOCK_SIZE 1024
#define TABLE_ALLOC_BLOCK_SIZE 1024
#define BDB_LOG_ALLOC_BLOCK_SIZE 1024
#define WARN_ALLOC_BLOCK_SIZE 2048
#define WARN_ALLOC_PREALLOC_SIZE 1024
#define PROFILE_ALLOC_BLOCK_SIZE 2048
#define PROFILE_ALLOC_PREALLOC_SIZE 1024
/*
The following parameters is to decide when to use an extra cache to
......@@ -194,8 +190,6 @@
*/
#define MATCHING_ROWS_IN_OTHER_TABLE 10
#define RAID_BLOCK_SIZE 1024
#define MY_CHARSET_BIN_MB_MAXLEN 1
/** Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used). */
......
......@@ -25,8 +25,7 @@
#include "sql_cache.h" // query_cache_*
#include "sql_base.h" // open_temprary_table
#include "sql_table.h" // build_table_filename
#include "lock.h" // lock_and_wait_for_table_name,
// unlock_table_name
#include "lock.h" // unlock_table_name
#include "sql_view.h" // check_key_in_view, mysql_frm_type
#include "sql_parse.h" // mysql_init_select
#include "sql_acl.h" // *_ACL
......
......@@ -187,10 +187,6 @@ extern char err_shared_dir[];
#define BINLOG_DUMP_NON_BLOCK 1
/* sql_show.cc:show_log_files() */
#define SHOW_LOG_STATUS_FREE "FREE"
#define SHOW_LOG_STATUS_INUSE "IN USE"
/*
Some defines for exit codes for ::is_equal class functions.
*/
......
......@@ -24,13 +24,6 @@
#include <m_string.h>
#include <m_ctype.h>
#include <mysql_com.h>
/*
The following extern declarations are ok as these are interface functions
required by the string function
*/
extern uchar* sql_alloc(unsigned size);
extern void sql_element_free(void *ptr);
#include "sql_string.h"
......
......@@ -109,10 +109,6 @@ void* sql_memdup(const void *ptr, size_t len)
return pos;
}
void sql_element_free(void *ptr __attribute__((unused)))
{} /* purecov: deadcode */
char *sql_strmake_with_convert(const char *str, size_t arg_length,
CHARSET_INFO *from_cs,
......
......@@ -27,7 +27,6 @@ void *sql_calloc(size_t);
char *sql_strdup(const char *str);
char *sql_strmake(const char *str, size_t len);
void *sql_memdup(const void * ptr, size_t size);
void sql_element_free(void *ptr);
char *sql_strmake_with_convert(const char *str, size_t arg_length,
CHARSET_INFO *from_cs,
size_t max_res_length,
......
......@@ -13,7 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c ft_stem.c
SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c
ha_myisam.cc
ft_stopwords.c ft_update.c mi_cache.c mi_changed.c mi_check.c
mi_checksum.c mi_close.c mi_create.c mi_dbug.c mi_delete.c
......@@ -23,7 +23,7 @@ SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c
mi_rfirst.c mi_rlast.c mi_rnext.c mi_rnext_same.c mi_rprev.c mi_rrnd.c
mi_rsame.c mi_rsamepos.c mi_scan.c mi_search.c mi_static.c mi_statrec.c
mi_unique.c mi_update.c mi_write.c rt_index.c rt_key.c rt_mbr.c
rt_split.c sort.c sp_key.c ft_eval.h mi_extrafunc.h myisamdef.h
rt_split.c sort.c sp_key.c mi_extrafunc.h myisamdef.h
rt_index.h mi_rkey.c)
MYSQL_ADD_PLUGIN(myisam ${MYISAM_SOURCES}
......
......@@ -27,7 +27,7 @@ LDADD =
DEFS = @DEFS@
EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in
EXTRA_DIST = mi_test_all.sh mi_test_all.res CMakeLists.txt plug.in
pkgdata_DATA = mi_test_all mi_test_all.res
pkglib_LIBRARIES = libmyisam.a
......@@ -47,10 +47,9 @@ myisampack_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
noinst_PROGRAMS = mi_test1 mi_test2 mi_test3 rt_test sp_test #ft_test1 ft_eval
noinst_PROGRAMS = mi_test1 mi_test2 mi_test3 rt_test sp_test
noinst_HEADERS = myisamdef.h rt_index.h rt_key.h rt_mbr.h sp_defs.h \
fulltext.h ftdefs.h ft_test1.h ft_eval.h \
ha_myisam.h mi_extrafunc.h
fulltext.h ftdefs.h ha_myisam.h mi_extrafunc.h
mi_test1_DEPENDENCIES= $(LIBRARIES)
mi_test1_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/mysys/libmysys.a \
......@@ -66,8 +65,6 @@ mi_test3_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
#ft_test1_DEPENDENCIES= $(LIBRARIES)
#ft_eval_DEPENDENCIES= $(LIBRARIES)
myisam_ftdump_DEPENDENCIES= $(LIBRARIES)
myisam_ftdump_LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/mysys/libmysys.a \
......
/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Written by Sergei A. Golubchik, who has a shared copyright to this code
added support for long options (my_getopt) 22.5.2002 by Jani Tolonen */
#include "ftdefs.h"
#include "ft_eval.h"
#include <stdarg.h>
#include <my_getopt.h>
static void print_error(int exit_code, const char *fmt,...);
static void get_options(int argc, char *argv[]);
static int create_record(char *pos, FILE *file);
static void usage();
static struct my_option my_long_options[] =
{
{"", 's', "", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"", 'q', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'S', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", '#', "", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"", 'V', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", '?', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'h', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
int main(int argc, char *argv[])
{
MI_INFO *file;
int i,j;
MY_INIT(argv[0]);
get_options(argc,argv);
bzero((char*)recinfo,sizeof(recinfo));
/* First define 2 columns */
recinfo[0].type=FIELD_SKIP_ENDSPACE;
recinfo[0].length=docid_length;
recinfo[1].type=FIELD_BLOB;
recinfo[1].length= 4+portable_sizeof_char_ptr;
/* Define a key over the first column */
keyinfo[0].seg=keyseg;
keyinfo[0].keysegs=1;
keyinfo[0].block_length= 0; /* Default block length */
keyinfo[0].seg[0].type= HA_KEYTYPE_TEXT;
keyinfo[0].seg[0].flag= HA_BLOB_PART;
keyinfo[0].seg[0].start=recinfo[0].length;
keyinfo[0].seg[0].length=key_length;
keyinfo[0].seg[0].null_bit=0;
keyinfo[0].seg[0].null_pos=0;
keyinfo[0].seg[0].bit_start=4;
keyinfo[0].seg[0].language=MY_CHARSET_CURRENT;
keyinfo[0].flag = HA_FULLTEXT;
if (!silent)
printf("- Creating isam-file\n");
if (mi_create(filename,1,keyinfo,2,recinfo,0,NULL,(MI_CREATE_INFO*) 0,0))
goto err;
if (!(file=mi_open(filename,2,0)))
goto err;
if (!silent)
printf("Initializing stopwords\n");
ft_init_stopwords(stopwordlist);
if (!silent)
printf("- Writing key:s\n");
my_errno=0;
i=0;
while (create_record(record,df))
{
error=mi_write(file,record);
if (error)
printf("I= %2d mi_write: %d errno: %d\n",i,error,my_errno);
i++;
}
fclose(df);
if (mi_close(file)) goto err;
if (!silent)
printf("- Reopening file\n");
if (!(file=mi_open(filename,2,0))) goto err;
if (!silent)
printf("- Reading rows with key\n");
for (i=1;create_record(record,qf);i++)
{
FT_DOCLIST *result;
double w;
int t, err;
result=ft_nlq_init_search(file,0,blob_record,(uint) strlen(blob_record),1);
if (!result)
{
printf("Query %d failed with errno %3d\n",i,my_errno);
goto err;
}
if (!silent)
printf("Query %d. Found: %d.\n",i,result->ndocs);
for (j=0;(err=ft_nlq_read_next(result, read_record))==0;j++)
{
t=uint2korr(read_record);
w=ft_nlq_get_relevance(result);
printf("%d %.*s %f\n",i,t,read_record+2,w);
}
if (err != HA_ERR_END_OF_FILE)
{
printf("ft_read_next %d failed with errno %3d\n",j,my_errno);
goto err;
}
ft_nlq_close_search(result);
}
if (mi_close(file)) goto err;
my_end(MY_CHECK_ERROR);
return (0);
err:
printf("got error: %3d when using myisam-database\n",my_errno);
return 1; /* skip warning */
}
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch (optid) {
case 's':
if (stopwordlist && stopwordlist != ft_precompiled_stopwords)
break;
{
FILE *f; char s[HA_FT_MAXLEN]; int i=0,n=SWL_INIT;
if (!(stopwordlist=(const char**) malloc(n*sizeof(char *))))
print_error(1,"malloc(%d)",n*sizeof(char *));
if (!(f=fopen(argument,"r")))
print_error(1,"fopen(%s)",argument);
while (!feof(f))
{
if (!(fgets(s,HA_FT_MAXLEN,f)))
print_error(1,"fgets(s,%d,%s)",HA_FT_MAXLEN,argument);
if (!(stopwordlist[i++]=strdup(s)))
print_error(1,"strdup(%s)",s);
if (i >= n)
{
n+=SWL_PLUS;
if (!(stopwordlist=(const char**) realloc((char*) stopwordlist,
n*sizeof(char *))))
print_error(1,"realloc(%d)",n*sizeof(char *));
}
}
fclose(f);
stopwordlist[i]=NULL;
break;
}
case 'q': silent=1; break;
case 'S': if (stopwordlist==ft_precompiled_stopwords) stopwordlist=NULL; break;
case '#':
DBUG_PUSH (argument);
break;
case 'V':
case '?':
case 'h':
usage();
exit(1);
}
return 0;
}
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);
if (!(d_file=argv[optind])) print_error(1,"No d_file");
if (!(df=fopen(d_file,"r")))
print_error(1,"fopen(%s)",d_file);
if (!(q_file=argv[optind+1])) print_error(1,"No q_file");
if (!(qf=fopen(q_file,"r")))
print_error(1,"fopen(%s)",q_file);
return;
} /* get options */
static int create_record(char *pos, FILE *file)
{
uint tmp; char *ptr;
bzero((char *)pos,MAX_REC_LENGTH);
/* column 1 - VARCHAR */
if (!(fgets(pos+2,MAX_REC_LENGTH-32,file)))
{
if (feof(file))
return 0;
else
print_error(1,"fgets(docid) - 1");
}
tmp=(uint) strlen(pos+2)-1;
int2store(pos,tmp);
pos+=recinfo[0].length;
/* column 2 - BLOB */
if (!(fgets(blob_record,MAX_BLOB_LENGTH,file)))
print_error(1,"fgets(docid) - 2");
tmp=(uint) strlen(blob_record);
int4store(pos,tmp);
ptr=blob_record;
memcpy_fixed(pos+4,&ptr,sizeof(char*));
return 1;
}
/* VARARGS */
static void print_error(int exit_code, const char *fmt,...)
{
va_list args;
va_start(args,fmt);
fprintf(stderr,"%s: error: ",my_progname);
(void) vfprintf(stderr, fmt, args);
(void) fputc('\n',stderr);
fflush(stderr);
va_end(args);
exit(exit_code);
}
static void usage()
{
printf("%s [options]\n", my_progname);
my_print_help(my_long_options);
my_print_variables(my_long_options);
}
/* Copyright (C) 2000 MySQL AB & Sergei A. Golubchik
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
const char **stopwordlist=ft_precompiled_stopwords;
#define MAX_REC_LENGTH 128
#define MAX_BLOB_LENGTH 60000
char record[MAX_REC_LENGTH], read_record[MAX_REC_LENGTH+MAX_BLOB_LENGTH];
char blob_record[MAX_BLOB_LENGTH+20*20];
char *filename= (char*) "EVAL";
int silent=0, error=0;
uint key_length=MAX_BLOB_LENGTH,docid_length=32;
char *d_file, *q_file;
FILE *df,*qf;
MI_COLUMNDEF recinfo[3];
MI_KEYDEF keyinfo[2];
HA_KEYSEG keyseg[10];
#define SWL_INIT 500
#define SWL_PLUS 50
#define MAX_LINE_LENGTH 128
char line[MAX_LINE_LENGTH];
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
/* mulitingual stem */
/* Copyright (C) 2000-2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Written by Sergei A. Golubchik, who has a shared copyright to this code
added support for long options (my_getopt) 22.5.2002 by Jani Tolonen */
#include "ftdefs.h"
#include "ft_test1.h"
#include <my_getopt.h>
static int key_field=FIELD_VARCHAR,extra_field=FIELD_SKIP_ENDSPACE;
static uint key_length=200,extra_length=50;
static int key_type=HA_KEYTYPE_TEXT;
static int verbose=0,silent=0,skip_update=0,
no_keys=0,no_stopwords=0,no_search=0,no_fulltext=0;
static int create_flag=0,error=0;
#define MAX_REC_LENGTH 300
static char record[MAX_REC_LENGTH],read_record[MAX_REC_LENGTH];
static int run_test(const char *filename);
static void get_options(int argc, char *argv[]);
static void create_record(char *, int);
static void usage();
static struct my_option my_long_options[] =
{
{"", 'v', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", '?', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'h', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'V', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'v', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 's', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'N', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'S', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'K', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'F', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", 'U', "", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"", '#', "", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
int main(int argc, char *argv[])
{
MY_INIT(argv[0]);
get_options(argc,argv);
exit(run_test("FT1"));
}
static MI_COLUMNDEF recinfo[3];
static MI_KEYDEF keyinfo[2];
static HA_KEYSEG keyseg[10];
static int run_test(const char *filename)
{
MI_INFO *file;
int i,j;
my_off_t pos;
bzero((char*) recinfo,sizeof(recinfo));
/* First define 2 columns */
recinfo[0].type=extra_field;
recinfo[0].length= (extra_field == FIELD_BLOB ? 4 + portable_sizeof_char_ptr :
extra_length);
if (extra_field == FIELD_VARCHAR)
recinfo[0].length+= HA_VARCHAR_PACKLENGTH(extra_length);
recinfo[1].type=key_field;
recinfo[1].length= (key_field == FIELD_BLOB ? 4+portable_sizeof_char_ptr :
key_length);
if (key_field == FIELD_VARCHAR)
recinfo[1].length+= HA_VARCHAR_PACKLENGTH(key_length);
/* Define a key over the first column */
keyinfo[0].seg=keyseg;
keyinfo[0].keysegs=1;
keyinfo[0].block_length= 0; /* Default block length */
keyinfo[0].seg[0].type= key_type;
keyinfo[0].seg[0].flag= (key_field == FIELD_BLOB) ? HA_BLOB_PART:
(key_field == FIELD_VARCHAR) ? HA_VAR_LENGTH_PART:0;
keyinfo[0].seg[0].start=recinfo[0].length;
keyinfo[0].seg[0].length=key_length;
keyinfo[0].seg[0].null_bit= 0;
keyinfo[0].seg[0].null_pos=0;
keyinfo[0].seg[0].language= default_charset_info->number;
keyinfo[0].flag = (no_fulltext?HA_PACK_KEY:HA_FULLTEXT);
if (!silent)
printf("- Creating isam-file\n");
if (mi_create(filename,(no_keys?0:1),keyinfo,2,recinfo,0,NULL,
(MI_CREATE_INFO*) 0, create_flag))
goto err;
if (!(file=mi_open(filename,2,0)))
goto err;
if (!silent)
printf("- %s stopwords\n",no_stopwords?"Skipping":"Initializing");
ft_init_stopwords(no_stopwords?NULL:ft_precompiled_stopwords);
if (!silent)
printf("- Writing key:s\n");
my_errno=0;
for (i=NUPD ; i<NDATAS; i++ )
{
create_record(record,i);
error=mi_write(file,record);
if (verbose || error)
printf("I= %2d mi_write: %d errno: %d, record: %s\n",
i,error,my_errno,data[i].f0);
}
if (!skip_update)
{
if (!silent)
printf("- Updating rows\n");
/* Read through all rows and update them */
pos=(ha_rows) 0;
i=0;
while ((error=mi_rrnd(file,read_record,pos)) == 0)
{
create_record(record,NUPD-i-1);
if (mi_update(file,read_record,record))
{
printf("Can't update row: %.*s, error: %d\n",
keyinfo[0].seg[0].length,record,my_errno);
}
if(++i == NUPD) break;
pos=HA_OFFSET_ERROR;
}
if (i != NUPD)
printf("Found %d of %d rows\n", i,NUPD);
}
if (mi_close(file)) goto err;
if(no_search) return 0;
if (!silent)
printf("- Reopening file\n");
if (!(file=mi_open(filename,2,0))) goto err;
if (!silent)
printf("- Reading rows with key\n");
for (i=0 ; i < NQUERIES ; i++)
{
FT_DOCLIST *result;
result=ft_nlq_init_search(file,0,(char*) query[i],strlen(query[i]),1);
if(!result)
{
printf("Query %d: `%s' failed with errno %3d\n",i,query[i],my_errno);
continue;
}
printf("Query %d: `%s'. Found: %d. Top five documents:\n",
i,query[i],result->ndocs);
for (j=0;j<5;j++)
{
double w; int err;
err= ft_nlq_read_next(result, read_record);
if (err==HA_ERR_END_OF_FILE)
{
printf("No more matches!\n");
break;
}
else if (err)
{
printf("ft_read_next %d failed with errno %3d\n",j,my_errno);
break;
}
w=ft_nlq_get_relevance(result);
if (key_field == FIELD_VARCHAR)
{
uint l;
char *p;
p=recinfo[0].length+read_record;
l=uint2korr(p);
printf("%10.7f: %.*s\n",w,(int) l,p+2);
}
else
printf("%10.7f: %.*s\n",w,recinfo[1].length,
recinfo[0].length+read_record);
}
ft_nlq_close_search(result);
}
if (mi_close(file)) goto err;
my_end(MY_CHECK_ERROR);
return (0);
err:
printf("got error: %3d when using myisam-database\n",my_errno);
return 1; /* skip warning */
}
static char blob_key[MAX_REC_LENGTH];
/* static char blob_record[MAX_REC_LENGTH+20*20]; */
void create_record(char *pos, int n)
{
bzero((char*) pos,MAX_REC_LENGTH);
if (recinfo[0].type == FIELD_BLOB)
{
uint tmp;
char *ptr;
strnmov(blob_key,data[n].f0,keyinfo[0].seg[0].length);
tmp=strlen(blob_key);
int4store(pos,tmp);
ptr=blob_key;
memcpy_fixed(pos+4,&ptr,sizeof(char*));
pos+=recinfo[0].length;
}
else if (recinfo[0].type == FIELD_VARCHAR)
{
uint tmp;
/* -1 is here because pack_length is stored in seg->length */
uint pack_length= HA_VARCHAR_PACKLENGTH(keyinfo[0].seg[0].length-1);
strnmov(pos+pack_length,data[n].f0,keyinfo[0].seg[0].length);
tmp=strlen(pos+pack_length);
if (pack_length == 1)
*pos= (char) tmp;
else
int2store(pos,tmp);
pos+=recinfo[0].length;
}
else
{
strnmov(pos,data[n].f0,keyinfo[0].seg[0].length);
pos+=recinfo[0].length;
}
if (recinfo[1].type == FIELD_BLOB)
{
uint tmp;
char *ptr;
strnmov(blob_key,data[n].f2,keyinfo[0].seg[0].length);
tmp=strlen(blob_key);
int4store(pos,tmp);
ptr=blob_key;
memcpy_fixed(pos+4,&ptr,sizeof(char*));
pos+=recinfo[1].length;
}
else if (recinfo[1].type == FIELD_VARCHAR)
{
uint tmp;
/* -1 is here because pack_length is stored in seg->length */
uint pack_length= HA_VARCHAR_PACKLENGTH(keyinfo[0].seg[0].length-1);
strnmov(pos+pack_length,data[n].f2,keyinfo[0].seg[0].length);
tmp=strlen(pos+1);
if (pack_length == 1)
*pos= (char) tmp;
else
int2store(pos,tmp);
pos+=recinfo[1].length;
}
else
{
strnmov(pos,data[n].f2,keyinfo[0].seg[0].length);
pos+=recinfo[1].length;
}
}
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument)
{
switch(optid) {
case 'v': verbose=1; break;
case 's': silent=1; break;
case 'F': no_fulltext=1; no_search=1;
case 'U': skip_update=1; break;
case 'K': no_keys=no_search=1; break;
case 'N': no_search=1; break;
case 'S': no_stopwords=1; break;
case '#':
DBUG_PUSH (argument);
break;
case 'V':
case '?':
case 'h':
usage();
exit(1);
}
return 0;
}
/* Read options */
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);
return;
} /* get options */
static void usage()
{
printf("%s [options]\n", my_progname);
my_print_help(my_long_options);
my_print_variables(my_long_options);
}
/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Written by Sergei A. Golubchik, who has a shared copyright to this code */
#define NUPD 20
#define NDATAS 389
struct { const char *f0, *f2; } data[NDATAS] = {
{"1", "General Information about MySQL"},
{"1.1", "What is MySQL?"},
{"1.2", "About this manual"},
{"1.3", "History of MySQL"},
{"1.4", "The main features of MySQL"},
{"1.5", "General SQL information and tutorials"},
{"1.6", "Useful MySQL-related links"},
{"1.7", "What are stored procedures and triggers and so on?"},
{"2", "MySQL mailing lists and how to ask questions/give error (bug) reports"},
{"2.1", "Subscribing to/un-subscribing from the MySQL mailing list"},
{"2.2", "Asking questions or reporting bugs"},
{"2.3", "I think I have found a bug. What information do you need to help me?"},
{"2.3.1", "MySQL keeps crashing"},
{"2.4", "Guidelines for answering questions on the mailing list"},
{"3", "Licensing or When do I have/want to pay for MySQL?"},
{"3.1", "How much does MySQL cost?"},
{"3.2", "How do I get commercial support?"},
{"3.2.1", "Types of commercial support"},
{"3.2.1.1", "Basic email support"},
{"3.2.1.2", "Extended email support"},
/*------------------------------- NUPD=20 -------------------------------*/
{"3.2.1.3", "Asking: Login support"},
{"3.2.1.4", "Extended login support"},
{"3.3", "How do I pay for licenses/support?"},
{"3.4", "Who do I contact when I want more information about licensing/support?"},
{"3.5", "What Copyright does MySQL use?"},
{"3.6", "When may I distribute MySQL commercially without a fee?"},
{"3.7", "I want to sell a product that can be configured to use MySQL"},
{"3.8", "I am running a commercial web server using MySQL"},
{"3.9", "Do I need a license to sell commercial Perl/tcl/PHP/Web+ etc applications?"},
{"3.10", "Possible future changes in the licensing"},
{"4", "Compiling and installing MySQL"},
{"4.1", "How do I get MySQL?"},
{"4.2", "Which MySQL version should I use?"},
{"4.3", "How/when will you release updates?"},
{"4.4", "What operating systems does MySQL support?"},
{"4.5", "Compiling MySQL from source code"},
{"4.5.1", "Quick installation overview"},
{"4.5.2", "Usual configure switches"},
{"4.5.3", "Applying a patch"},
{"4.6", "Problems compiling?"},
{"4.7", "General compilation notes"},
{"4.8", "MIT-pthreads notes (FreeBSD)"},
{"4.9", "Perl installation comments"},
{"4.10", "Special things to consider for some machine/OS combinations"},
{"4.10.1", "Solaris notes"},
{"4.10.2", "SunOS 4 notes"},
{"4.10.3", "Linux notes for all versions"},
{"4.10.3.1", "Linux-x86 notes"},
{"4.10.3.2", "RedHat 5.0"},
{"4.10.3.3", "RedHat 5.1"},
{"4.10.3.4", "Linux-Sparc notes"},
{"4.10.3.5", "Linux-Alpha notes"},
{"4.10.3.6", "MkLinux notes"},
{"4.10.4", "Alpha-DEC-Unix notes"},
{"4.10.5", "Alpha-DEC-OSF1 notes"},
{"4.10.6", "SGI-IRIX notes"},
{"4.10.7", "FreeBSD notes"},
{"4.10.7.1", "FreeBSD-3.0 notes"},
{"4.10.8", "BSD/OS 2.# notes"},
{"4.10.8.1", "BSD/OS 3.# notes"},
{"4.10.9", "SCO notes"},
{"4.10.10", "SCO Unixware 7.0 notes"},
{"4.10.11", "IBM-AIX notes"},
{"4.10.12", "HP-UX notes"},
{"4.11", "TcX binaries"},
{"4.12", "Win32 notes"},
{"4.13", "Installation instructions for MySQL binary releases"},
{"4.13.1", "How to get MySQL Perl support working"},
{"4.13.2", "Linux notes"},
{"4.13.3", "HP-UX notes"},
{"4.13.4", "Linking client libraries"},
{"4.14", "Problems running mysql_install_db"},
{"4.15", "Problems starting MySQL"},
{"4.16", "Automatic start/stop of MySQL"},
{"4.17", "Option files"},
{"5", "How standards-compatible is MySQL?"},
{"5.1", "What extensions has MySQL to ANSI SQL92?"},
{"5.2", "What functionality is missing in MySQL?"},
{"5.2.1", "Sub-selects"},
{"5.2.2", "SELECT INTO TABLE"},
{"5.2.3", "Transactions"},
{"5.2.4", "Triggers"},
{"5.2.5", "Foreign Keys"},
{"5.2.5.1", "Some reasons NOT to use FOREIGN KEYS"},
{"5.2.6", "Views"},
{"5.2.7", "-- as start of a comment"},
{"5.3", "What standards does MySQL follow?"},
{"5.4", "What functions exist only for compatibility?"},
{"5.5", "Limitations of BLOB and TEXT types"},
{"5.6", "How to cope without COMMIT-ROLLBACK"},
{"6", "The MySQL access privilege system"},
{"6.1", "What the privilege system does"},
{"6.2", "Connecting to the MySQL server"},
{"6.2.1", "Keeping your password secure"},
{"6.3", "Privileges provided by MySQL"},
{"6.4", "How the privilege system works"},
{"6.5", "The privilege tables"},
{"6.6", "Setting up the initial MySQL privileges"},
{"6.7", "Adding new user privileges to MySQL"},
{"6.8", "An example permission setup"},
{"6.9", "Causes of Access denied errors"},
{"6.10", "How to make MySQL secure against crackers"},
{"7", "MySQL language reference"},
{"7.1", "Literals: how to write strings and numbers"},
{"7.1.1", "Strings"},
{"7.1.2", "Numbers"},
{"7.1.3", "NULL values"},
{"7.1.4", "Database, table, index, column and alias names"},
{"7.1.4.1", "Case sensitivity in names"},
{"7.2", "Column types"},
{"7.2.1", "Column type storage requirements"},
{"7.2.5", "Numeric types"},
{"7.2.6", "Date and time types"},
{"7.2.6.1", "The DATE type"},
{"7.2.6.2", "The TIME type"},
{"7.2.6.3", "The DATETIME type"},
{"7.2.6.4", "The TIMESTAMP type"},
{"7.2.6.5", "The YEAR type"},
{"7.2.6.6", "Miscellaneous date and time properties"},
{"7.2.7", "String types"},
{"7.2.7.1", "The CHAR and VARCHAR types"},
{"7.2.7.2", "The BLOB and TEXT types"},
{"7.2.7.3", "The ENUM type"},
{"7.2.7.4", "The SET type"},
{"7.2.8", "Choosing the right type for a column"},
{"7.2.9", "Column indexes"},
{"7.2.10", "Multiple-column indexes"},
{"7.2.11", "Using column types from other database engines"},
{"7.3", "Functions for use in SELECT and WHERE clauses"},
{"7.3.1", "Grouping functions"},
{"7.3.2", "Normal arithmetic operations"},
{"7.3.3", "Bit functions"},
{"7.3.4", "Logical operations"},
{"7.3.5", "Comparison operators"},
{"7.3.6", "String comparison functions"},
{"7.3.7", "Control flow functions"},
{"7.3.8", "Mathematical functions"},
{"7.3.9", "String functions"},
{"7.3.10", "Date and time functions"},
{"7.3.11", "Miscellaneous functions"},
{"7.3.12", "Functions for use with GROUP BY clauses"},
{"7.4", "CREATE DATABASE syntax"},
{"7.5", "DROP DATABASE syntax"},
{"7.6", "CREATE TABLE syntax"},
{"7.7", "ALTER TABLE syntax"},
{"7.8", "OPTIMIZE TABLE syntax"},
{"7.9", "DROP TABLE syntax"},
{"7.10", "DELETE syntax"},
{"7.11", "SELECT syntax"},
{"7.12", "JOIN syntax"},
{"7.13", "INSERT syntax"},
{"7.14", "REPLACE syntax"},
{"7.15", "LOAD DATA INFILE syntax"},
{"7.16", "UPDATE syntax"},
{"7.17", "USE syntax"},
{"7.18", "SHOW syntax (Get information about tables, columns...)"},
{"7.19", "EXPLAIN syntax (Get information about a SELECT)"},
{"7.20", "DESCRIBE syntax (Get information about columns)"},
{"7.21", "LOCK TABLES/UNLOCK TABLES syntax"},
{"7.22", "SET OPTION syntax"},
{"7.23", "GRANT syntax (Compatibility function)"},
{"7.24", "CREATE INDEX syntax (Compatibility function)"},
{"7.25", "DROP INDEX syntax (Compatibility function)"},
{"7.26", "Comment syntax"},
{"7.27", "CREATE FUNCTION/DROP FUNCTION syntax"},
{"7.28", "Is MySQL picky about reserved words?"},
{"8", "Example SQL queries"},
{"8.1", "Queries from twin project"},
{"8.1.1", "Find all non-distributed twins"},
{"8.1.2", "Show a table on twin pair status"},
{"9", "How safe/stable is MySQL?"},
{"9.1", "How stable is MySQL?"},
{"9.2", "Why are there is so many releases of MySQL?"},
{"9.3", "Checking a table for errors"},
{"9.4", "How to repair tables"},
{"9.5", "Is there anything special to do when upgrading/downgrading MySQL?"},
{"9.5.1", "Upgrading from a 3.21 version to 3.22"},
{"9.5.2", "Upgrading from a 3.20 version to 3.21"},
{"9.5.3", "Upgrading to another architecture"},
{"9.6", "Year 2000 compliance"},
{"10", "MySQL Server functions"},
{"10.1", "What languages are supported by MySQL?"},
{"10.1.1", "Character set used for data &#38; sorting"},
{"10.2", "The update log"},
{"10.3", "How big can MySQL tables be?"},
{"11", "Getting maximum performance from MySQL"},
{"11.1", "How does one change the size of MySQL buffers?"},
{"11.2", "How compiling and linking affects the speed of MySQL"},
{"11.3", "How does MySQL use memory?"},
{"11.4", "How does MySQL use indexes?"},
{"11.5", "What optimizations are done on WHERE clauses?"},
{"11.6", "How does MySQL open &#38; close tables?"},
{"11.6.0.1", "What are the drawbacks of creating possibly thousands of tables in a database?"},
{"11.7", "How does MySQL lock tables?"},
{"11.8", "How should I arrange my table to be as fast/small as possible?"},
{"11.9", "What affects the speed of INSERT statements?"},
{"11.10", "What affects the speed DELETE statements?"},
{"11.11", "How do I get MySQL to run at full speed?"},
{"11.12", "What are the different row formats? Or, when should VARCHAR/CHAR be used?"},
{"11.13", "Why so many open tables?"},
{"12", "MySQL benchmark suite"},
{"13", "MySQL Utilites"},
{"13.1", "Overview of the different MySQL programs"},
{"13.2", "The MySQL table check, optimize and repair program"},
{"13.2.1", "isamchk memory use"},
{"13.2.2", "Getting low-level table information"},
{"13.3", "The MySQL compressed read-only table generator"},
{"14", "Adding new functions to MySQL"},
{"15", "MySQL ODBC Support"},
{"15.1", "Operating systems supported by MyODBC"},
{"15.2", "How to report problems with MyODBC"},
{"15.3", "Programs known to work with MyODBC"},
{"15.4", "How to fill in the various fields in the ODBC administrator program"},
{"15.5", "How to get the value of an AUTO_INCREMENT column in ODBC"},
{"16", "Problems and common errors"},
{"16.1", "Some common errors when using MySQL"},
{"16.1.1", "MySQL server has gone away error"},
{"16.1.2", "Can't connect to local MySQL server error"},
{"16.1.3", "Out of memory error"},
{"16.1.4", "Packet too large error"},
{"16.1.5", "The table is full error"},
{"16.1.6", "Commands out of sync error in client"},
{"16.1.7", "Removing user error"},
{"16.2", "How MySQL handles a full disk"},
{"16.3", "How to run SQL commands from a text file"},
{"16.4", "Where MySQL stores temporary files"},
{"16.5", "Access denied error"},
{"16.6", "How to run MySQL as a normal user"},
{"16.7", "Problems with file permissions"},
{"16.8", "File not found"},
{"16.9", "Problems using DATE columns"},
{"16.10", "Case sensitivity in searches"},
{"16.11", "Problems with NULL values"},
{"17", "Solving some common problems with MySQL"},
{"17.1", "Database replication"},
{"17.2", "Database backups"},
{"18", "MySQL client tools and API's"},
{"18.1", "MySQL C API"},
{"18.2", "C API datatypes"},
{"18.3", "C API function overview"},
{"18.4", "C API function descriptions"},
{"18.4.1", "mysql_affected_rows()"},
{"18.4.2", "mysql_close()"},
{"18.4.3", "mysql_connect()"},
{"18.4.4", "mysql_create_db()"},
{"18.4.5", "mysql_data_seek()"},
{"18.4.6", "mysql_debug()"},
{"18.4.7", "mysql_drop_db()"},
{"18.4.8", "mysql_dump_debug_info()"},
{"18.4.9", "mysql_eof()"},
{"18.4.10", "mysql_errno()"},
{"18.4.11", "mysql_error()"},
{"18.4.12", "mysql_escape_string()"},
{"18.4.13", "mysql_fetch_field()"},
{"18.4.14", "mysql_fetch_fields()"},
{"18.4.15", "mysql_fetch_field_direct()"},
{"18.4.16", "mysql_fetch_lengths()"},
{"18.4.17", "mysql_fetch_row()"},
{"18.4.18", "mysql_field_seek()"},
{"18.4.19", "mysql_field_tell()"},
{"18.4.20", "mysql_free_result()"},
{"18.4.21", "mysql_get_client_info()"},
{"18.4.22", "mysql_get_host_info()"},
{"18.4.23", "mysql_get_proto_info()"},
{"18.4.24", "mysql_get_server_info()"},
{"18.4.25", "mysql_info()"},
{"18.4.26", "mysql_init()"},
{"18.4.27", "mysql_insert_id()"},
{"18.4.28", "mysql_kill()"},
{"18.4.29", "mysql_list_dbs()"},
{"18.4.30", "mysql_list_fields()"},
{"18.4.31", "mysql_list_processes()"},
{"18.4.32", "mysql_list_tables()"},
{"18.4.33", "mysql_num_fields()"},
{"18.4.34", "mysql_num_rows()"},
{"18.4.35", "mysql_query()"},
{"18.4.36", "mysql_real_connect()"},
{"18.4.37", "mysql_real_query()"},
{"18.4.38", "mysql_reload()"},
{"18.4.39", "mysql_row_tell()"},
{"18.4.40", "mysql_select_db()"},
{"18.4.41", "mysql_shutdown()"},
{"18.4.42", "mysql_stat()"},
{"18.4.43", "mysql_store_result()"},
{"18.4.44", "mysql_thread_id()"},
{"18.4.45", "mysql_use_result()"},
{"18.4.46", "Why is it that after mysql_query() returns success, mysql_store_result() sometimes returns NULL?"},
{"18.4.47", "What results can I get from a query?"},
{"18.4.48", "How can I get the unique ID for the last inserted row?"},
{"18.4.49", "Problems linking with the C API"},
{"18.4.50", "How to make a thread-safe client"},
{"18.5", "MySQL Perl API's"},
{"18.5.1", "DBI with DBD::mysql"},
{"18.5.1.1", "The DBI interface"},
{"18.5.1.2", "More DBI/DBD information"},
{"18.6", "MySQL Java connectivity (JDBC)"},
{"18.7", "MySQL PHP API's"},
{"18.8", "MySQL C++ API's"},
{"18.9", "MySQL Python API's"},
{"18.10", "MySQL TCL API's"},
{"19", "How MySQL compares to other databases"},
{"19.1", "How MySQL compares to mSQL"},
{"19.1.1", "How to convert mSQL tools for MySQL"},
{"19.1.2", "How mSQL and MySQL client/server communications protocols differ"},
{"19.1.3", "How mSQL 2.0 SQL syntax differs from MySQL"},
{"19.2", "How MySQL compares to PostgreSQL"},
{"A", "Some users of MySQL"},
{"B", "Contributed programs"},
{"C", "Contributors to MySQL"},
{"D", "MySQL change history"},
{"19.3", "Changes in release 3.22.x (Alpha version)"},
{"19.3.1", "Changes in release 3.22.7"},
{"19.3.2", "Changes in release 3.22.6"},
{"19.3.3", "Changes in release 3.22.5"},
{"19.3.4", "Changes in release 3.22.4"},
{"19.3.5", "Changes in release 3.22.3"},
{"19.3.6", "Changes in release 3.22.2"},
{"19.3.7", "Changes in release 3.22.1"},
{"19.3.8", "Changes in release 3.22.0"},
{"19.4", "Changes in release 3.21.x"},
{"19.4.1", "Changes in release 3.21.33"},
{"19.4.2", "Changes in release 3.21.32"},
{"19.4.3", "Changes in release 3.21.31"},
{"19.4.4", "Changes in release 3.21.30"},
{"19.4.5", "Changes in release 3.21.29"},
{"19.4.6", "Changes in release 3.21.28"},
{"19.4.7", "Changes in release 3.21.27"},
{"19.4.8", "Changes in release 3.21.26"},
{"19.4.9", "Changes in release 3.21.25"},
{"19.4.10", "Changes in release 3.21.24"},
{"19.4.11", "Changes in release 3.21.23"},
{"19.4.12", "Changes in release 3.21.22"},
{"19.4.13", "Changes in release 3.21.21a"},
{"19.4.14", "Changes in release 3.21.21"},
{"19.4.15", "Changes in release 3.21.20"},
{"19.4.16", "Changes in release 3.21.19"},
{"19.4.17", "Changes in release 3.21.18"},
{"19.4.18", "Changes in release 3.21.17"},
{"19.4.19", "Changes in release 3.21.16"},
{"19.4.20", "Changes in release 3.21.15"},
{"19.4.21", "Changes in release 3.21.14b"},
{"19.4.22", "Changes in release 3.21.14a"},
{"19.4.23", "Changes in release 3.21.13"},
{"19.4.24", "Changes in release 3.21.12"},
{"19.4.25", "Changes in release 3.21.11"},
{"19.4.26", "Changes in release 3.21.10"},
{"19.4.27", "Changes in release 3.21.9"},
{"19.4.28", "Changes in release 3.21.8"},
{"19.4.29", "Changes in release 3.21.7"},
{"19.4.30", "Changes in release 3.21.6"},
{"19.4.31", "Changes in release 3.21.5"},
{"19.4.32", "Changes in release 3.21.4"},
{"19.4.33", "Changes in release 3.21.3"},
{"19.4.34", "Changes in release 3.21.2"},
{"19.4.35", "Changes in release 3.21.0"},
{"19.5", "Changes in release 3.20.x"},
{"19.5.1", "Changes in release 3.20.18"},
{"19.5.2", "Changes in release 3.20.17"},
{"19.5.3", "Changes in release 3.20.16"},
{"19.5.4", "Changes in release 3.20.15"},
{"19.5.5", "Changes in release 3.20.14"},
{"19.5.6", "Changes in release 3.20.13"},
{"19.5.7", "Changes in release 3.20.11"},
{"19.5.8", "Changes in release 3.20.10"},
{"19.5.9", "Changes in release 3.20.9"},
{"19.5.10", "Changes in release 3.20.8"},
{"19.5.11", "Changes in release 3.20.7"},
{"19.5.12", "Changes in release 3.20.6"},
{"19.5.13", "Changes in release 3.20.3"},
{"19.5.14", "Changes in release 3.20.0"},
{"19.6", "Changes in release 3.19.x"},
{"19.6.1", "Changes in release 3.19.5"},
{"19.6.2", "Changes in release 3.19.4"},
{"19.6.3", "Changes in release 3.19.3"},
{"E", "Known errors and design deficiencies in MySQL"},
{"F", "List of things we want to add to MySQL in the future (The TODO)"},
{"19.7", "Things that must done in the real near future"},
{"19.8", "Things that have to be done sometime"},
{"19.9", "Some things we don't have any plans to do"},
{"G", "Comments on porting to other systems"},
{"19.10", "Debugging MySQL"},
{"19.11", "Comments about RTS threads"},
{"19.12", "What is the difference between different thread packages?"},
{"H", "Description of MySQL regular expression syntax"},
{"I", "What is Unireg?"},
{"J", "The MySQL server license"},
{"K", "The MySQL license for Microsoft operating systems"},
{"*", "SQL command, type and function index"},
{"*", "Concept Index"}
};
#define NQUERIES 5
const char *query[NQUERIES]={
"mysql information and manual",
"upgrading from previous version",
"column indexes",
"against about after more right the with/without", /* stopwords test */
"mysql license and copyright"
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment