diff options
author | monty@hundin.mysql.fi <> | 2001-11-07 00:13:29 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-11-07 00:13:29 +0200 |
commit | 4c60b4195436182f7d06d5db926e8f60d845271d (patch) | |
tree | 64754ff9c9c94a31f64a96e1a5e3ae60a4a93253 | |
parent | 771af387e347412ce4884dcc5dcee6db12c4bfd9 (diff) | |
download | mariadb-git-4c60b4195436182f7d06d5db926e8f60d845271d.tar.gz |
Portability fix
Cleanup typos (like SKIPP -> SKIP)
49 files changed, 187 insertions, 169 deletions
diff --git a/BUILD/compile-alpha-cxx b/BUILD/compile-alpha-cxx index 2992604644b..d1fa5e3b43f 100755 --- a/BUILD/compile-alpha-cxx +++ b/BUILD/compile-alpha-cxx @@ -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 diff --git a/Docs/manual.texi b/Docs/manual.texi index 2658bf26394..7f0e8bd77e2 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -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}. diff --git a/client/mysqlmanager-pwgen.c b/client/mysqlmanager-pwgen.c index eca9bfa23ea..f0fc5871ca1 100644 --- a/client/mysqlmanager-pwgen.c +++ b/client/mysqlmanager-pwgen.c @@ -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; } diff --git a/include/my_base.h b/include/my_base.h index 065ac073099..adb2366f454 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -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 }; diff --git a/isam/_dynrec.c b/isam/_dynrec.c index 2a908f5b42c..d17d34e6778 100644 --- a/isam/_dynrec.c +++ b/isam/_dynrec.c @@ -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; diff --git a/isam/_packrec.c b/isam/_packrec.c index 5c387f011ad..72e50bba8d8 100644 --- a/isam/_packrec.c +++ b/isam/_packrec.c @@ -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) diff --git a/isam/create.c b/isam/create.c index fcf54ddc731..857c618b49f 100644 --- a/isam/create.c +++ b/isam/create.c @@ -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--; diff --git a/isam/pack_isam.c b/isam/pack_isam.c index 55f6fbf077b..4a3a787ff5c 100644 --- a/isam/pack_isam.c +++ b/isam/pack_isam.c @@ -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) diff --git a/isam/test1.c b/isam/test1.c index 33c61a53d4a..49a9668bf6f 100644 --- a/isam/test1.c +++ b/isam/test1.c @@ -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[]) { diff --git a/isam/test2.c b/isam/test2.c index def6a4d3d5c..ee449a72b97 100644 --- a/isam/test2.c +++ b/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) { diff --git a/libmysql/manager.c b/libmysql/manager.c index 33b2b643333..a1262a46754 100644 --- a/libmysql/manager.c +++ b/libmysql/manager.c @@ -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; diff --git a/myisam/ft_eval.c b/myisam/ft_eval.c index 1f4b0cb4563..c498725daab 100644 --- a/myisam/ft_eval.c +++ b/myisam/ft_eval.c @@ -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; diff --git a/myisam/ft_test1.c b/myisam/ft_test1.c index 61d9a50e9c3..e1a47ff87c3 100644 --- a/myisam/ft_test1.c +++ b/myisam/ft_test1.c @@ -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, diff --git a/myisam/mi_create.c b/myisam/mi_create.c index aad0300c978..3395566e9df 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -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--; diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 4facda91626..f55d646851d 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -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; diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c index 68d546b2010..31be2113c20 100644 --- a/myisam/mi_packrec.c +++ b/myisam/mi_packrec.c @@ -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) diff --git a/myisam/mi_test1.c b/myisam/mi_test1.c index ae09bd4142e..4db48ccab89 100644 --- a/myisam/mi_test1.c +++ b/myisam/mi_test1.c @@ -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; diff --git a/myisam/mi_test2.c b/myisam/mi_test2.c index cb60aeb8618..d03ed16d4b8 100644 --- a/myisam/mi_test2.c +++ b/myisam/mi_test2.c @@ -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; diff --git a/myisam/myisampack.c b/myisam/myisampack.c index 85e55df167a..f6c886f6596 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -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) diff --git a/sql/field.cc b/sql/field.cc index df6c2a80424..2f98d2e0fe8 100644 --- a/sql/field.cc +++ b/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'; } diff --git a/sql/field.h b/sql/field.h index 777e4388850..e2af9853512 100644 --- a/sql/field.h +++ b/sql/field.h @@ -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); } diff --git a/sql/filesort.cc b/sql/filesort.cc index fe0ab603214..16eedb94c59 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -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)); diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index 2358dde7b6d..4e5d6fb3111 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -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" diff --git a/sql/ha_isam.cc b/sql/ha_isam.cc index 2451b8bdaec..1a950ce0a9d 100644 --- a/sql/ha_isam.cc +++ b/sql/ha_isam.cc @@ -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", diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 63a39465cfa..fafa4fe07d6 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -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; diff --git a/sql/handler.h b/sql/handler.h index e36a81cf7c7..b18118bb114 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -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 */ diff --git a/sql/hash_filo.h b/sql/hash_filo.h index 157c2739add..69301479ec7 100644 --- a/sql/hash_filo.h +++ b/sql/hash_filo.h @@ -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 diff --git a/sql/item.h b/sql/item.h index 1bcbc4c7f0f..a52860528f1 100644 --- a/sql/item.h +++ b/sql/item.h @@ -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); } diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index f825b4960c5..8d2a4d491c4 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -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)) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 355f28d5432..6413170198d 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -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 diff --git a/sql/key.cc b/sql/key.cc index 2c7c9361eb3..b6fb260bf36 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -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 diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 45812754cad..020917982b6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -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; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index b06356bfe8b..3849159ca39 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -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; } diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 182fb6cf362..3dd13cbebb9 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -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) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 888ccf7b482..b0a5696515c 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -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 '*' */ diff --git a/sql/sql_class.h b/sql/sql_class.h index e4756284bf5..53e20b3b6d2 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -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; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 7a89a3d38dd..150ed503078 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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; } /* diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index befae9103f4..67f0d05d2d3 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -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)) { diff --git a/sql/sql_list.h b/sql/sql_list.h index 1e1b3a612e6..66311b03435 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -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) */ diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 28140121491..3d79ee6682f 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -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; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b60549d072a..d6c9437e93c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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; diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 7a6652953cc..38d861d03d6 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -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 */ diff --git a/sql/sql_select.cc b/sql/sql_select.cc index fea3dd7728b..acb29743356 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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 diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 5aecb3bc158..046346c1e03 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -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); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6e4ad1918db..bf7167ce391 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -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; } diff --git a/sql/structs.h b/sql/structs.h index 439384c7191..780057061c3 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -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 */ diff --git a/sql/table.cc b/sql/table.cc index 927119f45de..eb6d8fbb9cd 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -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++; diff --git a/sql/time.cc b/sql/time.cc index e4565bdeea7..4d194a94b8e 100644 --- a/sql/time.cc +++ b/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) diff --git a/sql/unireg.h b/sql/unireg.h index 159832295fd..abba79cbda5 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -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 */ |