Portability fix
Cleanup typos (like SKIPP -> SKIP) BUILD/compile-alpha-cxx: Fix when using InnoDB Docs/manual.texi: FreeBSD note client/mysqlmanager-pwgen.c: Portability fix include/my_base.h: Cleanup typos isam/_dynrec.c: Cleanup typos isam/_packrec.c: Cleanup typos isam/create.c: Cleanup typos isam/pack_isam.c: Cleanup typos isam/test1.c: Cleanup typos isam/test2.c: Cleanup typos libmysql/manager.c: Portability fix myisam/ft_eval.c: Cleanup typos myisam/ft_test1.c: Cleanup typos myisam/mi_create.c: Cleanup typos myisam/mi_dynrec.c: Cleanup typos myisam/mi_packrec.c: Cleanup typos myisam/mi_test1.c: Cleanup typos myisam/mi_test2.c: Cleanup typos myisam/myisampack.c: Cleanup typos sql/field.cc: Cleanup typos sql/field.h: Cleanup typos sql/filesort.cc: Cleanup typos sql/gen_lex_hash.cc: Cleanup typos sql/ha_isam.cc: Cleanup typos sql/ha_myisam.cc: Cleanup typos sql/handler.h: Cleanup typos sql/hash_filo.h: Cleanup typos sql/item.h: Cleanup typos sql/item_cmpfunc.cc: Cleanup typos sql/item_strfunc.cc: Cleanup typos sql/key.cc: Cleanup typos sql/mysqld.cc: Cleanup typos sql/opt_range.cc: Cleanup typos sql/opt_sum.cc: Cleanup typos sql/sql_acl.cc: Cleanup typos sql/sql_class.h: Cleanup typos sql/sql_insert.cc: Cleanup typos sql/sql_lex.cc: Cleanup typos sql/sql_list.h: Cleanup typos sql/sql_load.cc: Cleanup typos sql/sql_parse.cc: Cleanup typos sql/sql_rename.cc: Cleanup typos sql/sql_select.cc: Cleanup typos sql/sql_string.cc: Cleanup typos sql/sql_yacc.yy: Fix bug in last changeset sql/structs.h: Cleanup typos sql/table.cc: Cleanup typos sql/time.cc: Cleanup typos sql/unireg.h: Cleanup typos
This commit is contained in:
parent
9f29fd68bd
commit
8547d05ccc
@ -1,7 +1,7 @@
|
||||
/bin/rm -f */.deps/*.P */*.o
|
||||
make -k clean
|
||||
/bin/rm -f */.deps/*.P */*.o
|
||||
/bin/rm -f config.cache mysql-*.tar.gz
|
||||
/bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache mysql-*.tar.gz
|
||||
aclocal; autoheader; aclocal; automake; autoconf
|
||||
|
||||
CC=ccc CFLAGS="-fast" CXX=cxx CXXFLAGS="-fast -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared
|
||||
|
@ -11447,6 +11447,20 @@ correct (otherwise you will have problems connecting to the database). The
|
||||
127.0.0.1 localhost localhost.your.domain
|
||||
@end example
|
||||
|
||||
The recommended way to compile and install MySQL on FreeBSD with
|
||||
gcc (2.95.2 and up) is:
|
||||
|
||||
@example
|
||||
CC=gcc CFLAGS="-O2 -fno-strength-reduce" \
|
||||
CXX=gcc CXXFLAGS="-O2 -fno-rtti -fno-exceptions -felide-constructors -fno-strength-reduce" \
|
||||
./configure --prefix=/usr/local/mysql --enable-assembler
|
||||
gmake
|
||||
gmake install
|
||||
./scripts/mysql_install_db
|
||||
cd /usr/local/mysql
|
||||
./bin/mysqld_safe &
|
||||
@end example
|
||||
|
||||
If you notice that @code{configure} will use MIT-pthreads, you should read
|
||||
the MIT-pthreads notes. @xref{MIT-pthreads}.
|
||||
|
||||
|
@ -112,14 +112,18 @@ void get_pass(char* pw, int len)
|
||||
fclose(fp);
|
||||
while (pw<pw_end)
|
||||
{
|
||||
*pw++='a'+((uint)*pw % 26);
|
||||
char tmp= 'a'+((uint)*pw % 26);
|
||||
*pw++= tmp;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
srand(time(NULL));
|
||||
while (pw<pw_end)
|
||||
*pw++='a'+((uint)rand() % 26);
|
||||
{
|
||||
char tmp= 'a'+((uint)*pw % 26);
|
||||
*pw++= tmp;
|
||||
}
|
||||
}
|
||||
*pw_end=0;
|
||||
}
|
||||
|
@ -263,8 +263,8 @@ enum ha_base_keytype {
|
||||
#define HA_STATE_EXTEND_BLOCK 2048
|
||||
|
||||
enum en_fieldtype {
|
||||
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIPP_ENDSPACE,FIELD_SKIPP_PRESPACE,
|
||||
FIELD_SKIPP_ZERO,FIELD_BLOB,FIELD_CONSTANT,FIELD_INTERVALL,FIELD_ZERO,
|
||||
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
|
||||
FIELD_SKIP_ZERO,FIELD_BLOB,FIELD_CONSTANT,FIELD_INTERVALL,FIELD_ZERO,
|
||||
FIELD_VARCHAR,FIELD_CHECK
|
||||
};
|
||||
|
||||
|
@ -432,7 +432,7 @@ uint _nisam_rec_pack(N_INFO *info, register byte *to, register const byte *from)
|
||||
blob++;
|
||||
from+=sizeof(char*); /* Skipp blob-pointer */
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ZERO)
|
||||
else if (type == FIELD_SKIP_ZERO)
|
||||
{
|
||||
if (memcmp((byte*) from,zero_string,length) == 0)
|
||||
flag|=bit;
|
||||
@ -441,11 +441,11 @@ uint _nisam_rec_pack(N_INFO *info, register byte *to, register const byte *from)
|
||||
memcpy((byte*) to,from,(size_t) length); to+=length;
|
||||
}
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ENDSPACE ||
|
||||
type == FIELD_SKIPP_PRESPACE)
|
||||
else if (type == FIELD_SKIP_ENDSPACE ||
|
||||
type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
pos= (byte*) from; end= (byte*) from + length;
|
||||
if (type == FIELD_SKIPP_ENDSPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE)
|
||||
{ /* Pack trailing spaces */
|
||||
while (end > from && *(end-1) == ' ')
|
||||
end--;
|
||||
@ -532,7 +532,7 @@ my_bool _nisam_rec_check(N_INFO *info,const char *from)
|
||||
to+=length+ blob_length;
|
||||
from+=sizeof(char*);
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ZERO)
|
||||
else if (type == FIELD_SKIP_ZERO)
|
||||
{
|
||||
if (memcmp((byte*) from,zero_string,length) == 0)
|
||||
{
|
||||
@ -542,11 +542,11 @@ my_bool _nisam_rec_check(N_INFO *info,const char *from)
|
||||
else
|
||||
to+=length;
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ENDSPACE ||
|
||||
type == FIELD_SKIPP_PRESPACE)
|
||||
else if (type == FIELD_SKIP_ENDSPACE ||
|
||||
type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
pos= (byte*) from; end= (byte*) from + length;
|
||||
if (type == FIELD_SKIPP_ENDSPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE)
|
||||
{ /* Pack trailing spaces */
|
||||
while (end > from && *(end-1) == ' ')
|
||||
end--;
|
||||
@ -641,10 +641,10 @@ uint _nisam_rec_unpack(register N_INFO *info, register byte *to, byte *from,
|
||||
bzero((byte*) to,rec_length+sizeof(char*));
|
||||
to+=sizeof(char*);
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ZERO)
|
||||
else if (type == FIELD_SKIP_ZERO)
|
||||
bzero((byte*) to,rec_length);
|
||||
else if (type == FIELD_SKIPP_ENDSPACE ||
|
||||
type == FIELD_SKIPP_PRESPACE)
|
||||
else if (type == FIELD_SKIP_ENDSPACE ||
|
||||
type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
if (rec->base.length > 255 && *from & 128)
|
||||
{
|
||||
@ -662,7 +662,7 @@ uint _nisam_rec_unpack(register N_INFO *info, register byte *to, byte *from,
|
||||
if (length >= rec_length ||
|
||||
min_pack_length + length > (uint) (from_end - from))
|
||||
goto err;
|
||||
if (type == FIELD_SKIPP_ENDSPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE)
|
||||
{
|
||||
memcpy(to,(byte*) from,(size_t) length);
|
||||
bfill((byte*) to+length,rec_length-length,' ');
|
||||
@ -690,7 +690,7 @@ uint _nisam_rec_unpack(register N_INFO *info, register byte *to, byte *from,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type == FIELD_SKIPP_ENDSPACE || type == FIELD_SKIPP_PRESPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE)
|
||||
min_pack_length--;
|
||||
if (min_pack_length + rec_length > (uint) (from_end - from))
|
||||
goto err;
|
||||
|
@ -456,7 +456,7 @@ int _nisam_pack_rec_unpack(register N_INFO *info, register byte *to,
|
||||
static void (*get_unpack_function(N_RECINFO *rec))(N_RECINFO *, BIT_BUFF *, uchar *, uchar *)
|
||||
{
|
||||
switch (rec->base_type) {
|
||||
case FIELD_SKIPP_ZERO:
|
||||
case FIELD_SKIP_ZERO:
|
||||
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
|
||||
return &uf_zerofill_skipp_zero;
|
||||
return &uf_skipp_zero;
|
||||
@ -466,7 +466,7 @@ static void (*get_unpack_function(N_RECINFO *rec))(N_RECINFO *, BIT_BUFF *, ucha
|
||||
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
|
||||
return &uf_zerofill_normal;
|
||||
return &decode_bytes;
|
||||
case FIELD_SKIPP_ENDSPACE:
|
||||
case FIELD_SKIP_ENDSPACE:
|
||||
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
|
||||
{
|
||||
if (rec->pack_type & PACK_TYPE_SELECTED)
|
||||
@ -476,7 +476,7 @@ static void (*get_unpack_function(N_RECINFO *rec))(N_RECINFO *, BIT_BUFF *, ucha
|
||||
if (rec->pack_type & PACK_TYPE_SELECTED)
|
||||
return &uf_endspace_selected;
|
||||
return &uf_endspace;
|
||||
case FIELD_SKIPP_PRESPACE:
|
||||
case FIELD_SKIP_PRESPACE:
|
||||
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
|
||||
{
|
||||
if (rec->pack_type & PACK_TYPE_SELECTED)
|
||||
|
@ -96,8 +96,8 @@ int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo,
|
||||
pack_reclength+=sizeof(char*)+(1 << (rec->base.length*8));
|
||||
}
|
||||
}
|
||||
else if (type == FIELD_SKIPP_PRESPACE ||
|
||||
type == FIELD_SKIPP_ENDSPACE)
|
||||
else if (type == FIELD_SKIP_PRESPACE ||
|
||||
type == FIELD_SKIP_ENDSPACE)
|
||||
{
|
||||
if (pack_reclength != NI_POS_ERROR)
|
||||
pack_reclength+= rec->base.length > 255 ? 2 : 1;
|
||||
@ -105,7 +105,7 @@ int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo,
|
||||
}
|
||||
else if (type == FIELD_ZERO)
|
||||
packed--;
|
||||
else if (type != FIELD_SKIPP_ZERO)
|
||||
else if (type != FIELD_SKIP_ZERO)
|
||||
{
|
||||
min_pack_length+=rec->base.length;
|
||||
packed--; /* Not a pack record type */
|
||||
@ -119,7 +119,7 @@ int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo,
|
||||
while (rec != recinfo)
|
||||
{
|
||||
rec--;
|
||||
if (rec->base.type == (int) FIELD_SKIPP_ZERO && rec->base.length == 1)
|
||||
if (rec->base.type == (int) FIELD_SKIP_ZERO && rec->base.length == 1)
|
||||
{
|
||||
rec->base.type=(int) FIELD_NORMAL;
|
||||
packed--;
|
||||
|
@ -682,7 +682,7 @@ static HUFF_COUNTS *init_huff_count(N_INFO *info,my_off_t records)
|
||||
type = FIELD_NORMAL;
|
||||
if (count[i].field_length <= 8 &&
|
||||
(type == FIELD_NORMAL ||
|
||||
type == FIELD_SKIPP_ZERO))
|
||||
type == FIELD_SKIP_ZERO))
|
||||
count[i].max_zero_fill= count[i].field_length;
|
||||
init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree,0,NULL,NULL);
|
||||
if (records)
|
||||
@ -786,7 +786,7 @@ static int get_statistic(MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
|
||||
|
||||
/* Save character counters and space-counts and zero-field-counts */
|
||||
if (count->field_type == FIELD_NORMAL ||
|
||||
count->field_type == FIELD_SKIPP_ENDSPACE)
|
||||
count->field_type == FIELD_SKIP_ENDSPACE)
|
||||
{
|
||||
for ( ; end_pos > pos ; end_pos--)
|
||||
if (end_pos[-1] != ' ')
|
||||
@ -805,7 +805,7 @@ static int get_statistic(MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
|
||||
count->max_end_space = length;
|
||||
}
|
||||
if (count->field_type == FIELD_NORMAL ||
|
||||
count->field_type == FIELD_SKIPP_PRESPACE)
|
||||
count->field_type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
for (pos=start_pos; pos < end_pos ; pos++)
|
||||
if (pos[0] != ' ')
|
||||
@ -825,7 +825,7 @@ static int get_statistic(MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
|
||||
}
|
||||
if (count->field_length <= 8 &&
|
||||
(count->field_type == FIELD_NORMAL ||
|
||||
count->field_type == FIELD_SKIPP_ZERO))
|
||||
count->field_type == FIELD_SKIP_ZERO))
|
||||
{
|
||||
uint i;
|
||||
if (!memcmp((byte*) start_pos,zero_string,count->field_length))
|
||||
@ -906,7 +906,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees, my_off_t records)
|
||||
new_length=calc_packed_length(huff_counts,0);
|
||||
if (old_length < new_length && huff_counts->field_length > 1)
|
||||
{
|
||||
huff_counts->field_type=FIELD_SKIPP_ZERO;
|
||||
huff_counts->field_type=FIELD_SKIP_ZERO;
|
||||
huff_counts->counts[0]-=length;
|
||||
huff_counts->bytes_packed=old_length- records/8;
|
||||
goto found_pack;
|
||||
@ -950,7 +950,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees, my_off_t records)
|
||||
huff_counts->counts[' ']+=huff_counts->tot_pre_space;
|
||||
if (test_space_compress(huff_counts,records,huff_counts->max_end_space,
|
||||
huff_counts->end_space,
|
||||
huff_counts->tot_end_space,FIELD_SKIPP_ENDSPACE))
|
||||
huff_counts->tot_end_space,FIELD_SKIP_ENDSPACE))
|
||||
goto found_pack;
|
||||
huff_counts->counts[' ']-=huff_counts->tot_pre_space;
|
||||
}
|
||||
@ -958,7 +958,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees, my_off_t records)
|
||||
{
|
||||
if (test_space_compress(huff_counts,records,huff_counts->max_pre_space,
|
||||
huff_counts->pre_space,
|
||||
huff_counts->tot_pre_space,FIELD_SKIPP_PRESPACE))
|
||||
huff_counts->tot_pre_space,FIELD_SKIP_PRESPACE))
|
||||
goto found_pack;
|
||||
}
|
||||
|
||||
@ -968,10 +968,10 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees, my_off_t records)
|
||||
|
||||
if (huff_counts->max_zero_fill &&
|
||||
(huff_counts->field_type == FIELD_NORMAL ||
|
||||
huff_counts->field_type == FIELD_SKIPP_ZERO))
|
||||
huff_counts->field_type == FIELD_SKIP_ZERO))
|
||||
{
|
||||
huff_counts->counts[0]-=huff_counts->max_zero_fill*
|
||||
(huff_counts->field_type == FIELD_SKIPP_ZERO ?
|
||||
(huff_counts->field_type == FIELD_SKIP_ZERO ?
|
||||
records - huff_counts->zero_fields : records);
|
||||
huff_counts->pack_type|=PACK_TYPE_ZERO_FILL;
|
||||
huff_counts->bytes_packed=calc_packed_length(huff_counts,0);
|
||||
@ -1011,9 +1011,9 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees, my_off_t records)
|
||||
if (verbose)
|
||||
printf("\nnormal: %3d empty-space: %3d empty-zero: %3d empty-fill: %3d\npre-space: %3d end-space: %3d table-lookup: %3d zero: %3d\n",
|
||||
field_count[FIELD_NORMAL],space_fields,
|
||||
field_count[FIELD_SKIPP_ZERO],fill_zero_fields,
|
||||
field_count[FIELD_SKIPP_PRESPACE],
|
||||
field_count[FIELD_SKIPP_ENDSPACE],
|
||||
field_count[FIELD_SKIP_ZERO],fill_zero_fields,
|
||||
field_count[FIELD_SKIP_PRESPACE],
|
||||
field_count[FIELD_SKIP_ENDSPACE],
|
||||
field_count[FIELD_INTERVALL],
|
||||
field_count[FIELD_ZERO]);
|
||||
DBUG_VOID_RETURN;
|
||||
@ -1668,7 +1668,7 @@ static int compress_isam_file(MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
|
||||
field_length-=count->max_zero_fill;
|
||||
|
||||
switch(count->field_type) {
|
||||
case FIELD_SKIPP_ZERO:
|
||||
case FIELD_SKIP_ZERO:
|
||||
if (!memcmp((byte*) start_pos,zero_string,field_length))
|
||||
{
|
||||
write_bits(1,1);
|
||||
@ -1682,7 +1682,7 @@ static int compress_isam_file(MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
|
||||
write_bits(tree->code[(uchar) *start_pos],
|
||||
(uint) tree->code_len[(uchar) *start_pos]);
|
||||
break;
|
||||
case FIELD_SKIPP_ENDSPACE:
|
||||
case FIELD_SKIP_ENDSPACE:
|
||||
for (pos=end_pos ; pos > start_pos && pos[-1] == ' ' ; pos--) ;
|
||||
length=(uint) (end_pos-pos);
|
||||
if (count->pack_type & PACK_TYPE_SELECTED)
|
||||
@ -1705,7 +1705,7 @@ static int compress_isam_file(MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
|
||||
(uint) tree->code_len[(uchar) *start_pos]);
|
||||
start_pos=end_pos;
|
||||
break;
|
||||
case FIELD_SKIPP_PRESPACE:
|
||||
case FIELD_SKIP_PRESPACE:
|
||||
for (pos=start_pos ; pos < end_pos && pos[0] == ' ' ; pos++) ;
|
||||
length=(uint) (pos-start_pos);
|
||||
if (count->pack_type & PACK_TYPE_SELECTED)
|
||||
|
@ -19,7 +19,7 @@
|
||||
static void get_options(int argc, char *argv[]);
|
||||
|
||||
static int rec_pointer_size=0,verbose=0,remove_ant=0,pack_keys=1,flags[50],
|
||||
packed_field=FIELD_SKIPP_PRESPACE;
|
||||
packed_field=FIELD_SKIP_PRESPACE;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
10
isam/test2.c
10
isam/test2.c
@ -115,17 +115,17 @@ int main(int argc, char *argv[])
|
||||
keyinfo[5].seg[1].base.type=0;
|
||||
keyinfo[5].base.flag = (uint8) (pack_type ? HA_PACK_KEY : 0);
|
||||
|
||||
recinfo[0].base.type=pack_fields ? FIELD_SKIPP_PRESPACE : 0;
|
||||
recinfo[0].base.type=pack_fields ? FIELD_SKIP_PRESPACE : 0;
|
||||
recinfo[0].base.length=7;
|
||||
recinfo[1].base.type=pack_fields ? FIELD_SKIPP_PRESPACE : 0;
|
||||
recinfo[1].base.type=pack_fields ? FIELD_SKIP_PRESPACE : 0;
|
||||
recinfo[1].base.length=5;
|
||||
recinfo[2].base.type=pack_fields ? FIELD_SKIPP_PRESPACE : 0;
|
||||
recinfo[2].base.type=pack_fields ? FIELD_SKIP_PRESPACE : 0;
|
||||
recinfo[2].base.length=9;
|
||||
recinfo[3].base.type=FIELD_NORMAL;
|
||||
recinfo[3].base.length=STANDAR_LENGTH-7-5-9-4;
|
||||
recinfo[4].base.type=pack_fields ? FIELD_SKIPP_ZERO : 0;
|
||||
recinfo[4].base.type=pack_fields ? FIELD_SKIP_ZERO : 0;
|
||||
recinfo[4].base.length=4;
|
||||
recinfo[5].base.type=pack_fields ? FIELD_SKIPP_ENDSPACE : 0;
|
||||
recinfo[5].base.type=pack_fields ? FIELD_SKIP_ENDSPACE : 0;
|
||||
recinfo[5].base.length=60;
|
||||
if (use_blob)
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
|
||||
strmov(con->last_error,"Read error on socket");
|
||||
goto err;
|
||||
}
|
||||
if ((con->cmd_status=atoi(con->net.read_pos)) != MANAGER_OK)
|
||||
if ((con->cmd_status=atoi((char*) con->net.read_pos)) != MANAGER_OK)
|
||||
{
|
||||
strmov(con->last_error,"Access denied");
|
||||
goto err;
|
||||
@ -238,7 +238,7 @@ int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, char* res_buf,
|
||||
int res_buf_size)
|
||||
{
|
||||
char* res_buf_end=res_buf+res_buf_size;
|
||||
char* net_buf=con->net.read_pos, *net_buf_end;
|
||||
char* net_buf=(char*) con->net.read_pos, *net_buf_end;
|
||||
int res_buf_shift=RES_BUF_SHIFT;
|
||||
uint num_bytes;
|
||||
|
||||
|
@ -32,7 +32,7 @@ int main(int argc,char *argv[])
|
||||
bzero((char*)recinfo,sizeof(recinfo));
|
||||
|
||||
/* First define 2 columns */
|
||||
recinfo[0].type=FIELD_SKIPP_ENDSPACE;
|
||||
recinfo[0].type=FIELD_SKIP_ENDSPACE;
|
||||
recinfo[0].length=docid_length;
|
||||
recinfo[1].type=FIELD_BLOB;
|
||||
recinfo[1].length= 4+mi_portable_sizeof_char_ptr;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ft_test1.h"
|
||||
#include <getopt.h>
|
||||
|
||||
static int key_field=FIELD_VARCHAR,extra_field=FIELD_SKIPP_ENDSPACE;
|
||||
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,
|
||||
|
@ -119,8 +119,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
|
||||
pack_reclength+=(1 << ((rec->length-mi_portable_sizeof_char_ptr)*8)); /* Max blob length */
|
||||
}
|
||||
}
|
||||
else if (type == FIELD_SKIPP_PRESPACE ||
|
||||
type == FIELD_SKIPP_ENDSPACE)
|
||||
else if (type == FIELD_SKIP_PRESPACE ||
|
||||
type == FIELD_SKIP_ENDSPACE)
|
||||
{
|
||||
if (pack_reclength != INT_MAX32)
|
||||
pack_reclength+= rec->length > 255 ? 2 : 1;
|
||||
@ -138,7 +138,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
|
||||
pack_reclength+=2;
|
||||
}
|
||||
}
|
||||
else if (type != FIELD_SKIPP_ZERO)
|
||||
else if (type != FIELD_SKIP_ZERO)
|
||||
{
|
||||
min_pack_length+=rec->length;
|
||||
packed--; /* Not a pack record type */
|
||||
@ -152,7 +152,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
|
||||
while (rec != recinfo)
|
||||
{
|
||||
rec--;
|
||||
if (rec->type == (int) FIELD_SKIPP_ZERO && rec->length == 1)
|
||||
if (rec->type == (int) FIELD_SKIP_ZERO && rec->length == 1)
|
||||
{
|
||||
rec->type=(int) FIELD_NORMAL;
|
||||
packed--;
|
||||
|
@ -642,7 +642,7 @@ uint _mi_rec_pack(MI_INFO *info, register byte *to, register const byte *from)
|
||||
}
|
||||
blob++;
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ZERO)
|
||||
else if (type == FIELD_SKIP_ZERO)
|
||||
{
|
||||
if (memcmp((byte*) from,zero_string,length) == 0)
|
||||
flag|=bit;
|
||||
@ -651,11 +651,11 @@ uint _mi_rec_pack(MI_INFO *info, register byte *to, register const byte *from)
|
||||
memcpy((byte*) to,from,(size_t) length); to+=length;
|
||||
}
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ENDSPACE ||
|
||||
type == FIELD_SKIPP_PRESPACE)
|
||||
else if (type == FIELD_SKIP_ENDSPACE ||
|
||||
type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
pos= (byte*) from; end= (byte*) from + length;
|
||||
if (type == FIELD_SKIPP_ENDSPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE)
|
||||
{ /* Pack trailing spaces */
|
||||
while (end > from && *(end-1) == ' ')
|
||||
end--;
|
||||
@ -750,7 +750,7 @@ my_bool _mi_rec_check(MI_INFO *info,const char *record)
|
||||
if (blob_length)
|
||||
to+=length - mi_portable_sizeof_char_ptr+ blob_length;
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ZERO)
|
||||
else if (type == FIELD_SKIP_ZERO)
|
||||
{
|
||||
if (memcmp((byte*) record,zero_string,length) == 0)
|
||||
{
|
||||
@ -760,11 +760,11 @@ my_bool _mi_rec_check(MI_INFO *info,const char *record)
|
||||
else
|
||||
to+=length;
|
||||
}
|
||||
else if (type == FIELD_SKIPP_ENDSPACE ||
|
||||
type == FIELD_SKIPP_PRESPACE)
|
||||
else if (type == FIELD_SKIP_ENDSPACE ||
|
||||
type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
pos= (byte*) record; end= (byte*) record + length;
|
||||
if (type == FIELD_SKIPP_ENDSPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE)
|
||||
{ /* Pack trailing spaces */
|
||||
while (end > record && *(end-1) == ' ')
|
||||
end--;
|
||||
@ -876,10 +876,10 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
|
||||
}
|
||||
if (flag & bit)
|
||||
{
|
||||
if (type == FIELD_BLOB || type == FIELD_SKIPP_ZERO)
|
||||
if (type == FIELD_BLOB || type == FIELD_SKIP_ZERO)
|
||||
bzero((byte*) to,rec_length);
|
||||
else if (type == FIELD_SKIPP_ENDSPACE ||
|
||||
type == FIELD_SKIPP_PRESPACE)
|
||||
else if (type == FIELD_SKIP_ENDSPACE ||
|
||||
type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
if (rec->length > 255 && *from & 128)
|
||||
{
|
||||
@ -897,7 +897,7 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
|
||||
if (length >= rec_length ||
|
||||
min_pack_length + length > (uint) (from_end - from))
|
||||
goto err;
|
||||
if (type == FIELD_SKIPP_ENDSPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE)
|
||||
{
|
||||
memcpy(to,(byte*) from,(size_t) length);
|
||||
bfill((byte*) to+length,rec_length-length,' ');
|
||||
@ -924,7 +924,7 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type == FIELD_SKIPP_ENDSPACE || type == FIELD_SKIPP_PRESPACE)
|
||||
if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE)
|
||||
min_pack_length--;
|
||||
if (min_pack_length + rec_length > (uint) (from_end - from))
|
||||
goto err;
|
||||
|
@ -465,7 +465,7 @@ static void (*get_unpack_function(MI_COLUMNDEF *rec))
|
||||
(MI_COLUMNDEF *, MI_BIT_BUFF *, uchar *, uchar *)
|
||||
{
|
||||
switch (rec->base_type) {
|
||||
case FIELD_SKIPP_ZERO:
|
||||
case FIELD_SKIP_ZERO:
|
||||
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
|
||||
return &uf_zerofill_skipp_zero;
|
||||
return &uf_skipp_zero;
|
||||
@ -475,7 +475,7 @@ static void (*get_unpack_function(MI_COLUMNDEF *rec))
|
||||
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
|
||||
return &uf_zerofill_normal;
|
||||
return &decode_bytes;
|
||||
case FIELD_SKIPP_ENDSPACE:
|
||||
case FIELD_SKIP_ENDSPACE:
|
||||
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
|
||||
{
|
||||
if (rec->pack_type & PACK_TYPE_SELECTED)
|
||||
@ -485,7 +485,7 @@ static void (*get_unpack_function(MI_COLUMNDEF *rec))
|
||||
if (rec->pack_type & PACK_TYPE_SELECTED)
|
||||
return &uf_endspace_selected;
|
||||
return &uf_endspace;
|
||||
case FIELD_SKIPP_PRESPACE:
|
||||
case FIELD_SKIP_PRESPACE:
|
||||
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
|
||||
{
|
||||
if (rec->pack_type & PACK_TYPE_SELECTED)
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define MAX_REC_LENGTH 1024
|
||||
|
||||
static int rec_pointer_size=0,verbose=0,flags[50];
|
||||
static int key_field=FIELD_SKIPP_PRESPACE,extra_field=FIELD_SKIPP_ENDSPACE;
|
||||
static int key_field=FIELD_SKIP_PRESPACE,extra_field=FIELD_SKIP_ENDSPACE;
|
||||
static int key_type=HA_KEYTYPE_NUM;
|
||||
static int create_flag=0;
|
||||
|
||||
|
@ -148,15 +148,15 @@ int main(int argc, char *argv[])
|
||||
keyinfo[5].keysegs=1;
|
||||
keyinfo[5].flag = pack_type;
|
||||
|
||||
recinfo[0].type=pack_fields ? FIELD_SKIPP_PRESPACE : 0;
|
||||
recinfo[0].type=pack_fields ? FIELD_SKIP_PRESPACE : 0;
|
||||
recinfo[0].length=7;
|
||||
recinfo[0].null_bit=0;
|
||||
recinfo[0].null_pos=0;
|
||||
recinfo[1].type=pack_fields ? FIELD_SKIPP_PRESPACE : 0;
|
||||
recinfo[1].type=pack_fields ? FIELD_SKIP_PRESPACE : 0;
|
||||
recinfo[1].length=5;
|
||||
recinfo[1].null_bit=0;
|
||||
recinfo[1].null_pos=0;
|
||||
recinfo[2].type=pack_fields ? FIELD_SKIPP_PRESPACE : 0;
|
||||
recinfo[2].type=pack_fields ? FIELD_SKIP_PRESPACE : 0;
|
||||
recinfo[2].length=9;
|
||||
recinfo[2].null_bit=0;
|
||||
recinfo[2].null_pos=0;
|
||||
@ -164,11 +164,11 @@ int main(int argc, char *argv[])
|
||||
recinfo[3].length=STANDARD_LENGTH-7-5-9-4;
|
||||
recinfo[3].null_bit=0;
|
||||
recinfo[3].null_pos=0;
|
||||
recinfo[4].type=pack_fields ? FIELD_SKIPP_ZERO : 0;
|
||||
recinfo[4].type=pack_fields ? FIELD_SKIP_ZERO : 0;
|
||||
recinfo[4].length=4;
|
||||
recinfo[4].null_bit=0;
|
||||
recinfo[4].null_pos=0;
|
||||
recinfo[5].type=pack_fields ? FIELD_SKIPP_ENDSPACE : 0;
|
||||
recinfo[5].type=pack_fields ? FIELD_SKIP_ENDSPACE : 0;
|
||||
recinfo[5].length=60;
|
||||
recinfo[5].null_bit=0;
|
||||
recinfo[5].null_pos=0;
|
||||
|
@ -672,7 +672,7 @@ static HUFF_COUNTS *init_huff_count(MI_INFO *info,my_off_t records)
|
||||
type = FIELD_NORMAL;
|
||||
if (count[i].field_length <= 8 &&
|
||||
(type == FIELD_NORMAL ||
|
||||
type == FIELD_SKIPP_ZERO))
|
||||
type == FIELD_SKIP_ZERO))
|
||||
count[i].max_zero_fill= count[i].field_length;
|
||||
init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree,0,NULL,NULL);
|
||||
if (records && type != FIELD_BLOB && type != FIELD_VARCHAR)
|
||||
@ -796,7 +796,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
|
||||
|
||||
/* Save character counters and space-counts and zero-field-counts */
|
||||
if (count->field_type == FIELD_NORMAL ||
|
||||
count->field_type == FIELD_SKIPP_ENDSPACE)
|
||||
count->field_type == FIELD_SKIP_ENDSPACE)
|
||||
{
|
||||
for ( ; end_pos > pos ; end_pos--)
|
||||
if (end_pos[-1] != ' ')
|
||||
@ -815,7 +815,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
|
||||
count->max_end_space = length;
|
||||
}
|
||||
if (count->field_type == FIELD_NORMAL ||
|
||||
count->field_type == FIELD_SKIPP_PRESPACE)
|
||||
count->field_type == FIELD_SKIP_PRESPACE)
|
||||
{
|
||||
for (pos=start_pos; pos < end_pos ; pos++)
|
||||
if (pos[0] != ' ')
|
||||
@ -851,7 +851,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
|
||||
}
|
||||
if (count->field_length <= 8 &&
|
||||
(count->field_type == FIELD_NORMAL ||
|
||||
count->field_type == FIELD_SKIPP_ZERO))
|
||||
count->field_type == FIELD_SKIP_ZERO))
|
||||
{
|
||||
uint i;
|
||||
if (!memcmp((byte*) start_pos,zero_string,count->field_length))
|
||||
@ -956,7 +956,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
|
||||
new_length=calc_packed_length(huff_counts,0);
|
||||
if (old_length < new_length && huff_counts->field_length > 1)
|
||||
{
|
||||
huff_counts->field_type=FIELD_SKIPP_ZERO;
|
||||
huff_counts->field_type=FIELD_SKIP_ZERO;
|
||||
huff_counts->counts[0]-=length;
|
||||
huff_counts->bytes_packed=old_length- records/8;
|
||||
goto found_pack;
|
||||
@ -1000,7 +1000,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
|
||||
huff_counts->counts[' ']+=huff_counts->tot_pre_space;
|
||||
if (test_space_compress(huff_counts,records,huff_counts->max_end_space,
|
||||
huff_counts->end_space,
|
||||
huff_counts->tot_end_space,FIELD_SKIPP_ENDSPACE))
|
||||
huff_counts->tot_end_space,FIELD_SKIP_ENDSPACE))
|
||||
goto found_pack;
|
||||
huff_counts->counts[' ']-=huff_counts->tot_pre_space;
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
|
||||
{
|
||||
if (test_space_compress(huff_counts,records,huff_counts->max_pre_space,
|
||||
huff_counts->pre_space,
|
||||
huff_counts->tot_pre_space,FIELD_SKIPP_PRESPACE))
|
||||
huff_counts->tot_pre_space,FIELD_SKIP_PRESPACE))
|
||||
goto found_pack;
|
||||
}
|
||||
|
||||
@ -1018,10 +1018,10 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
|
||||
|
||||
if (huff_counts->max_zero_fill &&
|
||||
(huff_counts->field_type == FIELD_NORMAL ||
|
||||
huff_counts->field_type == FIELD_SKIPP_ZERO))
|
||||
huff_counts->field_type == FIELD_SKIP_ZERO))
|
||||
{
|
||||
huff_counts->counts[0]-=huff_counts->max_zero_fill*
|
||||
(huff_counts->field_type == FIELD_SKIPP_ZERO ?
|
||||
(huff_counts->field_type == FIELD_SKIP_ZERO ?
|
||||
records - huff_counts->zero_fields : records);
|
||||
huff_counts->pack_type|=PACK_TYPE_ZERO_FILL;
|
||||
huff_counts->bytes_packed=calc_packed_length(huff_counts,0);
|
||||
@ -1061,9 +1061,9 @@ static void check_counts(HUFF_COUNTS *huff_counts, uint trees,
|
||||
if (verbose)
|
||||
printf("\nnormal: %3d empty-space: %3d empty-zero: %3d empty-fill: %3d\npre-space: %3d end-space: %3d intervall-fields: %3d zero: %3d\n",
|
||||
field_count[FIELD_NORMAL],space_fields,
|
||||
field_count[FIELD_SKIPP_ZERO],fill_zero_fields,
|
||||
field_count[FIELD_SKIPP_PRESPACE],
|
||||
field_count[FIELD_SKIPP_ENDSPACE],
|
||||
field_count[FIELD_SKIP_ZERO],fill_zero_fields,
|
||||
field_count[FIELD_SKIP_PRESPACE],
|
||||
field_count[FIELD_SKIP_ENDSPACE],
|
||||
field_count[FIELD_INTERVALL],
|
||||
field_count[FIELD_ZERO]);
|
||||
DBUG_VOID_RETURN;
|
||||
@ -1729,7 +1729,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
|
||||
field_length-=count->max_zero_fill;
|
||||
|
||||
switch(count->field_type) {
|
||||
case FIELD_SKIPP_ZERO:
|
||||
case FIELD_SKIP_ZERO:
|
||||
if (!memcmp((byte*) start_pos,zero_string,field_length))
|
||||
{
|
||||
write_bits(1,1);
|
||||
@ -1743,7 +1743,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
|
||||
write_bits(tree->code[(uchar) *start_pos],
|
||||
(uint) tree->code_len[(uchar) *start_pos]);
|
||||
break;
|
||||
case FIELD_SKIPP_ENDSPACE:
|
||||
case FIELD_SKIP_ENDSPACE:
|
||||
for (pos=end_pos ; pos > start_pos && pos[-1] == ' ' ; pos--) ;
|
||||
length=(uint) (end_pos-pos);
|
||||
if (count->pack_type & PACK_TYPE_SELECTED)
|
||||
@ -1766,7 +1766,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
|
||||
(uint) tree->code_len[(uchar) *start_pos]);
|
||||
start_pos=end_pos;
|
||||
break;
|
||||
case FIELD_SKIPP_PRESPACE:
|
||||
case FIELD_SKIP_PRESPACE:
|
||||
for (pos=start_pos ; pos < end_pos && pos[0] == ' ' ; pos++) ;
|
||||
length=(uint) (pos-start_pos);
|
||||
if (count->pack_type & PACK_TYPE_SELECTED)
|
||||
|
10
sql/field.cc
10
sql/field.cc
@ -63,7 +63,7 @@ const char field_separator=',';
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
** Calculate length of number and it's parts
|
||||
** Calculate length of number and its parts
|
||||
** Increment cuted_fields if wrong number
|
||||
*/
|
||||
|
||||
@ -215,7 +215,7 @@ static bool test_if_real(const char *str,int length)
|
||||
|
||||
/****************************************************************************
|
||||
** Functions for the base classes
|
||||
** This is a unpacked number.
|
||||
** This is an unpacked number.
|
||||
****************************************************************************/
|
||||
|
||||
Field::Field(char *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,
|
||||
@ -368,7 +368,7 @@ bool Field::optimize_range()
|
||||
|
||||
/****************************************************************************
|
||||
** Functions for the Field_decimal class
|
||||
** This is a unpacked number.
|
||||
** This is an unpacked number.
|
||||
****************************************************************************/
|
||||
|
||||
void
|
||||
@ -410,7 +410,7 @@ void Field_decimal::store(const char *from,uint len)
|
||||
{
|
||||
fyllchar = '0';
|
||||
if (from != end)
|
||||
while (*from == '0' && from != end-1) // Skipp prezero
|
||||
while (*from == '0' && from != end-1) // Skip prezero
|
||||
from++;
|
||||
}
|
||||
else
|
||||
@ -464,7 +464,7 @@ void Field_decimal::store(const char *from,uint len)
|
||||
if (tmp_dec--)
|
||||
{
|
||||
*to++ ='.';
|
||||
if (decstr.nr_dec) from++; // Skipp '.'
|
||||
if (decstr.nr_dec) from++; // Skip '.'
|
||||
for (i=(int) min(decstr.nr_dec,tmp_dec) ; i-- > 0 ; ) *to++ = *from++;
|
||||
for (i=(int) (tmp_dec-min(decstr.nr_dec,tmp_dec)) ; i-- > 0 ; ) *to++ = '0';
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ struct st_cache_field;
|
||||
void field_conv(Field *to,Field *from);
|
||||
|
||||
class Field {
|
||||
Field(const Item &); /* Prevent use of theese */
|
||||
Field(const Item &); /* Prevent use of these */
|
||||
void operator=(Field &);
|
||||
public:
|
||||
static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); }
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "sql_sort.h"
|
||||
|
||||
#ifndef THREAD
|
||||
#define SKIPP_DBUG_IN_FILESORT
|
||||
#define SKIP_DBUG_IN_FILESORT
|
||||
#endif
|
||||
|
||||
/* How to write record_ref. */
|
||||
@ -77,7 +77,7 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length,
|
||||
SORTPARAM param;
|
||||
DBUG_ENTER("filesort");
|
||||
DBUG_EXECUTE("info",TEST_filesort(sortorder,s_length,special););
|
||||
#ifdef SKIPP_DBUG_IN_FILESORT
|
||||
#ifdef SKIP_DBUG_IN_FILESORT
|
||||
DBUG_PUSH(""); /* No DBUG here */
|
||||
#endif
|
||||
|
||||
@ -229,7 +229,7 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length,
|
||||
else
|
||||
statistic_add(filesort_rows, records, &LOCK_status);
|
||||
*examined_rows= param.examined_rows;
|
||||
#ifdef SKIPP_DBUG_IN_FILESORT
|
||||
#ifdef SKIP_DBUG_IN_FILESORT
|
||||
DBUG_POP(); /* Ok to DBUG */
|
||||
#endif
|
||||
DBUG_PRINT("exit",("records: %ld",records));
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <my_sys.h>
|
||||
#include <m_string.h>
|
||||
#ifndef __GNU_LIBRARY__
|
||||
#define __GNU_LIBRARY__ // Skipp warnings in getopt.h
|
||||
#define __GNU_LIBRARY__ // Skip warnings in getopt.h
|
||||
#endif
|
||||
#include <getopt.h>
|
||||
#include "mysql_version.h"
|
||||
|
@ -316,7 +316,7 @@ int ha_isam::create(const char *name, register TABLE *form,
|
||||
{
|
||||
/* skip null fields */
|
||||
if (!(temp_length= (*field)->pack_length()))
|
||||
continue; /* Skipp null-fields */
|
||||
continue; /* Skip null-fields */
|
||||
if (! found || fieldpos < minpos ||
|
||||
(fieldpos == minpos && temp_length < length))
|
||||
{
|
||||
@ -344,15 +344,15 @@ int ha_isam::create(const char *name, register TABLE *form,
|
||||
else if (!(options & HA_OPTION_PACK_RECORD))
|
||||
recinfo_pos->base.type= (int) FIELD_NORMAL;
|
||||
else if (found->zero_pack())
|
||||
recinfo_pos->base.type= (int) FIELD_SKIPP_ZERO;
|
||||
recinfo_pos->base.type= (int) FIELD_SKIP_ZERO;
|
||||
else
|
||||
recinfo_pos->base.type= (int) ((length <= 3 ||
|
||||
(found->flags & ZEROFILL_FLAG)) ?
|
||||
FIELD_NORMAL :
|
||||
found->type() == FIELD_TYPE_STRING ||
|
||||
found->type() == FIELD_TYPE_VAR_STRING ?
|
||||
FIELD_SKIPP_ENDSPACE :
|
||||
FIELD_SKIPP_PRESPACE);
|
||||
FIELD_SKIP_ENDSPACE :
|
||||
FIELD_SKIP_PRESPACE);
|
||||
recinfo_pos++ ->base.length=(uint16) length;
|
||||
recpos=minpos+length;
|
||||
DBUG_PRINT("loop",("length: %d type: %d",
|
||||
|
@ -1066,7 +1066,7 @@ int ha_myisam::create(const char *name, register TABLE *form,
|
||||
{
|
||||
/* skip null fields */
|
||||
if (!(temp_length= (*field)->pack_length()))
|
||||
continue; /* Skipp null-fields */
|
||||
continue; /* Skip null-fields */
|
||||
if (! found || fieldpos < minpos ||
|
||||
(fieldpos == minpos && temp_length < length))
|
||||
{
|
||||
@ -1092,15 +1092,15 @@ int ha_myisam::create(const char *name, register TABLE *form,
|
||||
else if (!(options & HA_OPTION_PACK_RECORD))
|
||||
recinfo_pos->type= (int) FIELD_NORMAL;
|
||||
else if (found->zero_pack())
|
||||
recinfo_pos->type= (int) FIELD_SKIPP_ZERO;
|
||||
recinfo_pos->type= (int) FIELD_SKIP_ZERO;
|
||||
else
|
||||
recinfo_pos->type= (int) ((length <= 3 ||
|
||||
(found->flags & ZEROFILL_FLAG)) ?
|
||||
FIELD_NORMAL :
|
||||
found->type() == FIELD_TYPE_STRING ||
|
||||
found->type() == FIELD_TYPE_VAR_STRING ?
|
||||
FIELD_SKIPP_ENDSPACE :
|
||||
FIELD_SKIPP_PRESPACE);
|
||||
FIELD_SKIP_ENDSPACE :
|
||||
FIELD_SKIP_PRESPACE);
|
||||
if (found->null_ptr)
|
||||
{
|
||||
recinfo_pos->null_bit=found->null_bit;
|
||||
|
@ -95,7 +95,7 @@
|
||||
|
||||
/* Error on write which is recoverable (Key exist) */
|
||||
|
||||
#define HA_WRITE_SKIPP 121 /* Duplicate key on write */
|
||||
#define HA_WRITE_SKIP 121 /* Duplicate key on write */
|
||||
#define HA_READ_CHECK 123 /* Update with is recoverable */
|
||||
#define HA_CANT_DO_THAT 131 /* Databasehandler can't do it */
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#define HASH_FILO_H
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma interface /* gcc class implementation */
|
||||
#pragma interface /* gcc class interface */
|
||||
#endif
|
||||
|
||||
class hash_filo_element
|
||||
|
@ -23,7 +23,7 @@ struct st_table_list;
|
||||
void item_init(void); /* Init item functions */
|
||||
|
||||
class Item {
|
||||
Item(const Item &); /* Prevent use of theese */
|
||||
Item(const Item &); /* Prevent use of these */
|
||||
void operator=(Item &);
|
||||
public:
|
||||
static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); }
|
||||
|
@ -955,7 +955,7 @@ void Item_func_in::fix_length_and_dec()
|
||||
for (uint i=0 ; i < arg_count ; i++)
|
||||
{
|
||||
array->set(j,args[i]);
|
||||
if (!args[i]->null_value) // Skipp NULL values
|
||||
if (!args[i]->null_value) // Skip NULL values
|
||||
j++;
|
||||
}
|
||||
if ((array->used_count=j))
|
||||
|
@ -231,7 +231,7 @@ String *Item_func_concat_ws::val_str(String *str)
|
||||
for (i++; i < arg_count ; i++)
|
||||
{
|
||||
if (!(res2= args[i]->val_str(use_as_buff)) || !res2->length())
|
||||
continue; // Skipp NULL and empty string
|
||||
continue; // Skip NULL and empty string
|
||||
|
||||
if (res->length() + sep_str->length() + res2->length() >
|
||||
max_allowed_packet)
|
||||
@ -520,7 +520,7 @@ String *Item_func_insert::val_str(String *str)
|
||||
}
|
||||
#endif
|
||||
if (start > res->length()+1)
|
||||
return res; // Wrong param; skipp insert
|
||||
return res; // Wrong param; skip insert
|
||||
if (length > res->length()-start)
|
||||
length=res->length()-start;
|
||||
if (res->length() - length + res2->length() > max_allowed_packet)
|
||||
@ -1097,7 +1097,7 @@ void Item_func_soundex::fix_length_and_dec()
|
||||
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
@ -1129,7 +1129,7 @@ String *Item_func_soundex::val_str(String *str)
|
||||
char *to= (char *) str_value.ptr();
|
||||
char *from= (char *) res->ptr(), *end=from+res->length();
|
||||
|
||||
while (from != end && isspace(*from)) // Skipp pre-space
|
||||
while (from != end && isspace(*from)) // Skip pre-space
|
||||
from++; /* purecov: inspected */
|
||||
if (from == end)
|
||||
return &empty_string; // No alpha characters.
|
||||
@ -1304,7 +1304,7 @@ String *Item_func_make_set::val_str(String *str)
|
||||
if (bits & 1)
|
||||
{
|
||||
String *res= (*ptr)->val_str(str);
|
||||
if (res) // Skipp nulls
|
||||
if (res) // Skip nulls
|
||||
{
|
||||
if (!first_found)
|
||||
{ // First argument
|
||||
|
@ -96,7 +96,7 @@ void key_copy(byte *key,TABLE *table,uint idx,uint key_length)
|
||||
length=min(key_length,key_part->length);
|
||||
set_if_smaller(blob_length,length);
|
||||
int2store(key,(uint) blob_length);
|
||||
key+=2; // Skipp length info
|
||||
key+=2; // Skip length info
|
||||
memcpy(key,pos,blob_length);
|
||||
}
|
||||
else
|
||||
|
@ -3988,7 +3988,7 @@ static void get_options(int argc,char **argv)
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
// Skipp empty arguments (from shell)
|
||||
// Skip empty arguments (from shell)
|
||||
while (argc != optind && !argv[optind][0])
|
||||
optind++;
|
||||
if (argc != optind)
|
||||
@ -4589,7 +4589,7 @@ static ulong find_bit_type(const char *x, TYPELIB *bit_lib)
|
||||
if (!*(end=strcend(pos,','))) /* Let end point at fieldend */
|
||||
{
|
||||
while (end > pos && end[-1] == ' ')
|
||||
end--; /* Skipp end-space */
|
||||
end--; /* Skip end-space */
|
||||
found_end=1;
|
||||
}
|
||||
found_int=0; found_count=0;
|
||||
|
@ -537,7 +537,7 @@ static int sel_cmp(Field *field, char *a,char *b,uint8 a_flag,uint8 b_flag)
|
||||
}
|
||||
if (*a)
|
||||
goto end; // NULL where equal
|
||||
a++; b++; // Skipp NULL marker
|
||||
a++; b++; // Skip NULL marker
|
||||
}
|
||||
cmp=field->key_cmp((byte*) a,(byte*) b);
|
||||
if (cmp) return cmp < 0 ? -1 : 1; // The values differed
|
||||
@ -1105,7 +1105,7 @@ static bool like_range(const char *ptr,uint ptr_length,char escape,
|
||||
{
|
||||
if (*ptr == escape && ptr+1 != end)
|
||||
{
|
||||
ptr++; // Skipp escape
|
||||
ptr++; // Skip escape
|
||||
*min_str++= *max_str++ = *ptr;
|
||||
continue;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ bool part_of_cond(COND *cond,Field *field)
|
||||
static bool find_range_key(TABLE_REF *ref, Field* field, COND *cond)
|
||||
{
|
||||
if (!(field->flags & PART_KEY_FLAG))
|
||||
return 0; // Not part of a key. Skipp it
|
||||
return 0; // Not part of a key. Skip it
|
||||
|
||||
TABLE *table=field->table;
|
||||
if (table->file->option_flag() & HA_WRONG_ASCII_ORDER)
|
||||
|
@ -781,7 +781,7 @@ int wild_case_compare(const char *str,const char *wildstr)
|
||||
if (! *wildstr ) DBUG_RETURN (*str != 0);
|
||||
if (*wildstr++ == wild_one)
|
||||
{
|
||||
if (! *str++) DBUG_RETURN (1); /* One char; skipp */
|
||||
if (! *str++) DBUG_RETURN (1); /* One char; skip */
|
||||
}
|
||||
else
|
||||
{ /* Found '*' */
|
||||
|
@ -224,7 +224,7 @@ public:
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** every connection is handle by a thread with a THD
|
||||
** every connection is handled by a thread with a THD
|
||||
****************************************************************************/
|
||||
|
||||
class delayed_insert;
|
||||
|
@ -368,12 +368,12 @@ int write_record(TABLE *table,COPY_INFO *info)
|
||||
{
|
||||
while ((error=table->file->write_row(table->record[0])))
|
||||
{
|
||||
if (error != HA_WRITE_SKIPP)
|
||||
if (error != HA_WRITE_SKIP)
|
||||
goto err;
|
||||
uint key_nr;
|
||||
if ((int) (key_nr = table->file->get_dup_key(error)) < 0)
|
||||
{
|
||||
error=HA_WRITE_SKIPP; /* Database can't find key */
|
||||
error=HA_WRITE_SKIP; /* Database can't find key */
|
||||
goto err;
|
||||
}
|
||||
/*
|
||||
|
@ -616,7 +616,7 @@ int yylex(void *arg)
|
||||
return(IDENT);
|
||||
|
||||
case STATE_USER_VARIABLE_DELIMITER:
|
||||
lex->tok_start=lex->ptr; // Skipp first `
|
||||
lex->tok_start=lex->ptr; // Skip first `
|
||||
#ifdef USE_MB
|
||||
if (use_mb(default_charset_info))
|
||||
{
|
||||
|
@ -258,7 +258,7 @@ public:
|
||||
|
||||
|
||||
/*
|
||||
** An simple intrusive list with automaticly removes element from list
|
||||
** A simple intrusive list which automaticly removes element from list
|
||||
** on delete (for THD element)
|
||||
*/
|
||||
|
||||
|
@ -375,7 +375,7 @@ read_fixed_length(THD *thd,COPY_INFO &info,TABLE *table,List<Item> &fields,
|
||||
DBUG_RETURN(1);
|
||||
if (table->next_number_field)
|
||||
table->next_number_field->reset(); // Clear for next record
|
||||
if (read_info.next_line()) // Skipp to next line
|
||||
if (read_info.next_line()) // Skip to next line
|
||||
break;
|
||||
if (read_info.line_cuted)
|
||||
thd->cuted_fields++; /* To long row */
|
||||
@ -451,7 +451,7 @@ read_sep_field(THD *thd,COPY_INFO &info,TABLE *table,
|
||||
DBUG_RETURN(1);
|
||||
if (table->next_number_field)
|
||||
table->next_number_field->reset(); // Clear for next record
|
||||
if (read_info.next_line()) // Skipp to next line
|
||||
if (read_info.next_line()) // Skip to next line
|
||||
break;
|
||||
if (read_info.line_cuted)
|
||||
thd->cuted_fields++; /* To long row */
|
||||
@ -602,10 +602,10 @@ int READ_INFO::read_field()
|
||||
if (found_end_of_line)
|
||||
return 1; // One have to call next_line
|
||||
|
||||
/* Skipp until we find 'line_start' */
|
||||
/* Skip until we find 'line_start' */
|
||||
|
||||
if (start_of_line)
|
||||
{ // Skipp until line_start
|
||||
{ // Skip until line_start
|
||||
start_of_line=0;
|
||||
if (find_start_of_fields())
|
||||
return 1;
|
||||
@ -757,7 +757,7 @@ int READ_INFO::read_fixed_length()
|
||||
return 1; // One have to call next_line
|
||||
|
||||
if (start_of_line)
|
||||
{ // Skipp until line_start
|
||||
{ // Skip until line_start
|
||||
start_of_line=0;
|
||||
if (find_start_of_fields())
|
||||
return 1;
|
||||
|
@ -774,7 +774,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
break;
|
||||
case COM_REGISTER_SLAVE:
|
||||
{
|
||||
if(register_slave(thd, (uchar*)packet, packet_length))
|
||||
if (register_slave(thd, (uchar*)packet, packet_length))
|
||||
send_error(&thd->net);
|
||||
else
|
||||
send_ok(&thd->net);
|
||||
@ -791,7 +791,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
*tbl_name++ = 0;
|
||||
memcpy(tbl_name, packet + db_len + 2, tbl_len);
|
||||
tbl_name[tbl_len] = 0;
|
||||
if(mysql_table_dump(thd, db, tbl_name, -1))
|
||||
if (mysql_table_dump(thd, db, tbl_name, -1))
|
||||
send_error(&thd->net); // dump to NET
|
||||
|
||||
break;
|
||||
@ -928,7 +928,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
case COM_BINLOG_DUMP:
|
||||
{
|
||||
slow_command = TRUE;
|
||||
if(check_access(thd, FILE_ACL, any_db))
|
||||
if (check_access(thd, FILE_ACL, any_db))
|
||||
break;
|
||||
mysql_log.write(thd,command, 0);
|
||||
|
||||
@ -1177,21 +1177,21 @@ mysql_execute_command(void)
|
||||
}
|
||||
case SQLCOM_SHOW_NEW_MASTER:
|
||||
{
|
||||
if(check_access(thd, FILE_ACL, any_db))
|
||||
if (check_access(thd, FILE_ACL, any_db))
|
||||
goto error;
|
||||
res = show_new_master(thd);
|
||||
break;
|
||||
}
|
||||
case SQLCOM_SHOW_SLAVE_HOSTS:
|
||||
{
|
||||
if(check_access(thd, FILE_ACL, any_db))
|
||||
if (check_access(thd, FILE_ACL, any_db))
|
||||
goto error;
|
||||
res = show_slave_hosts(thd);
|
||||
break;
|
||||
}
|
||||
case SQLCOM_SHOW_BINLOG_EVENTS:
|
||||
{
|
||||
if(check_access(thd, FILE_ACL, any_db))
|
||||
if (check_access(thd, FILE_ACL, any_db))
|
||||
goto error;
|
||||
res = show_binlog_events(thd);
|
||||
break;
|
||||
@ -1217,7 +1217,7 @@ mysql_execute_command(void)
|
||||
}
|
||||
case SQLCOM_CHANGE_MASTER:
|
||||
{
|
||||
if(check_access(thd, PROCESS_ACL, any_db))
|
||||
if (check_access(thd, PROCESS_ACL, any_db))
|
||||
goto error;
|
||||
res = change_master(thd);
|
||||
break;
|
||||
@ -1238,7 +1238,7 @@ mysql_execute_command(void)
|
||||
}
|
||||
|
||||
case SQLCOM_LOAD_MASTER_DATA: // sync with master
|
||||
if(check_process_priv(thd))
|
||||
if (check_process_priv(thd))
|
||||
goto error;
|
||||
res = load_master_data(thd);
|
||||
break;
|
||||
@ -2052,9 +2052,9 @@ mysql_execute_command(void)
|
||||
GRANT_ACL),
|
||||
tables))
|
||||
goto error;
|
||||
res = mysql_table_grant(thd,tables,lex->users_list, lex->columns,
|
||||
lex->grant, lex->sql_command == SQLCOM_REVOKE);
|
||||
if (!res)
|
||||
if (!(res = mysql_table_grant(thd,tables,lex->users_list, lex->columns,
|
||||
lex->grant,
|
||||
lex->sql_command == SQLCOM_REVOKE)))
|
||||
{
|
||||
mysql_update_log.write(thd, thd->query, thd->query_length);
|
||||
if (mysql_bin_log.is_open())
|
||||
@ -2783,7 +2783,7 @@ static void remove_escape(char *name)
|
||||
}
|
||||
#endif
|
||||
if (*name == '\\' && name[1])
|
||||
name++; // Skipp '\\'
|
||||
name++; // Skip '\\'
|
||||
*to++= *name;
|
||||
}
|
||||
*to=0;
|
||||
|
@ -80,7 +80,7 @@ end:
|
||||
for (table=table_list ;
|
||||
table->next != ren_table ;
|
||||
table=table->next->next) ;
|
||||
table=table->next->next; // Skipp error table
|
||||
table=table->next->next; // Skip error table
|
||||
/* Revert to old names */
|
||||
rename_tables(thd, table, 1);
|
||||
/* Note that lock_table == 0 here, so the unlock loop will work */
|
||||
|
@ -172,7 +172,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
|
||||
|
||||
/*****************************************************************************
|
||||
** check fields, find best join, do the select and output fields.
|
||||
** mysql_select assumes that all tables are allready opened
|
||||
** mysql_select assumes that all tables are already opened
|
||||
*****************************************************************************/
|
||||
|
||||
int
|
||||
@ -514,7 +514,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
|
||||
(!group && join.tmp_table_param.sum_func_count))
|
||||
order=0;
|
||||
|
||||
// Can't use sort on head table if using cache
|
||||
// Can't use sort on head table if using row cache
|
||||
if (join.full_join)
|
||||
{
|
||||
if (group)
|
||||
@ -1172,7 +1172,7 @@ merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end,
|
||||
if (start == new_fields)
|
||||
return start; // Impossible or
|
||||
if (new_fields == end)
|
||||
return start; // No new fields, skipp all
|
||||
return start; // No new fields, skip all
|
||||
|
||||
KEY_FIELD *first_free=new_fields;
|
||||
|
||||
@ -1234,7 +1234,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level,
|
||||
// Don't remove column IS NULL on a LEFT JOIN table
|
||||
if (!eq_func || !value || value->type() != Item::NULL_ITEM ||
|
||||
!field->table->maybe_null || field->null_ptr)
|
||||
return; // Not a key. Skipp it
|
||||
return; // Not a key. Skip it
|
||||
exists_optimize=1;
|
||||
}
|
||||
else
|
||||
@ -1489,7 +1489,7 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
||||
}
|
||||
}
|
||||
|
||||
if(!cond_func)
|
||||
if (!cond_func)
|
||||
return;
|
||||
|
||||
KEYUSE keyuse;
|
||||
@ -2158,7 +2158,7 @@ get_best_combination(JOIN *join)
|
||||
{
|
||||
while (keyuse->keypart != i ||
|
||||
((~used_tables) & keyuse->used_tables))
|
||||
keyuse++; /* Skipp other parts */
|
||||
keyuse++; /* Skip other parts */
|
||||
|
||||
uint maybe_null= test(keyinfo->key_part[i].null_bit);
|
||||
j->ref.items[i]=keyuse->val; // Save for cond removal
|
||||
@ -2811,7 +2811,7 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond, bool *simple_order)
|
||||
else if (!(order_tables & not_const_tables))
|
||||
{
|
||||
DBUG_PRINT("info",("removing: %s", order->item[0]->full_name()));
|
||||
continue; // skipp const item
|
||||
continue; // skip const item
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3670,7 +3670,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
(field->type() == FIELD_TYPE_STRING ||
|
||||
field->type() == FIELD_TYPE_VAR_STRING) &&
|
||||
length >= 10 && blob_count)
|
||||
recinfo->type=FIELD_SKIPP_ENDSPACE;
|
||||
recinfo->type=FIELD_SKIP_ENDSPACE;
|
||||
else
|
||||
recinfo->type=FIELD_NORMAL;
|
||||
if (!--hidden_field_count)
|
||||
@ -4665,7 +4665,7 @@ join_ft_read_first(JOIN_TAB *tab)
|
||||
int error;
|
||||
TABLE *table= tab->table;
|
||||
|
||||
#if 0
|
||||
#if NOT_USED_YET
|
||||
if (cp_buffer_from_ref(&tab->ref)) // as ft-key doesn't use store_key's
|
||||
return -1; // see also FT_SELECT::init()
|
||||
#endif
|
||||
|
@ -577,7 +577,7 @@ int wild_case_compare(const char *str,const char *str_end,
|
||||
{
|
||||
do
|
||||
{
|
||||
if (str == str_end) // Skipp one char if possible
|
||||
if (str == str_end) // Skip one char if possible
|
||||
return (result);
|
||||
INC_PTR(str,str_end);
|
||||
} while (++wildstr < wildend && *wildstr == wild_one);
|
||||
@ -696,7 +696,7 @@ int wild_compare(const char *str,const char *str_end,
|
||||
{
|
||||
do
|
||||
{
|
||||
if (str == str_end) // Skipp one char if possible
|
||||
if (str == str_end) // Skip one char if possible
|
||||
return (result);
|
||||
str++;
|
||||
} while (*++wildstr == wild_one && wildstr != wildend);
|
||||
|
@ -3210,7 +3210,7 @@ handler:
|
||||
if (!add_table_to_list($2,0,0))
|
||||
YYABORT;
|
||||
}
|
||||
| HANDLER_SYM table_ident READ_SYM handler_read_or_scan
|
||||
| HANDLER_SYM table_ident READ_SYM
|
||||
{
|
||||
LEX *lex=Lex;
|
||||
lex->sql_command = SQLCOM_HA_READ;
|
||||
@ -3218,7 +3218,7 @@ handler:
|
||||
if (!add_table_to_list($2,0,0))
|
||||
YYABORT;
|
||||
}
|
||||
where_clause limit_clause { }
|
||||
handler_read_or_scan where_clause limit_clause { }
|
||||
|
||||
handler_read_or_scan:
|
||||
handler_scan_function { Lex->backup_dir= 0; }
|
||||
|
@ -170,7 +170,7 @@ typedef struct st_lex_user {
|
||||
#define REG_MAY_BE_UPDATED 64
|
||||
#define REG_AUTO_UPDATE 64 /* Used in D-forms for scroll-tables */
|
||||
#define REG_OVERWRITE 128
|
||||
#define REG_SKIPP_DUPP 256
|
||||
#define REG_SKIP_DUP 256
|
||||
|
||||
/* Bits in form->status */
|
||||
#define STATUS_NO_RECORD (1+2) /* Record isn't usably */
|
||||
|
@ -824,7 +824,7 @@ fix_type_pointers(const char ***array, TYPELIB *point_to_type, uint types,
|
||||
*type_name= '\0'; /* End string */
|
||||
ptr=type_name;
|
||||
}
|
||||
ptr+=2; /* Skipp end mark and last 0 */
|
||||
ptr+=2; /* Skip end mark and last 0 */
|
||||
}
|
||||
else
|
||||
ptr++;
|
||||
|
10
sql/time.cc
10
sql/time.cc
@ -128,7 +128,7 @@ long calc_daynr(uint year,uint month,uint day)
|
||||
DBUG_ENTER("calc_daynr");
|
||||
|
||||
if (year == 0 && month == 0 && day == 0)
|
||||
DBUG_RETURN(0); /* Skipp errors */
|
||||
DBUG_RETURN(0); /* Skip errors */
|
||||
if (year < 200)
|
||||
{
|
||||
if ((year=year+1900) < 1900+YY_PART_YEAR)
|
||||
@ -434,7 +434,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
|
||||
DBUG_ENTER("str_to_TIME");
|
||||
DBUG_PRINT("enter",("str: %.*s",length,str));
|
||||
|
||||
for (; str != end && !isdigit(*str) ; str++) ; // Skipp garbage
|
||||
for (; str != end && !isdigit(*str) ; str++) ; // Skip garbage
|
||||
if (str == end)
|
||||
DBUG_RETURN(TIMESTAMP_NONE);
|
||||
/*
|
||||
@ -594,7 +594,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
|
||||
date[0]=value;
|
||||
state=1; // Assume next is hours
|
||||
found_days=1;
|
||||
str++; // Skipp space;
|
||||
str++; // Skip space;
|
||||
}
|
||||
else if ((end-str) > 1 && *str == ':' && isdigit(str[1]))
|
||||
{
|
||||
@ -602,7 +602,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
|
||||
date[1]=value;
|
||||
state=2;
|
||||
found_hours=1;
|
||||
str++; // skipp ':'
|
||||
str++; // skip ':'
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -623,7 +623,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
|
||||
date[state++]=value;
|
||||
if (state == 4 || (end-str) < 2 || *str != ':' || !isdigit(str[1]))
|
||||
break;
|
||||
str++; // Skipp ':'
|
||||
str++; // Skip ':'
|
||||
}
|
||||
|
||||
if (state != 4)
|
||||
|
@ -85,7 +85,7 @@
|
||||
#define MYF_RW MYF(MY_WME+MY_NABP) /* Vid my_read & my_write */
|
||||
|
||||
#define SPECIAL_USE_LOCKS 1 /* Lock used databases */
|
||||
#define SPECIAL_NO_NEW_FUNC 2 /* Skipp new functions */
|
||||
#define SPECIAL_NO_NEW_FUNC 2 /* Skip new functions */
|
||||
#define SPECIAL_NEW_FUNC 4 /* New nonstandard functions */
|
||||
#define SPECIAL_WAIT_IF_LOCKED 8 /* Wait if locked database */
|
||||
#define SPECIAL_SAME_DB_NAME 16 /* form name = file name */
|
||||
|
Loading…
x
Reference in New Issue
Block a user