diff options
Diffstat (limited to 'isam')
-rw-r--r-- | isam/_cache.c | 20 | ||||
-rw-r--r-- | isam/_dbug.c | 6 | ||||
-rw-r--r-- | isam/_dynrec.c | 26 | ||||
-rw-r--r-- | isam/_key.c | 6 | ||||
-rw-r--r-- | isam/_locking.c | 8 | ||||
-rw-r--r-- | isam/_packrec.c | 12 | ||||
-rw-r--r-- | isam/_page.c | 6 | ||||
-rw-r--r-- | isam/_search.c | 6 | ||||
-rw-r--r-- | isam/_statrec.c | 8 | ||||
-rw-r--r-- | isam/changed.c | 6 | ||||
-rw-r--r-- | isam/close.c | 6 | ||||
-rw-r--r-- | isam/create.c | 14 | ||||
-rw-r--r-- | isam/delete.c | 8 | ||||
-rw-r--r-- | isam/extra.c | 7 | ||||
-rw-r--r-- | isam/info.c | 6 | ||||
-rw-r--r-- | isam/isamchk.c | 14 | ||||
-rw-r--r-- | isam/isamdef.h | 6 | ||||
-rw-r--r-- | isam/isamlog.c | 10 | ||||
-rw-r--r-- | isam/log.c | 6 | ||||
-rw-r--r-- | isam/open.c | 6 | ||||
-rw-r--r-- | isam/pack_isam.c | 32 | ||||
-rw-r--r-- | isam/panic.c | 6 | ||||
-rw-r--r-- | isam/range.c | 6 | ||||
-rw-r--r-- | isam/rfirst.c | 6 | ||||
-rw-r--r-- | isam/rkey.c | 6 | ||||
-rw-r--r-- | isam/rlast.c | 6 | ||||
-rw-r--r-- | isam/rnext.c | 6 | ||||
-rw-r--r-- | isam/rprev.c | 6 | ||||
-rw-r--r-- | isam/rrnd.c | 6 | ||||
-rw-r--r-- | isam/rsame.c | 6 | ||||
-rw-r--r-- | isam/rsamepos.c | 6 | ||||
-rw-r--r-- | isam/sort.c | 6 | ||||
-rw-r--r-- | isam/static.c | 8 | ||||
-rw-r--r-- | isam/test1.c | 8 | ||||
-rw-r--r-- | isam/test2.c | 16 | ||||
-rw-r--r-- | isam/test3.c | 10 | ||||
-rw-r--r-- | isam/update.c | 6 | ||||
-rw-r--r-- | isam/write.c | 8 |
38 files changed, 168 insertions, 173 deletions
diff --git a/isam/_cache.c b/isam/_cache.c index 53619126660..bca9a699a85 100644 --- a/isam/_cache.c +++ b/isam/_cache.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -46,11 +46,11 @@ int _nisam_read_cache(IO_CACHE *info, byte *buff, ulong pos, uint length, buff+=read_length; } if ((offset=pos - (ulong) info->pos_in_file) < - (ulong) (info->rc_end - info->rc_request_pos)) + (ulong) (info->read_end - info->request_pos)) { - in_buff_pos=info->rc_request_pos+(uint) offset; - in_buff_length= min(length,(uint) (info->rc_end-in_buff_pos)); - memcpy(buff,info->rc_request_pos+(uint) offset,(size_t) in_buff_length); + in_buff_pos=info->request_pos+(uint) offset; + in_buff_length= min(length,(uint) (info->read_end-in_buff_pos)); + memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length); if (!(length-=in_buff_length)) return 0; pos+=in_buff_length; @@ -61,14 +61,14 @@ int _nisam_read_cache(IO_CACHE *info, byte *buff, ulong pos, uint length, if (flag & READING_NEXT) { if (pos != ((info)->pos_in_file + - (uint) ((info)->rc_end - (info)->rc_request_pos))) + (uint) ((info)->read_end - (info)->request_pos))) { info->pos_in_file=pos; /* Force start here */ - info->rc_pos=info->rc_end=info->rc_request_pos; /* Everything used */ + info->read_pos=info->read_end=info->request_pos; /* Everything used */ info->seek_not_done=1; } else - info->rc_pos=info->rc_end; /* All block used */ + info->read_pos=info->read_end; /* All block used */ if (!(*info->read_function)(info,buff,length)) return 0; if (!(flag & READING_HEADER) || info->error == -1 || diff --git a/isam/_dbug.c b/isam/_dbug.c index 18e671793ed..0a52dbbc916 100644 --- a/isam/_dbug.c +++ b/isam/_dbug.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 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/_key.c b/isam/_key.c index 62f080af172..c0d667cb32d 100644 --- a/isam/_key.c +++ b/isam/_key.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/_locking.c b/isam/_locking.c index ca38c611812..be9741a4237 100644 --- a/isam/_locking.c +++ b/isam/_locking.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -306,8 +306,8 @@ int _nisam_writeinfo(register N_INFO *info, uint flags) MYF(MY_WME | MY_SEEK_NOT_DONE)) && !error) DBUG_RETURN(1); } - } #endif + } my_errno=olderror; } else if (flags) diff --git a/isam/_packrec.c b/isam/_packrec.c index 5c387f011ad..74a45852e63 100644 --- a/isam/_packrec.c +++ b/isam/_packrec.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -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/_page.c b/isam/_page.c index 6f6d632e85d..65733d66b77 100644 --- a/isam/_page.c +++ b/isam/_page.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/_search.c b/isam/_search.c index 93a08ea2b0d..57787d61818 100644 --- a/isam/_search.c +++ b/isam/_search.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/_statrec.c b/isam/_statrec.c index d93f4fe27f5..9dbc948440f 100644 --- a/isam/_statrec.c +++ b/isam/_statrec.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -187,7 +187,7 @@ int _nisam_read_rnd_static_record(N_INFO *info, byte *buf, (skipp_deleted_blocks || !filepos)) { cache_read=1; /* Read record using cache */ - cache_length=(uint) (info->rec_cache.rc_end - info->rec_cache.rc_pos); + cache_length=(uint) (info->rec_cache.read_end - info->rec_cache.read_pos); } else info->rec_cache.seek_not_done=1; /* Filepos is changed */ diff --git a/isam/changed.c b/isam/changed.c index 4f87a45aa2d..b8132538b86 100644 --- a/isam/changed.c +++ b/isam/changed.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/close.c b/isam/close.c index 6741e7b23f0..f1465990100 100644 --- a/isam/close.c +++ b/isam/close.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/create.c b/isam/create.c index fcf54ddc731..1fc2f3b97be 100644 --- a/isam/create.c +++ b/isam/create.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -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/delete.c b/isam/delete.c index e50ad72c767..5aa542561c1 100644 --- a/isam/delete.c +++ b/isam/delete.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -613,5 +613,3 @@ static uint remove_key(N_KEYDEF *keyinfo, uint nod_flag, (uint) (page_end-start-s_length)); DBUG_RETURN((uint) s_length); } /* remove_key */ - - diff --git a/isam/extra.c b/isam/extra.c index 1d333fa372f..570c396955f 100644 --- a/isam/extra.c +++ b/isam/extra.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -204,6 +204,7 @@ int nisam_extra(N_INFO *info, enum ha_extra_function function) info->s->changed=1; /* Update on close */ break; case HA_EXTRA_FORCE_REOPEN: + case HA_EXTRA_PREPARE_FOR_DELETE: pthread_mutex_lock(&THR_LOCK_isam); info->s->last_version= 0L; /* Impossible version */ #ifdef __WIN__ diff --git a/isam/info.c b/isam/info.c index 43c15af908d..a23494e4876 100644 --- a/isam/info.c +++ b/isam/info.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/isamchk.c b/isam/isamchk.c index 3aa1cf4e3c2..c09b1cd3324 100644 --- a/isam/isamchk.c +++ b/isam/isamchk.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -62,7 +62,7 @@ SET_STACK_SIZE(9000) /* Minimum stack size for program */ #define MIN_SORT_BUFFER (4096-MALLOC_OVERHEAD) #endif -#define NEAD_MEM ((uint) 10*4*(IO_SIZE+32)+32) /* Nead for recursion */ +#define NEED_MEM ((uint) 10*4*(IO_SIZE+32)+32) /* Nead for recursion */ #define MAXERR 20 #define BUFFERS_WHEN_SORTING 16 /* Alloc for sort-key-tree */ #define WRITE_COUNT MY_HOW_OFTEN_TO_WRITE @@ -512,7 +512,7 @@ static int nisamchk(my_string filename) if (!rep_quick) { if (testflag & T_EXTEND) - VOID(init_key_cache(use_buffers,(uint) NEAD_MEM)); + VOID(init_key_cache(use_buffers,(uint) NEED_MEM)); VOID(init_io_cache(&read_cache,datafile,(uint) read_buffer_length, READ_CACHE,share->pack.header_length,1, MYF(MY_WME))); @@ -1473,7 +1473,7 @@ my_string name; printf("Data records: %lu\n",(ulong) share->state.records); } - VOID(init_key_cache(use_buffers,NEAD_MEM)); + VOID(init_key_cache(use_buffers,NEED_MEM)); if (init_io_cache(&read_cache,info->dfile,(uint) read_buffer_length, READ_CACHE,share->pack.header_length,1,MYF(MY_WME))) goto err; @@ -1950,7 +1950,7 @@ int write_info; if (share->state.key_root[sort_key] == NI_POS_ERROR) DBUG_RETURN(0); /* Nothing to do */ - init_key_cache(use_buffers,NEAD_MEM); + init_key_cache(use_buffers,NEED_MEM); if (init_io_cache(&info->rec_cache,-1,(uint) write_buffer_length, WRITE_CACHE,share->pack.header_length,1, MYF(MY_WME | MY_WAIT_IF_FULL))) diff --git a/isam/isamdef.h b/isam/isamdef.h index da08b5f6a14..0884b18e997 100644 --- a/isam/isamdef.h +++ b/isam/isamdef.h @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/isamlog.c b/isam/isamlog.c index 5763b697d07..6d2bde42bf7 100644 --- a/isam/isamlog.c +++ b/isam/isamlog.c @@ -327,8 +327,8 @@ static int examine_log(my_string file_name, char **table_names) init_io_cache(&cache,file,0,READ_CACHE,start_offset,0,MYF(0)); bzero((gptr) com_count,sizeof(com_count)); - init_tree(&tree,0,sizeof(file_info),(qsort_cmp) file_info_compare,1, - (void(*)(void*)) file_info_free); + init_tree(&tree,0,0,sizeof(file_info),(qsort_cmp2) file_info_compare,1, + (tree_element_free) file_info_free, NULL); VOID(init_key_cache(KEY_CACHE_SIZE,(uint) (10*4*(IO_SIZE+MALLOC_OVERHEAD)))); files_open=0; access_time=0; @@ -400,11 +400,7 @@ static int examine_log(my_string file_name, char **table_names) } to=isam_file_name; if (filepath) - { - strmov(isam_file_name,filepath); - convert_dirname(isam_file_name); - to=strend(isam_file_name); - } + to=convert_dirname(isam_file_name, filepath, NullS); strmov(to,pos); fn_ext(isam_file_name)[0]=0; /* Remove extension */ } diff --git a/isam/log.c b/isam/log.c index a95b53b5110..78b56690401 100644 --- a/isam/log.c +++ b/isam/log.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/open.c b/isam/open.c index a3ede4512b9..48fab27cac1 100644 --- a/isam/open.c +++ b/isam/open.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/pack_isam.c b/isam/pack_isam.c index e7b5170d398..37aa33cdeee 100644 --- a/isam/pack_isam.c +++ b/isam/pack_isam.c @@ -685,9 +685,9 @@ 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,-1,(qsort_cmp) compare_tree,0,NULL); + init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree,0,NULL,NULL); if (records) count[i].tree_pos=count[i].tree_buff = my_malloc(count[i].field_length > 1 ? tree_buff_length : 2, @@ -789,7 +789,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] != ' ') @@ -808,7 +808,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] != ' ') @@ -828,7 +828,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)) @@ -909,7 +909,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; @@ -953,7 +953,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; } @@ -961,7 +961,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; } @@ -971,10 +971,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); @@ -1014,9 +1014,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; @@ -1671,7 +1671,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); @@ -1685,7 +1685,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) @@ -1708,7 +1708,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/panic.c b/isam/panic.c index 52a5d1eb3b6..e51e83671df 100644 --- a/isam/panic.c +++ b/isam/panic.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/range.c b/isam/range.c index 5594991cfc3..3b79b6d93a9 100644 --- a/isam/range.c +++ b/isam/range.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rfirst.c b/isam/rfirst.c index 82fd3994bdf..cc1cbee92bf 100644 --- a/isam/rfirst.c +++ b/isam/rfirst.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rkey.c b/isam/rkey.c index 8f1f2f11ab5..bbe4576418b 100644 --- a/isam/rkey.c +++ b/isam/rkey.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rlast.c b/isam/rlast.c index df2b1bc39af..a91f1f1011b 100644 --- a/isam/rlast.c +++ b/isam/rlast.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rnext.c b/isam/rnext.c index 451624bb42b..be26098c901 100644 --- a/isam/rnext.c +++ b/isam/rnext.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rprev.c b/isam/rprev.c index 50f22c838fd..0997a04fbbe 100644 --- a/isam/rprev.c +++ b/isam/rprev.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rrnd.c b/isam/rrnd.c index 7fd197a6d58..16b3ab1b859 100644 --- a/isam/rrnd.c +++ b/isam/rrnd.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rsame.c b/isam/rsame.c index fe617cf258c..9a2a03da054 100644 --- a/isam/rsame.c +++ b/isam/rsame.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/rsamepos.c b/isam/rsamepos.c index 500dfc60e38..c64ac492d1a 100644 --- a/isam/rsamepos.c +++ b/isam/rsamepos.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/sort.c b/isam/sort.c index 72c4c7564f8..d22b0e648a0 100644 --- a/isam/sort.c +++ b/isam/sort.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/static.c b/isam/static.c index 941c4defea2..9c68a0cfdba 100644 --- a/isam/static.c +++ b/isam/static.c @@ -1,21 +1,21 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* - Static variables for pisam library. All definied here for easy making of + Static variables for ISAM library. All definied here for easy making of a shared library */ diff --git a/isam/test1.c b/isam/test1.c index 33c61a53d4a..9ebc7af041d 100644 --- a/isam/test1.c +++ b/isam/test1.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -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..176346e74fa 100644 --- a/isam/test2.c +++ b/isam/test2.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -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/isam/test3.c b/isam/test3.c index 935c194106d..6c3390a2720 100644 --- a/isam/test3.c +++ b/isam/test3.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -172,7 +172,7 @@ void start_test(int id) } if (key_cacheing && rnd(2) == 0) init_key_cache(65536L,(uint) IO_SIZE*4*10); - printf("Process %d, pid: %d\n",id,getpid()); fflush(stdout); + printf("Process %d, pid: %d\n",id,(int) getpid()); fflush(stdout); for (error=i=0 ; i < tests && !error; i++) { @@ -356,7 +356,7 @@ int test_write(N_INFO *file,int id,int lock_type) nisam_extra(file,HA_EXTRA_WRITE_CACHE); } - sprintf(record.id,"%7d",getpid()); + sprintf(record.id,"%7d",(int) getpid()); strmov(record.text,"Testing..."); tries=(uint) rnd(100)+10; diff --git a/isam/update.c b/isam/update.c index 82dab4140e3..b3b676f967d 100644 --- a/isam/update.c +++ b/isam/update.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/isam/write.c b/isam/write.c index 49b0916afc4..f2c0d8dbc45 100644 --- a/isam/write.c +++ b/isam/write.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -262,7 +262,7 @@ int _nisam_insert(register N_INFO *info, register N_KEYDEF *keyinfo, /* This may happen if a key was deleted and the next key could be compressed better than before */ DBUG_DUMP("anc_buff",(byte*) anc_buff,a_length); - + bmove(key_pos,key_pos - (int) t_length,(uint)key_offset); } _nisam_store_key(keyinfo,key_pos,&s_temp); |