diff options
author | unknown <jani@hynda.mysql.fi> | 2007-11-08 13:23:08 +0200 |
---|---|---|
committer | unknown <jani@hynda.mysql.fi> | 2007-11-08 13:23:08 +0200 |
commit | 0eec2d63d5fbe531e48ac507b8889194a358bd33 (patch) | |
tree | f89923a1746fb2b7c68c99a57d7bc4f89de2d0ff /storage | |
parent | af48b26ed8b369e80968df581cf395c572d35be2 (diff) | |
parent | 21c1f460d71e392b905b17c86f8414a62ba284e0 (diff) | |
download | mariadb-git-0eec2d63d5fbe531e48ac507b8889194a358bd33.tar.gz |
Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysql_upgrade.c:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlimport.c:
Auto merged
client/mysqlshow.c:
Auto merged
client/mysqlslap.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
mysys/mf_keycache.c:
Auto merged
mysys/my_init.c:
Auto merged
mysys/safemalloc.c:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/unireg.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_write.c:
Auto merged
sql/sql_yacc.yy:
Merged with 5.1 main tree.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/ft_boolean_search.c | 8 | ||||
-rw-r--r-- | storage/myisam/ft_eval.c | 2 | ||||
-rw-r--r-- | storage/myisam/ft_nlq_search.c | 2 | ||||
-rw-r--r-- | storage/myisam/ft_parser.c | 2 | ||||
-rw-r--r-- | storage/myisam/ft_stopwords.c | 2 | ||||
-rw-r--r-- | storage/myisam/ft_test1.c | 4 | ||||
-rw-r--r-- | storage/myisam/ft_update.c | 4 | ||||
-rw-r--r-- | storage/myisam/ha_myisam.cc | 1 | ||||
-rw-r--r-- | storage/myisam/mi_check.c | 18 | ||||
-rw-r--r-- | storage/myisam/mi_checksum.c | 4 | ||||
-rw-r--r-- | storage/myisam/mi_create.c | 7 | ||||
-rw-r--r-- | storage/myisam/mi_dynrec.c | 8 | ||||
-rw-r--r-- | storage/myisam/mi_extra.c | 2 | ||||
-rw-r--r-- | storage/myisam/mi_open.c | 6 | ||||
-rw-r--r-- | storage/myisam/mi_packrec.c | 2 | ||||
-rw-r--r-- | storage/myisam/mi_range.c | 2 | ||||
-rw-r--r-- | storage/myisam/mi_test1.c | 4 | ||||
-rw-r--r-- | storage/myisam/mi_test2.c | 3 | ||||
-rw-r--r-- | storage/myisam/mi_unique.c | 2 | ||||
-rw-r--r-- | storage/myisam/mi_write.c | 2 | ||||
-rw-r--r-- | storage/myisam/myisamchk.c | 1 | ||||
-rw-r--r-- | storage/myisam/myisamdef.h | 7 | ||||
-rw-r--r-- | storage/myisam/myisampack.c | 6 | ||||
-rw-r--r-- | storage/myisam/sp_test.c | 2 | ||||
-rw-r--r-- | storage/myisammrg/ha_myisammrg.cc | 2 |
25 files changed, 53 insertions, 50 deletions
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c index 15f4e1e1d34..a9551a4b4ec 100644 --- a/storage/myisam/ft_boolean_search.c +++ b/storage/myisam/ft_boolean_search.c @@ -162,7 +162,7 @@ static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b) static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word DESC, ndepth DESC */ - int i= mi_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1, + int i= ha_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1, (uchar*) (*a)->word+1,(*a)->len-1,0,0); if (!i) i=CMP_NUM((*b)->ndepth,(*a)->ndepth); @@ -395,7 +395,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) if (!r && !ftbw->off) { - r= mi_compare_text(ftb->charset, + r= ha_compare_text(ftb->charset, info->lastkey+1, info->lastkey_length-extra-1, (uchar*) ftbw->word+1, @@ -868,7 +868,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param, for (a= 0, b= ftb->queue.elements, c= (a+b)/2; b-a>1; c= (a+b)/2) { ftbw= ftb->list[c]; - if (mi_compare_text(ftb->charset, (uchar*)word, len, + if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word+1, ftbw->len-1, (my_bool)(ftbw->flags&FTB_FLAG_TRUNC), 0) > 0) b= c; @@ -878,7 +878,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param, for (; c >= 0; c--) { ftbw= ftb->list[c]; - if (mi_compare_text(ftb->charset, (uchar*)word, len, + if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word + 1,ftbw->len - 1, (my_bool)(ftbw->flags & FTB_FLAG_TRUNC), 0)) break; diff --git a/storage/myisam/ft_eval.c b/storage/myisam/ft_eval.c index 7eb78861e5e..de01510fdd7 100644 --- a/storage/myisam/ft_eval.c +++ b/storage/myisam/ft_eval.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) 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; + recinfo[1].length= 4+portable_sizeof_char_ptr; /* Define a key over the first column */ keyinfo[0].seg=keyseg; diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c index 282fa6751d8..b3a2e47a382 100644 --- a/storage/myisam/ft_nlq_search.c +++ b/storage/myisam/ft_nlq_search.c @@ -103,7 +103,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio) { if (keylen && - mi_compare_text(aio->charset,info->lastkey+1, + ha_compare_text(aio->charset,info->lastkey+1, info->lastkey_length-extra-1, keybuff+1,keylen-1,0,0)) break; diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c index df2423aa50f..042a999fffa 100644 --- a/storage/myisam/ft_parser.c +++ b/storage/myisam/ft_parser.c @@ -31,7 +31,7 @@ typedef struct st_my_ft_parser_param static int FT_WORD_cmp(CHARSET_INFO* cs, FT_WORD *w1, FT_WORD *w2) { - return mi_compare_text(cs, (uchar*) w1->pos, w1->len, + return ha_compare_text(cs, (uchar*) w1->pos, w1->len, (uchar*) w2->pos, w2->len, 0, 0); } diff --git a/storage/myisam/ft_stopwords.c b/storage/myisam/ft_stopwords.c index 59866d9a351..9838b15af34 100644 --- a/storage/myisam/ft_stopwords.c +++ b/storage/myisam/ft_stopwords.c @@ -29,7 +29,7 @@ static TREE *stopwords3=NULL; static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)), FT_STOPWORD *w1, FT_STOPWORD *w2) { - return mi_compare_text(default_charset_info, + return ha_compare_text(default_charset_info, (uchar *)w1->pos,w1->len, (uchar *)w2->pos,w2->len,0,0); } diff --git a/storage/myisam/ft_test1.c b/storage/myisam/ft_test1.c index e49c47bb268..b37935a0d7a 100644 --- a/storage/myisam/ft_test1.c +++ b/storage/myisam/ft_test1.c @@ -75,12 +75,12 @@ static int run_test(const char *filename) /* First define 2 columns */ recinfo[0].type=extra_field; - recinfo[0].length= (extra_field == FIELD_BLOB ? 4 + mi_portable_sizeof_char_ptr : + recinfo[0].length= (extra_field == FIELD_BLOB ? 4 + portable_sizeof_char_ptr : extra_length); if (extra_field == FIELD_VARCHAR) recinfo[0].length+= HA_VARCHAR_PACKLENGTH(extra_length); recinfo[1].type=key_field; - recinfo[1].length= (key_field == FIELD_BLOB ? 4+mi_portable_sizeof_char_ptr : + recinfo[1].length= (key_field == FIELD_BLOB ? 4+portable_sizeof_char_ptr : key_length); if (key_field == FIELD_VARCHAR) recinfo[1].length+= HA_VARCHAR_PACKLENGTH(key_length); diff --git a/storage/myisam/ft_update.c b/storage/myisam/ft_update.c index e3e4c62158f..d1548e32870 100644 --- a/storage/myisam/ft_update.c +++ b/storage/myisam/ft_update.c @@ -180,7 +180,7 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const uchar *rec1, const uchar *rec2) { if ((ftsi1.pos != ftsi2.pos) && (!ftsi1.pos || !ftsi2.pos || - mi_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len, + ha_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len, (uchar*) ftsi2.pos,ftsi2.len,0,0))) DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT); } @@ -209,7 +209,7 @@ int _mi_ft_update(MI_INFO *info, uint keynr, uchar *keybuf, error=0; while(old_word->pos && new_word->pos) { - cmp= mi_compare_text(cs, (uchar*) old_word->pos,old_word->len, + cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len, (uchar*) new_word->pos,new_word->len,0,0); cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5); diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index ca4c40547ee..f3b18c0630c 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -22,6 +22,7 @@ #include "mysql_priv.h" #include <mysql/plugin.h> #include <m_ctype.h> +#include <my_bit.h> #include <myisampack.h> #include "ha_myisam.h" #include <stdarg.h> diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index fe6b716877c..7e9334d4cf6 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -737,7 +737,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, { int flag; uint used_length,comp_flag,nod_flag,key_length=0; - uchar key[MI_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos; + uchar key[HA_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos; my_off_t next_page,record; char llbuff[22]; uint diff_pos[2]; @@ -944,7 +944,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) uchar *record,*to; char llbuff[22],llbuff2[22],llbuff3[22]; ha_checksum intern_record_checksum; - ha_checksum key_checksum[MI_MAX_POSSIBLE_KEY]; + ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY]; my_bool static_row_size; MI_KEYDEF *keyinfo; MI_BLOCK_INFO block_info; @@ -1211,6 +1211,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) param->glob_crc+= mi_checksum(info,record); link_used+= (block_info.filepos - start_recpos); used+= (pos-start_recpos); + case BLOCK_RECORD: + assert(0); /* Impossible */ } /* switch */ if (! got_error) { @@ -1808,7 +1810,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name) reg2 uint key; reg1 MI_KEYDEF *keyinfo; File new_file; - my_off_t index_pos[MI_MAX_POSSIBLE_KEY]; + my_off_t index_pos[HA_MAX_POSSIBLE_KEY]; uint r_locks,w_locks; int old_lock; MYISAM_SHARE *share=info->s; @@ -1908,7 +1910,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, { uint length,nod_flag,used_length, key_length; uchar *buff,*keypos,*endpos; - uchar key[MI_MAX_POSSIBLE_KEY_BUFF]; + uchar key[HA_MAX_POSSIBLE_KEY_BUFF]; my_off_t new_page_pos,next_page; char llbuff[22]; DBUG_ENTER("sort_one_index"); @@ -3522,8 +3524,10 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param) mi_checksum(info, sort_param->record)); DBUG_RETURN(0); } + case BLOCK_RECORD: + assert(0); /* Impossible */ } - DBUG_RETURN(1); /* Impossible */ + DBUG_RETURN(1); /* Impossible */ } @@ -3633,6 +3637,8 @@ int sort_write_record(MI_SORT_PARAM *sort_param) sort_param->filepos+=reclength+length; info->s->state.split++; break; + case BLOCK_RECORD: + assert(0); /* Impossible */ } } if (sort_param->master) @@ -3804,7 +3810,7 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a) } get_key_full_length_rdonly(val_off, ft_buf->lastkey); - if (mi_compare_text(sort_param->seg->charset, + if (ha_compare_text(sort_param->seg->charset, ((uchar *)a)+1,a_len-1, ft_buf->lastkey+1,val_off-1, 0, 0)==0) { diff --git a/storage/myisam/mi_checksum.c b/storage/myisam/mi_checksum.c index 4e87de373bd..1aa56e571e3 100644 --- a/storage/myisam/mi_checksum.c +++ b/storage/myisam/mi_checksum.c @@ -31,9 +31,9 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf) case FIELD_BLOB: { length=_mi_calc_blob_length(rec->length- - mi_portable_sizeof_char_ptr, + portable_sizeof_char_ptr, buf); - memcpy((char*) &pos, buf+rec->length- mi_portable_sizeof_char_ptr, + memcpy((char*) &pos, buf+rec->length- portable_sizeof_char_ptr, sizeof(char*)); break; } diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c index 0cac5f08b3b..bc4dcf0bdbb 100644 --- a/storage/myisam/mi_create.c +++ b/storage/myisam/mi_create.c @@ -17,6 +17,7 @@ #include "ftdefs.h" #include "sp_defs.h" +#include <my_bit.h> #if defined(MSDOS) || defined(__WIN__) #ifdef __WIN__ @@ -56,7 +57,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, HA_KEYSEG *keyseg,tmp_keyseg; MI_COLUMNDEF *rec; ulong *rec_per_key_part; - my_off_t key_root[MI_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; + my_off_t key_root[HA_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; MI_CREATE_INFO tmp_create_info; DBUG_ENTER("mi_create"); DBUG_PRINT("enter", ("keys: %u columns: %u uniques: %u flags: %u", @@ -116,10 +117,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, share.base.blobs++; if (pack_reclength != INT_MAX32) { - if (rec->length == 4+mi_portable_sizeof_char_ptr) + if (rec->length == 4+portable_sizeof_char_ptr) pack_reclength= INT_MAX32; else - pack_reclength+=(1 << ((rec->length-mi_portable_sizeof_char_ptr)*8)); /* Max blob length */ + pack_reclength+=(1 << ((rec->length-portable_sizeof_char_ptr)*8)); /* Max blob length */ } } else if (type == FIELD_SKIP_PRESPACE || diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c index cdd70abe9ad..f67eba39ff7 100644 --- a/storage/myisam/mi_dynrec.c +++ b/storage/myisam/mi_dynrec.c @@ -901,7 +901,7 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to, else { char *temp_pos; - size_t tmp_length=length-mi_portable_sizeof_char_ptr; + size_t tmp_length=length-portable_sizeof_char_ptr; memcpy((uchar*) to,from,tmp_length); memcpy_fixed(&temp_pos,from+tmp_length,sizeof(char*)); memcpy(to+tmp_length,temp_pos,(size_t) blob->length); @@ -1022,11 +1022,11 @@ my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff, if (type == FIELD_BLOB) { uint blob_length= - _mi_calc_blob_length(length-mi_portable_sizeof_char_ptr,record); + _mi_calc_blob_length(length-portable_sizeof_char_ptr,record); if (!blob_length && !(flag & bit)) goto err; if (blob_length) - to+=length - mi_portable_sizeof_char_ptr+ blob_length; + to+=length - portable_sizeof_char_ptr+ blob_length; } else if (type == FIELD_SKIP_ZERO) { @@ -1209,7 +1209,7 @@ ulong _mi_rec_unpack(register MI_INFO *info, register uchar *to, uchar *from, } else if (type == FIELD_BLOB) { - uint size_length=rec_length- mi_portable_sizeof_char_ptr; + uint size_length=rec_length- portable_sizeof_char_ptr; ulong blob_length=_mi_calc_blob_length(size_length,from); ulong from_left= (ulong) (from_end - from); if (from_left < size_length || diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c index 1b4c79d13de..f0ddc15b325 100644 --- a/storage/myisam/mi_extra.c +++ b/storage/myisam/mi_extra.c @@ -256,7 +256,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) share->last_version= 0L; /* Impossible version */ pthread_mutex_unlock(&THR_LOCK_myisam); break; - case HA_EXTRA_PREPARE_FOR_DELETE: + case HA_EXTRA_PREPARE_FOR_DROP: pthread_mutex_lock(&THR_LOCK_myisam); share->last_version= 0L; /* Impossible version */ #ifdef __WIN__REMOVE_OBSOLETE_WORKAROUND diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index b848c822f75..40f55e78bca 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -82,8 +82,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) uchar *disk_cache, *disk_pos, *end_pos; MI_INFO info,*m_info,*old_info; MYISAM_SHARE share_buff,*share; - ulong rec_per_key_part[MI_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG]; - my_off_t key_root[MI_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; + ulong rec_per_key_part[HA_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG]; + my_off_t key_root[HA_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; ulonglong max_key_file_length, max_data_file_length; DBUG_ENTER("mi_open"); @@ -452,7 +452,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) if (share->rec[i].type == (int) FIELD_BLOB) { share->blobs[j].pack_length= - share->rec[i].length-mi_portable_sizeof_char_ptr;; + share->rec[i].length-portable_sizeof_char_ptr; share->blobs[j].offset=offset; j++; } diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c index 305b7e5532c..98c0dcb4dcc 100644 --- a/storage/myisam/mi_packrec.c +++ b/storage/myisam/mi_packrec.c @@ -1036,7 +1036,7 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, else { ulong length=get_bits(bit_buff,rec->space_length_bits); - uint pack_length=(uint) (end-to)-mi_portable_sizeof_char_ptr; + uint pack_length=(uint) (end-to)-portable_sizeof_char_ptr; if (bit_buff->blob_pos+length > bit_buff->blob_end) { bit_buff->error=1; diff --git a/storage/myisam/mi_range.c b/storage/myisam/mi_range.c index 932a4abd1b3..dc6dc9d62b7 100644 --- a/storage/myisam/mi_range.c +++ b/storage/myisam/mi_range.c @@ -139,7 +139,7 @@ static ha_rows _mi_record_pos(MI_INFO *info, const uchar *key, key_len=USE_WHOLE_KEY; /* - my_handler.c:mi_compare_text() has a flag 'skip_end_space'. + my_handler.c:ha_compare_text() has a flag 'skip_end_space'. This is set in my_handler.c:ha_key_cmp() in dependence on the compare flags 'nextflag' and the column type. diff --git a/storage/myisam/mi_test1.c b/storage/myisam/mi_test1.c index a68bcbed56c..f218bf4e77f 100644 --- a/storage/myisam/mi_test1.c +++ b/storage/myisam/mi_test1.c @@ -71,12 +71,12 @@ static int run_test(const char *filename) /* First define 2 columns */ recinfo[0].type=FIELD_NORMAL; recinfo[0].length=1; /* For NULL bits */ recinfo[1].type=key_field; - recinfo[1].length= (key_field == FIELD_BLOB ? 4+mi_portable_sizeof_char_ptr : + recinfo[1].length= (key_field == FIELD_BLOB ? 4+portable_sizeof_char_ptr : key_length); if (key_field == FIELD_VARCHAR) recinfo[1].length+= HA_VARCHAR_PACKLENGTH(key_length);; recinfo[2].type=extra_field; - recinfo[2].length= (extra_field == FIELD_BLOB ? 4 + mi_portable_sizeof_char_ptr : 24); + recinfo[2].length= (extra_field == FIELD_BLOB ? 4 + portable_sizeof_char_ptr : 24); if (extra_field == FIELD_VARCHAR) recinfo[2].length+= HA_VARCHAR_PACKLENGTH(recinfo[2].length); if (opt_unique) diff --git a/storage/myisam/mi_test2.c b/storage/myisam/mi_test2.c index 902801b5e6e..23c58638166 100644 --- a/storage/myisam/mi_test2.c +++ b/storage/myisam/mi_test2.c @@ -26,6 +26,7 @@ #endif #include "myisamdef.h" #include <m_ctype.h> +#include <my_bit.h> #define STANDARD_LENGTH 37 #define MYISAM_KEYS 6 @@ -187,7 +188,7 @@ int main(int argc, char *argv[]) if (use_blob) { recinfo[6].type=FIELD_BLOB; - recinfo[6].length=4+mi_portable_sizeof_char_ptr; + recinfo[6].length=4+portable_sizeof_char_ptr; recinfo[6].null_bit=0; recinfo[6].null_pos=0; } diff --git a/storage/myisam/mi_unique.c b/storage/myisam/mi_unique.c index e490fb683e4..02fcd9289dd 100644 --- a/storage/myisam/mi_unique.c +++ b/storage/myisam/mi_unique.c @@ -212,7 +212,7 @@ int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b, if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 || type == HA_KEYTYPE_VARTEXT2) { - if (mi_compare_text(keyseg->charset, (uchar *) pos_a, a_length, + if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length, (uchar *) pos_b, b_length, 0, 1)) return 1; } diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c index 70ba7a4588a..d34939fdf1b 100644 --- a/storage/myisam/mi_write.c +++ b/storage/myisam/mi_write.c @@ -545,7 +545,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo, get_key_length(alen,a); DBUG_ASSERT(info->ft1_to_ft2==0); if (alen == blen && - mi_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0, 0)==0) + ha_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0, 0)==0) { /* yup. converting */ info->ft1_to_ft2=(DYNAMIC_ARRAY *) diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 567e1057e5d..d335954fe08 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -20,6 +20,7 @@ #include <m_ctype.h> #include <stdarg.h> #include <my_getopt.h> +#include <my_bit.h> #ifdef HAVE_SYS_VADVICE_H #include <sys/vadvise.h> #endif diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h index 721d6b9f271..d8cb3b6519f 100644 --- a/storage/myisam/myisamdef.h +++ b/storage/myisam/myisamdef.h @@ -400,13 +400,6 @@ typedef struct st_mi_sort_param /* Functions to store length of space packed keys, VARCHAR or BLOB keys */ -#define store_key_length_inc(key,length) \ -{ if ((length) < 255) \ - { *(key)++=(length); } \ - else \ - { *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \ -} - #define store_key_length(key,length) \ { if ((length) < 255) \ { *(key)=(length); } \ diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c index 37428ddd279..cb00264e1db 100644 --- a/storage/myisam/myisampack.c +++ b/storage/myisam/myisampack.c @@ -1008,7 +1008,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts) /* Calculate pos, end_pos, and max_length for variable length fields. */ if (count->field_type == FIELD_BLOB) { - uint field_length=count->field_length -mi_portable_sizeof_char_ptr; + uint field_length=count->field_length -portable_sizeof_char_ptr; ulong blob_length= _mi_calc_blob_length(field_length, start_pos); memcpy_fixed((char*) &pos, start_pos+field_length,sizeof(char*)); end_pos=pos+blob_length; @@ -2650,7 +2650,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts) case FIELD_BLOB: { ulong blob_length=_mi_calc_blob_length(field_length- - mi_portable_sizeof_char_ptr, + portable_sizeof_char_ptr, start_pos); /* Empty blobs are encoded with a single 1 bit. */ if (!blob_length) @@ -2667,7 +2667,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts) DBUG_PRINT("fields", ("FIELD_BLOB %lu bytes, bits: %2u", blob_length, count->length_bits)); write_bits(blob_length,count->length_bits); - memcpy_fixed(&blob,end_pos-mi_portable_sizeof_char_ptr, + memcpy_fixed(&blob,end_pos-portable_sizeof_char_ptr, sizeof(char*)); blob_end=blob+blob_length; /* Encode the blob bytes. */ diff --git a/storage/myisam/sp_test.c b/storage/myisam/sp_test.c index dee32ba423e..f572c7ab19b 100644 --- a/storage/myisam/sp_test.c +++ b/storage/myisam/sp_test.c @@ -79,7 +79,7 @@ int run_test(const char *filename) /* Define spatial column */ recinfo[1].type=FIELD_BLOB; - recinfo[1].length=4 + mi_portable_sizeof_char_ptr; + recinfo[1].length=4 + portable_sizeof_char_ptr; diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index 8a914e8a2de..dade3d02e2a 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -390,7 +390,7 @@ int ha_myisammrg::extra(enum ha_extra_function operation) /* As this is just a mapping, we don't have to force the underlying tables to be closed */ if (operation == HA_EXTRA_FORCE_REOPEN || - operation == HA_EXTRA_PREPARE_FOR_DELETE) + operation == HA_EXTRA_PREPARE_FOR_DROP) return 0; return myrg_extra(file,operation,0); } |