Merge with 4.1.3-beta

BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
VC++Files/libmysqld/libmysqld.dsp:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/config-netware.h:
  Auto merged
include/my_base.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/mysql_com.h:
  Auto merged
include/sql_state.h:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/connect.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/derived.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_like.result:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/insert.result:
  Auto merged
mysql-test/r/insert_select.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/key.result:
  Auto merged
mysql-test/r/multi_update.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/null.result:
  Auto merged
mysql-test/r/null_key.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/rpl_rotate_logs.result:
  Auto merged
mysql-test/r/rpl_server_id1.result:
  Auto merged
mysql-test/r/rpl_until.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/system_mysql_db.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/multi_update.test:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Auto merged
mysql-test/t/rpl000015.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysys/mf_iocache2.c:
  Auto merged
mysys/my_bitmap.c:
  Auto merged
mysys/my_pthread.c:
  Auto merged
netware/Makefile.am:
  Auto merged
netware/my_manage.c:
  Auto merged
netware/mysql_test_run.c:
  Auto merged
netware/BUILD/compile-linux-tools:
  Auto merged
netware/BUILD/compile-netware-standard:
  Auto merged
netware/BUILD/mwenv:
  Auto merged
netware/BUILD/nwbootstrap:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
scripts/mysql_install_db.sh:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_create.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/lex.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/records.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql-common/client.c:
  Auto merged
configure.in:
  Merge with 4.1
include/mysqld_error.h:
  New errors from 4.1
libmysqld/Makefile.am:
  Merge with 4.1
myisam/myisamchk.c:
  Merge with 4.1
myisam/myisamdef.h:
  Merge with 4.1
myisam/sort.c:
  Merge with 4.1
mysql-test/r/mysqlbinlog.result:
  Merge with 4.1
mysql-test/r/range.result:
  Merge with 4.1
mysql-test/r/rpl_flush_log_loop.result:
  Merge with 4.1
mysql-test/r/rpl_replicate_do.result:
  Merge with 4.1
mysql-test/r/rpl_temporary.result:
  Merge with 4.1
mysql-test/r/rpl_user_variables.result:
  Merge with 4.1
mysql-test/t/func_time.test:
  Merge with 4.1
scripts/mysql_create_system_tables.sh:
  Merge with 4.1
scripts/mysql_fix_privilege_tables.sql:
  Merge with 4.1
sql/Makefile.am:
  Merge with 4.1
sql/filesort.cc:
  Merge with 4.1
sql/ha_innodb.cc:
  Merge with 4.1
sql/ha_innodb.h:
  Merge with 4.1
sql/ha_myisam.cc:
  Merge with 4.1
sql/handler.cc:
  Merge with 4.1
sql/handler.h:
  Merge with 4.1
sql/item_func.cc:
  Merge with 4.1
sql/item_timefunc.cc:
  Merge with 4.1
sql/log.cc:
  Merge with 4.1
sql/log_event.cc:
  Merge with 4.1
sql/mysqld.cc:
  Merge with 4.1
sql/opt_range.cc:
  Merge with 4.1
sql/opt_range.h:
  Merge with 4.1
sql/share/czech/errmsg.txt:
  Merge with 4.1
  Updated english error messages
sql/share/danish/errmsg.txt:
  Merge with 4.1
sql/share/dutch/errmsg.txt:
  Merge with 4.1
sql/share/english/errmsg.txt:
  Merge with 4.1
sql/share/estonian/errmsg.txt:
  Merge with 4.1
sql/share/french/errmsg.txt:
  Merge with 4.1
sql/share/german/errmsg.txt:
  Merge with 4.1
sql/share/greek/errmsg.txt:
  Merge with 4.1
sql/share/hungarian/errmsg.txt:
  Merge with 4.1
sql/share/italian/errmsg.txt:
  Merge with 4.1
sql/share/japanese/errmsg.txt:
  Merge with 4.1
sql/share/korean/errmsg.txt:
  Merge with 4.1
sql/share/norwegian-ny/errmsg.txt:
  Merge with 4.1
sql/share/norwegian/errmsg.txt:
  Merge with 4.1
sql/share/polish/errmsg.txt:
  Merge with 4.1
sql/share/portuguese/errmsg.txt:
  Merge with 4.1
sql/share/romanian/errmsg.txt:
  Merge with 4.1
sql/share/russian/errmsg.txt:
  Merge with 4.1
sql/share/serbian/errmsg.txt:
  Merge with 4.1
sql/share/slovak/errmsg.txt:
  Merge with 4.1
sql/share/spanish/errmsg.txt:
  Merge with 4.1
sql/share/swedish/errmsg.txt:
  Merge with 4.1
sql/share/ukrainian/errmsg.txt:
  Merge with 4.1
sql/slave.cc:
  Merge with 4.1
sql/sql_class.cc:
  Merge with 4.1
sql/sql_class.h:
  Merge with 4.1
sql/sql_db.cc:
  Merge with 4.1
sql/sql_insert.cc:
  Merge with 4.1
sql/sql_lex.cc:
  Merge with 4.1
sql/sql_lex.h:
  Merge with 4.1
sql/sql_parse.cc:
  Merge with 4.1 tree
  Changed // comments to /* */
sql/sql_prepare.cc:
  Merge with 4.1
sql/sql_select.cc:
  Merge with 4.1
sql/sql_table.cc:
  Merge with 4.1
sql/sql_yacc.yy:
  Merge with 4.1
sql/table.h:
  Merge with 4.1
tests/client_test.c:
  Merge with 4.1
This commit is contained in:
unknown 2004-07-07 11:29:39 +03:00
commit 11b8987313
1727 changed files with 63989 additions and 40255 deletions

View file

@ -91,7 +91,7 @@ Tue Mar 26 15:09:45 1991 Mikael WIDENIUS (monty at panther)
Sat Mar 23 10:49:49 1991 Michael Widenius (monty at LYNX)
* Added init of alarm variables to skipp some warnings from gcc.
* Added init of alarm variables to skip some warnings from gcc.
Tue Mar 5 16:50:34 1991 Michael Widenius (monty at LYNX)
@ -124,7 +124,7 @@ Mon Aug 27 22:20:38 1990 Michael Widenius (monty at lynx)
Sun Apr 1 23:29:47 1990 Monty (monty at monty)
* Changed mf_keydisk.c to have separate functions for read and write.
Read can now return pointer to intern key-buffer to skipp
Read can now return pointer to intern key-buffer to skip
unessessary memcpy-s.
Fri Mar 23 23:03:39 1990 Monty (monty at monty)

View file

@ -22,6 +22,42 @@
init_compiled_charsets() that only adds those that he wants
*/
#ifdef HAVE_CHARSET_ucs2
extern CHARSET_INFO my_charset_ucs2_general_uca;
extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci;
extern CHARSET_INFO my_charset_ucs2_latvian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_romanian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_slovenian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_polish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_estonian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_spanish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_swedish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_turkish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_czech_uca_ci;
extern CHARSET_INFO my_charset_ucs2_danish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_slovak_uca_ci;
extern CHARSET_INFO my_charset_ucs2_spanish2_uca_ci;
#endif
#ifdef HAVE_CHARSET_utf8
extern CHARSET_INFO my_charset_utf8_general_uca_ci;
extern CHARSET_INFO my_charset_utf8_icelandic_uca_ci;
extern CHARSET_INFO my_charset_utf8_latvian_uca_ci;
extern CHARSET_INFO my_charset_utf8_romanian_uca_ci;
extern CHARSET_INFO my_charset_utf8_slovenian_uca_ci;
extern CHARSET_INFO my_charset_utf8_polish_uca_ci;
extern CHARSET_INFO my_charset_utf8_estonian_uca_ci;
extern CHARSET_INFO my_charset_utf8_spanish_uca_ci;
extern CHARSET_INFO my_charset_utf8_swedish_uca_ci;
extern CHARSET_INFO my_charset_utf8_turkish_uca_ci;
extern CHARSET_INFO my_charset_utf8_czech_uca_ci;
extern CHARSET_INFO my_charset_utf8_danish_uca_ci;
extern CHARSET_INFO my_charset_utf8_lithuanian_uca_ci;
extern CHARSET_INFO my_charset_utf8_slovak_uca_ci;
extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci;
#endif
my_bool init_compiled_charsets(myf flags __attribute__((unused)))
{
CHARSET_INFO *cs;
@ -74,6 +110,20 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_general_ci);
add_compiled_collation(&my_charset_ucs2_bin);
add_compiled_collation(&my_charset_ucs2_general_uca);
add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci);
add_compiled_collation(&my_charset_ucs2_latvian_uca_ci);
add_compiled_collation(&my_charset_ucs2_romanian_uca_ci);
add_compiled_collation(&my_charset_ucs2_slovenian_uca_ci);
add_compiled_collation(&my_charset_ucs2_polish_uca_ci);
add_compiled_collation(&my_charset_ucs2_estonian_uca_ci);
add_compiled_collation(&my_charset_ucs2_spanish_uca_ci);
add_compiled_collation(&my_charset_ucs2_swedish_uca_ci);
add_compiled_collation(&my_charset_ucs2_turkish_uca_ci);
add_compiled_collation(&my_charset_ucs2_czech_uca_ci);
add_compiled_collation(&my_charset_ucs2_danish_uca_ci);
add_compiled_collation(&my_charset_ucs2_lithuanian_uca_ci);
add_compiled_collation(&my_charset_ucs2_slovak_uca_ci);
add_compiled_collation(&my_charset_ucs2_spanish2_uca_ci);
#endif
#ifdef HAVE_CHARSET_ujis
@ -84,6 +134,21 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf8
add_compiled_collation(&my_charset_utf8_general_ci);
add_compiled_collation(&my_charset_utf8_bin);
add_compiled_collation(&my_charset_utf8_general_uca_ci);
add_compiled_collation(&my_charset_utf8_icelandic_uca_ci);
add_compiled_collation(&my_charset_utf8_latvian_uca_ci);
add_compiled_collation(&my_charset_utf8_romanian_uca_ci);
add_compiled_collation(&my_charset_utf8_slovenian_uca_ci);
add_compiled_collation(&my_charset_utf8_polish_uca_ci);
add_compiled_collation(&my_charset_utf8_estonian_uca_ci);
add_compiled_collation(&my_charset_utf8_spanish_uca_ci);
add_compiled_collation(&my_charset_utf8_swedish_uca_ci);
add_compiled_collation(&my_charset_utf8_turkish_uca_ci);
add_compiled_collation(&my_charset_utf8_czech_uca_ci);
add_compiled_collation(&my_charset_utf8_danish_uca_ci);
add_compiled_collation(&my_charset_utf8_lithuanian_uca_ci);
add_compiled_collation(&my_charset_utf8_slovak_uca_ci);
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
#endif
/* Copy compiled charsets */

View file

@ -21,16 +21,6 @@
#include <my_dir.h>
#include <my_xml.h>
typedef struct
{
int nchars;
MY_UNI_IDX uidx;
} uni_idx;
#define PLANE_SIZE 0x100
#define PLANE_NUM 0x100
#define PLANE_NUMBER(x) (((x)>>8) % PLANE_NUM)
/*
The code below implements this functionality:
@ -48,32 +38,21 @@ my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2)
}
static void set_max_sort_char(CHARSET_INFO *cs)
{
uchar max_char;
uint i;
if (!cs->sort_order)
return;
max_char=cs->sort_order[(uchar) cs->max_sort_char];
for (i= 0; i < 256; i++)
{
if ((uchar) cs->sort_order[i] > max_char)
{
max_char=(uchar) cs->sort_order[i];
cs->max_sort_char= i;
}
}
}
static void init_state_maps(CHARSET_INFO *cs)
static my_bool init_state_maps(CHARSET_INFO *cs)
{
uint i;
uchar *state_map= cs->state_map;
uchar *ident_map= cs->ident_map;
uchar *state_map;
uchar *ident_map;
if (!(cs->state_map= (uchar*) my_once_alloc(256, MYF(MY_WME))))
return 1;
if (!(cs->ident_map= (uchar*) my_once_alloc(256, MYF(MY_WME))))
return 1;
state_map= cs->state_map;
ident_map= cs->ident_map;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
@ -120,6 +99,7 @@ static void init_state_maps(CHARSET_INFO *cs)
state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
state_map[(uchar)'b']= state_map[(uchar)'b']= (uchar) MY_LEX_IDENT_OR_BIN;
state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
return 0;
}
@ -131,98 +111,11 @@ static void simple_cs_init_functions(CHARSET_INFO *cs)
cs->coll= &my_collation_8bit_simple_ci_handler;
cs->cset= &my_charset_8bit_handler;
cs->mbminlen= 1;
cs->mbmaxlen= 1;
}
static int pcmp(const void * f, const void * s)
{
const uni_idx *F= (const uni_idx*) f;
const uni_idx *S= (const uni_idx*) s;
int res;
if (!(res=((S->nchars)-(F->nchars))))
res=((F->uidx.from)-(S->uidx.to));
return res;
}
static my_bool create_fromuni(CHARSET_INFO *cs)
{
uni_idx idx[PLANE_NUM];
int i,n;
/* Clear plane statistics */
bzero(idx,sizeof(idx));
/* Count number of characters in each plane */
for (i=0; i< 0x100; i++)
{
uint16 wc=cs->tab_to_uni[i];
int pl= PLANE_NUMBER(wc);
if (wc || !i)
{
if (!idx[pl].nchars)
{
idx[pl].uidx.from=wc;
idx[pl].uidx.to=wc;
}else
{
idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from;
idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to;
}
idx[pl].nchars++;
}
}
/* Sort planes in descending order */
qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp);
for (i=0; i < PLANE_NUM; i++)
{
int ch,numchars;
/* Skip empty plane */
if (!idx[i].nchars)
break;
numchars=idx[i].uidx.to-idx[i].uidx.from+1;
if (!(idx[i].uidx.tab=(uchar*) my_once_alloc(numchars *
sizeof(*idx[i].uidx.tab),
MYF(MY_WME))))
return TRUE;
bzero(idx[i].uidx.tab,numchars*sizeof(*idx[i].uidx.tab));
for (ch=1; ch < PLANE_SIZE; ch++)
{
uint16 wc=cs->tab_to_uni[ch];
if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc)
{
int ofs= wc - idx[i].uidx.from;
idx[i].uidx.tab[ofs]= ch;
}
}
}
/* Allocate and fill reverse table for each plane */
n=i;
if (!(cs->tab_from_uni= (MY_UNI_IDX*) my_once_alloc(sizeof(MY_UNI_IDX)*(n+1),
MYF(MY_WME))))
return TRUE;
for (i=0; i< n; i++)
cs->tab_from_uni[i]= idx[i].uidx;
/* Set end-of-list marker */
bzero(&cs->tab_from_uni[i],sizeof(MY_UNI_IDX));
return FALSE;
}
static int simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
static int cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
{
to->number= from->number ? from->number : to->number;
@ -244,7 +137,8 @@ static int simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
MY_CS_CTYPE_TABLE_SIZE,
MYF(MY_WME))))
goto err;
init_state_maps(to);
if (init_state_maps(to))
goto err;
}
if (from->to_lower)
if (!(to->to_lower= (uchar*) my_once_memdup((char*) from->to_lower,
@ -263,7 +157,7 @@ static int simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
MY_CS_SORT_ORDER_TABLE_SIZE,
MYF(MY_WME))))
goto err;
set_max_sort_char(to);
}
if (from->tab_to_uni)
{
@ -271,11 +165,10 @@ static int simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
if (!(to->tab_to_uni= (uint16*) my_once_memdup((char*)from->tab_to_uni,
sz, MYF(MY_WME))))
goto err;
if (create_fromuni(to))
goto err;
}
to->mbminlen= 1;
to->mbmaxlen= 1;
if (from->tailoring)
if (!(to->tailoring= my_once_strdup(from->tailoring,MYF(MY_WME))))
goto err;
return 0;
@ -284,6 +177,7 @@ err:
}
static my_bool simple_cs_is_full(CHARSET_INFO *cs)
{
return ((cs->csname && cs->tab_to_uni && cs->ctype && cs->to_upper &&
@ -315,14 +209,34 @@ static int add_collation(CHARSET_INFO *cs)
if (!(all_charsets[cs->number]->state & MY_CS_COMPILED))
{
simple_cs_init_functions(all_charsets[cs->number]);
if (simple_cs_copy_data(all_charsets[cs->number],cs))
return MY_XML_ERROR;
if (simple_cs_is_full(all_charsets[cs->number]))
CHARSET_INFO *new= all_charsets[cs->number];
if (cs_copy_data(all_charsets[cs->number],cs))
return MY_XML_ERROR;
if (!strcmp(cs->csname,"ucs2") )
{
all_charsets[cs->number]->state |= MY_CS_LOADED;
#ifdef HAVE_CHARSET_ucs2
new->cset= my_charset_ucs2_general_uca.cset;
new->coll= my_charset_ucs2_general_uca.coll;
new->strxfrm_multiply= my_charset_ucs2_general_uca.strxfrm_multiply;
new->min_sort_char= my_charset_ucs2_general_uca.min_sort_char;
new->max_sort_char= my_charset_ucs2_general_uca.max_sort_char;
new->mbminlen= 2;
new->mbmaxlen= 2;
new->state |= MY_CS_AVAILABLE | MY_CS_LOADED;
#endif
}
else
{
simple_cs_init_functions(all_charsets[cs->number]);
new->mbminlen= 1;
new->mbmaxlen= 1;
if (simple_cs_is_full(all_charsets[cs->number]))
{
all_charsets[cs->number]->state |= MY_CS_LOADED;
}
all_charsets[cs->number]->state|= MY_CS_AVAILABLE;
}
all_charsets[cs->number]->state|= MY_CS_AVAILABLE;
}
else
{
@ -432,6 +346,10 @@ void add_compiled_collation(CHARSET_INFO *cs)
cs->state|= MY_CS_AVAILABLE;
}
static void *cs_alloc(uint size)
{
return my_once_alloc(size, MYF(MY_WME));
}
#ifdef __NETWARE__
@ -465,9 +383,9 @@ static my_bool init_available_charsets(myf myflags)
{
if (*cs)
{
set_max_sort_char(*cs);
if (cs[0]->ctype)
init_state_maps(*cs);
if (init_state_maps(*cs))
*cs= NULL;
}
}
@ -551,6 +469,14 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
}
cs= (cs->state & MY_CS_AVAILABLE) ? cs : NULL;
}
if (cs && !(cs->state & MY_CS_READY))
{
if ((cs->cset->init && cs->cset->init(cs, cs_alloc)) ||
(cs->coll->init && cs->coll->init(cs, cs_alloc)))
cs= NULL;
else
cs->state|= MY_CS_READY;
}
pthread_mutex_unlock(&THR_LOCK_charset);
return cs;
}

View file

@ -222,7 +222,7 @@ int load_defaults(const char *conf_file, const char **groups,
/* copy name + found arguments + command line arguments to new array */
res[0]= argv[0][0]; /* Name MUST be set, even by embedded library */
memcpy((gptr) (res+1), args.buffer, args.elements*sizeof(char*));
/* Skipp --defaults-file and --defaults-extra-file */
/* Skip --defaults-file and --defaults-extra-file */
(*argc)-= args_used;
(*argv)+= args_used;

View file

@ -122,7 +122,8 @@ static uint hash_rec_mask(HASH *hash,HASH_LINK *pos,uint buffmax,
#if !defined(__SUNPRO_C) && !defined(__USLC__) /* broken compilers */
/* for compilers which can not handle inline */
#if !defined(__SUNPRO_C) && !defined(__USLC__) && !defined(__sgi)
inline
#endif
unsigned int rec_hashnr(HASH *hash,const byte *record)

View file

@ -55,7 +55,6 @@ TODO:
#include "mysys_err.h"
static void my_aiowait(my_aio_result *result);
#endif
#include <assert.h>
#include <errno.h>
#ifdef THREAD
@ -800,7 +799,7 @@ int _my_b_async_read(register IO_CACHE *info, byte *Buffer, uint Count)
{ /* Fix if skipped bytes */
if (info->aio_read_pos + read_length < info->pos_in_file)
{
read_length=0; /* Skipp block */
read_length=0; /* Skip block */
next_pos_in_file=info->pos_in_file;
}
else
@ -894,7 +893,7 @@ int _my_b_async_read(register IO_CACHE *info, byte *Buffer, uint Count)
if (aioread(info->file,read_buffer,(int) max_length,
(my_off_t) next_pos_in_file,MY_SEEK_SET,
&info->aio_result.result))
{ /* Skipp async io */
{ /* Skip async io */
my_errno=errno;
DBUG_PRINT("error",("got error: %d, aio_result: %d from aioread, async skipped",
errno, info->aio_result.result.aio_errno));

View file

@ -23,7 +23,6 @@
#include <m_string.h>
#include <stdarg.h>
#include <m_ctype.h>
#include <assert.h>
my_off_t my_b_append_tell(IO_CACHE* info)
{
@ -273,7 +272,7 @@ uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
fmt++;
/* Found one '%' */
}
/* Skipp if max size is used (to be compatible with printf) */
/* Skip if max size is used (to be compatible with printf) */
while (my_isdigit(&my_charset_latin1, *fmt) || *fmt == '.' || *fmt == '-')
fmt++;
if (*fmt == 's') /* String parameter */

View file

@ -44,7 +44,6 @@
#include "my_static.h"
#include <m_string.h>
#include <errno.h>
#include <assert.h>
#include <stdarg.h>
/*

View file

@ -43,7 +43,7 @@ void pack_dirname(my_string to, const char *from)
(void) intern_filename(to,from); /* Change to intern name */
#ifdef FN_DEVCHAR
if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skipp device part */
if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */
start++;
else
#endif
@ -131,7 +131,7 @@ uint cleanup_dirname(register my_string to, const char *from)
from_ptr=(my_string) from;
#ifdef FN_DEVCHAR
if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
{ /* Skipp device part */
{ /* Skip device part */
length=(uint) (pos-from_ptr)+1;
start=strnmov(buff,from_ptr,length); from_ptr+=length;
}
@ -195,7 +195,7 @@ uint cleanup_dirname(register my_string to, const char *from)
pos--; /* Remove dupplicate '/' */
}
else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR)
pos-=2; /* Skipp /./ */
pos-=2; /* Skip /./ */
else if (pos > buff+1 && pos[-1] == FN_HOMELIB && pos[-2] == FN_LIBCHAR)
{ /* Found ..../~/ */
buff[0]=FN_HOMELIB;
@ -409,7 +409,7 @@ uint system_filename(my_string to, const char *from)
libchar_found=0;
(void) strmov(buff,from); /* If to == from */
from_pos= buff;
if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skipp device part */
if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skip device part */
{
pos++;
to_pos=strnmov(to,from_pos,(size_s) (pos-from_pos));
@ -419,7 +419,7 @@ uint system_filename(my_string to, const char *from)
to_pos=to;
if (from_pos[0] == FN_CURLIB && from_pos[1] == FN_LIBCHAR)
from_pos+=2; /* Skipp './' */
from_pos+=2; /* Skip './' */
if (strchr(from_pos,FN_LIBCHAR))
{
*(to_pos++) = FN_C_BEFORE_DIR;
@ -487,7 +487,7 @@ my_string intern_filename(my_string to, const char *from)
convert_dirname(buff,from,NullS); /* change '<>' to '[]' */
from_pos=buff;
if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skipp device part */
if ((pos=strrchr(from_pos,FN_DEVCHAR))) /* Skip device part */
{
pos++;
to_pos=strnmov(to,from_pos,(size_s) (pos-from_pos));

View file

@ -52,7 +52,7 @@ void soundex(CHARSET_INFO * cs,register my_string out_pntr, my_string in_pntr,
if (remove_garbage)
{
while (*in_pntr && !my_isalpha(cs,*in_pntr)) /* Skipp pre-space */
while (*in_pntr && !my_isalpha(cs,*in_pntr)) /* Skip pre-space */
in_pntr++;
}
*out_pntr++ = map[(uchar)*in_pntr]; /* Copy first letter */
@ -82,7 +82,7 @@ void soundex(CHARSET_INFO * cs,register my_string out_pntr, my_string in_pntr,
/*
If alpha, map input letter to soundex code.
If not alpha and remove_garbage is set then skipp to next char
If not alpha and remove_garbage is set then skip to next char
else return 0
*/

View file

@ -83,7 +83,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
(*free)(res);
file=my_create(to, 0, mode, MyFlags);
}
#elif defined(HAVE_MKSTEMP)
#elif defined(HAVE_MKSTEMP) && !defined(__NETWARE__)
{
char prefix_buff[30];
uint pfx_len;
@ -181,7 +181,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
for (length=0 ; length < 8 && uniq ; length++)
{
*end_pos++= _dig_vec[(int) (uniq & 31)];
*end_pos++= _dig_vec_upper[(int) (uniq & 31)];
uniq >>= 5;
}
(void) strmov(end_pos,TMP_EXT);

View file

@ -39,7 +39,7 @@ WF_PACK *wf_comp(my_string str)
WF_PACK *ret;
DBUG_ENTER("wf_comp");
not_pos= -1; /* Skipp space and '!' in front */
not_pos= -1; /* Skip space and '!' in front */
while (*str == ' ')
str++;
if (*str == '!')

View file

@ -38,7 +38,6 @@
#include "mysys_priv.h"
#include <my_bitmap.h>
#include <assert.h>
#include <m_string.h>

View file

@ -33,6 +33,12 @@ char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
nr Errno
MyFlags Flags
... variable list
NOTE
The following subset of printf format is supported:
"%[0-9.-]*l?[sdu]", where all length flags are parsed but ignored.
Additionally "%.*s" is supported and "%.*[ud]" is correctly parsed but
the length value is ignored.
*/
int my_error(int nr,myf MyFlags, ...)
@ -43,7 +49,10 @@ int my_error(int nr,myf MyFlags, ...)
reg2 char *endpos;
char * par;
char ebuff[ERRMSGSIZE+20];
int prec_chars; /* output precision */
my_bool prec_supplied;
DBUG_ENTER("my_error");
LINT_INIT(prec_chars); /* protected by prec_supplied */
va_start(ap,MyFlags);
DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d", nr, MyFlags, errno));
@ -59,7 +68,6 @@ int my_error(int nr,myf MyFlags, ...)
if (tpos[0] != '%')
{
*endpos++= *tpos++; /* Copy ordinary char */
olen++;
continue;
}
if (*++tpos == '%') /* test if %% */
@ -68,43 +76,71 @@ int my_error(int nr,myf MyFlags, ...)
}
else
{
/* Skipp if max size is used (to be compatible with printf) */
while (my_isdigit(&my_charset_latin1, *tpos) || *tpos == '.' || *tpos == '-')
tpos++;
if (*tpos == 'l') /* Skipp 'l' argument */
tpos++;
/*
Skip size/precision flags to be compatible with printf.
The only size/precision flag supported is "%.*s".
If "%.*u" or "%.*d" are encountered, the precision number is read
from the variable argument list but its value is ignored.
*/
prec_supplied= 0;
if (*tpos== '.')
{
tpos++;
olen--;
if (*tpos == '*')
{
tpos++;
olen--;
prec_chars= va_arg(ap, int); /* get length parameter */
prec_supplied= 1;
}
}
if (!prec_supplied)
{
while (my_isdigit(&my_charset_latin1, *tpos) || *tpos == '.' ||
*tpos == '-')
tpos++;
if (*tpos == 'l') /* Skip 'l' argument */
tpos++;
}
if (*tpos == 's') /* String parameter */
{
par = va_arg(ap, char *);
plen = (uint) strlen(par);
par= va_arg(ap, char *);
plen= (uint) strlen(par);
if (prec_supplied && prec_chars > 0)
plen= min((uint)prec_chars, plen);
if (olen + plen < ERRMSGSIZE+2) /* Replace if possible */
{
endpos=strmov(endpos,par);
tpos++;
olen+=plen-2;
continue;
strmake(endpos, par, plen);
endpos+= plen;
tpos++;
olen+= plen-2;
continue;
}
}
else if (*tpos == 'd' || *tpos == 'u') /* Integer parameter */
{
register int iarg;
iarg = va_arg(ap, int);
iarg= va_arg(ap, int);
if (*tpos == 'd')
plen= (uint) (int2str((long) iarg,endpos, -10) - endpos);
plen= (uint) (int10_to_str((long) iarg, endpos, -10) - endpos);
else
plen= (uint) (int2str((long) (uint) iarg,endpos,10)- endpos);
plen= (uint) (int10_to_str((long) (uint) iarg, endpos, 10) - endpos);
if (olen + plen < ERRMSGSIZE+2) /* Replace parameter if possible */
{
endpos+=plen;
endpos+= plen;
tpos++;
olen+=plen-2;
olen+= plen-2;
continue;
}
}
}
*endpos++='%'; /* % used as % or unknown code */
*endpos++= '%'; /* % used as % or unknown code */
}
*endpos='\0'; /* End of errmessage */
*endpos= '\0'; /* End of errmessage */
va_end(ap);
DBUG_RETURN((*error_handler_hook)(nr, ebuff, MyFlags));
}

View file

@ -18,7 +18,6 @@
/* Thread safe version of gethostbyname_r() */
#include "mysys_priv.h"
#include <assert.h>
#if !defined(MSDOS) && !defined(__WIN__)
#include <netdb.h>
#endif

View file

@ -18,7 +18,6 @@
#include <m_string.h>
#include <stdlib.h>
#include <my_getopt.h>
#include <assert.h>
#include <my_sys.h>
#include <mysys_err.h>

View file

@ -108,7 +108,7 @@ int my_setwd(const char *dir, myf MyFlags)
{
uint drive,drives;
pos++; /* Skipp FN_DEVCHAR */
pos++; /* Skip FN_DEVCHAR */
drive=(uint) (my_toupper(&my_charset_latin1,dir[0])-'A'+1);
drives= (uint) -1;
if ((pos-(byte*) dir) == 2 && drive > 0 && drive < 32)

View file

@ -21,13 +21,11 @@ int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
uchar *b, uint b_length, my_bool part_key,
my_bool skip_end_space)
{
if (part_key && b_length < a_length)
a_length=b_length;
if (skip_end_space)
return charset_info->coll->strnncollsp(charset_info, a, a_length,
b, b_length);
return charset_info->coll->strnncoll(charset_info, a, a_length,
b, b_length);
b, b_length, part_key);
}

View file

@ -23,7 +23,6 @@
#include <signal.h>
#include <m_string.h>
#include <thr_alarm.h>
#include <assert.h>
#if (defined(__BSD__) || defined(_BSDI_VERSION)) && !defined(HAVE_mit_thread)
#define SCHED_POLICY SCHED_RR
@ -98,25 +97,23 @@ void *my_pthread_getspecific_imp(pthread_key_t key)
#undef pthread_exit
void my_pthread_exit(void *status)
{
NXThreadId_t tid = NXThreadGetId();
NXThreadId_t tid;
NXContext_t ctx;
char name[PATH_MAX] = "";
char name[NX_MAX_OBJECT_NAME_LEN+1] = "";
/* Do not call pthread_exit if it is not a LibC thread */
if (tid != 0)
{
NXThreadGetContext(tid, &ctx);
NXContextGetName(ctx, name, PATH_MAX);
tid= NXThreadGetId();
if (tid == NX_INVALID_THREAD_ID || !tid)
return;
if (NXThreadGetContext(tid, &ctx) ||
NXContextGetName(ctx, name, sizeof(name)-1))
return;
/*
"MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread"
with a debug build of LibC the reaper can have different names
*/
if (!strindex(name, "\'s"))
{
pthread_exit(status);
}
}
/*
"MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread"
with a debug build of LibC the reaper can have different names
*/
if (!strindex(name, "\'s"))
pthread_exit(status);
}
#endif

View file

@ -15,7 +15,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "mysys_priv.h"
#include <assert.h>
/* Seek to position in file */
/*ARGSUSED*/

View file

@ -19,6 +19,7 @@
a shared library
*/
C_MODE_START
#include <signal.h>
#define MAX_SIGNALS 10 /* Max signals under a dont-allow */
@ -73,3 +74,4 @@ extern struct st_my_file_info my_file_info_default[MY_NFILE];
#if defined(THREAD) && !defined(__WIN__)
extern sigset_t my_signals; /* signals blocked by mf_brkhant */
#endif
C_MODE_END

View file

@ -161,7 +161,7 @@ my_string my_tempnam(const char *dir, const char *pfx,
for (length=0 ; length < 8 && uniq ; length++)
{
*end_pos++= _dig_vec[(int) (uniq & 31)];
*end_pos++= _dig_vec_upper[(int) (uniq & 31)];
uniq >>= 5;
}
VOID(strmov(end_pos,TMP_EXT));

View file

@ -26,7 +26,6 @@
*/
#include <my_global.h>
#include <assert.h>
#include "rijndael.h"
/*

View file

@ -27,7 +27,6 @@
#include <m_string.h>
#include <queues.h>
#include "thr_alarm.h"
#include <assert.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h> /* AIX needs this for fd_set */