diff options
author | unknown <monty@mysql.com> | 2003-11-28 13:31:38 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2003-11-28 13:31:38 +0200 |
commit | ef43220170521a90454c05380cc01d562fc98c2f (patch) | |
tree | 995a8061976a12fd5dfb02679e683b86c743879c /myisam | |
parent | 03092d0c24067bf97359436e49e6cce7ca0e2803 (diff) | |
parent | 183b02a8ac6074775bd8c33f036eed3cf6597bbe (diff) | |
download | mariadb-git-ef43220170521a90454c05380cc01d562fc98c2f.tar.gz |
Merge
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_derived.cc:
keep local copy
sql/sql_union.cc:
keep local copy
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 38 | ||||
-rw-r--r-- | myisam/mi_delete.c | 2 | ||||
-rw-r--r-- | myisam/mi_extra.c | 10 | ||||
-rw-r--r-- | myisam/mi_page.c | 2 | ||||
-rw-r--r-- | myisam/mi_preload.c | 4 | ||||
-rw-r--r-- | myisam/mi_write.c | 2 | ||||
-rw-r--r-- | myisam/myisampack.c | 14 |
7 files changed, 33 insertions, 39 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index bd8c8c60e33..6f794ad2ea8 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -3301,30 +3301,28 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a) ft_buf->buf=0; return error; } - else - { - /* flushing buffer */ - if ((error=sort_ft_buf_flush(sort_param))) - return error; -word_init_ft_buf: - a_len+=val_len; - memcpy(ft_buf->lastkey, a, a_len); - ft_buf->buf=ft_buf->lastkey+a_len; - ft_buf->end=ft_buf->lastkey+ (sort_param->keyinfo->block_length-32); - /* 32 is just a safety margin here - (at least max(val_len, sizeof(nod_flag)) should be there). - May be better performance could be achieved if we'd put - (sort_info->keyinfo->block_length-32)/XXX - instead. - TODO: benchmark the best value for XXX. - */ + /* flushing buffer */ + if ((error=sort_ft_buf_flush(sort_param))) + return error; - return 0; - } - return -1; /* impossible */ +word_init_ft_buf: + a_len+=val_len; + memcpy(ft_buf->lastkey, a, a_len); + ft_buf->buf=ft_buf->lastkey+a_len; + /* + 32 is just a safety margin here + (at least max(val_len, sizeof(nod_flag)) should be there). + May be better performance could be achieved if we'd put + (sort_info->keyinfo->block_length-32)/XXX + instead. + TODO: benchmark the best value for XXX. + */ + ft_buf->end=ft_buf->lastkey+ (sort_param->keyinfo->block_length-32); + return 0; } /* sort_ft_key_write */ + /* get pointer to record from a key */ static my_off_t get_record_for_key(MI_INFO *info, MI_KEYDEF *keyinfo, diff --git a/myisam/mi_delete.c b/myisam/mi_delete.c index f21b0e928b6..a55d5b2a5ca 100644 --- a/myisam/mi_delete.c +++ b/myisam/mi_delete.c @@ -241,7 +241,7 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (info->ft1_to_ft2) { /* we're in ft1->ft2 conversion mode. Saving key data */ - insert_dynamic(info->ft1_to_ft2, lastkey+off); + insert_dynamic(info->ft1_to_ft2, (char*) (lastkey+off)); } else { diff --git a/myisam/mi_extra.c b/myisam/mi_extra.c index fcc753b62e5..10f52f1e39a 100644 --- a/myisam/mi_extra.c +++ b/myisam/mi_extra.c @@ -33,15 +33,11 @@ Used when function is one of: HA_EXTRA_WRITE_CACHE HA_EXTRA_CACHE - HA_EXTRA_BULK_INSERT_BEGIN - If extra_arg is 0, then the default cache size is used. - HA_EXTRA_BULK_INSERT_FLUSH - extra_arg is a a pointer to which index to flush (uint*) - RETURN VALUES - 0 ok + RETURN VALUES + 0 ok + # error */ - int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) { int error=0; diff --git a/myisam/mi_page.c b/myisam/mi_page.c index 8c6981afa00..c70209c2da6 100644 --- a/myisam/mi_page.c +++ b/myisam/mi_page.c @@ -52,7 +52,7 @@ uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo, { DBUG_PRINT("error",("page %lu had wrong page length: %u", (ulong) page, page_size)); - DBUG_DUMP("page", tmp, keyinfo->block_length); + DBUG_DUMP("page", (char*) tmp, keyinfo->block_length); info->last_keypage = HA_OFFSET_ERROR; my_errno = HA_ERR_CRASHED; tmp = 0; diff --git a/myisam/mi_preload.c b/myisam/mi_preload.c index 80489cbcd13..5e03d489efe 100644 --- a/myisam/mi_preload.c +++ b/myisam/mi_preload.c @@ -108,11 +108,11 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves) } while (pos != key_file_length); - my_free(buff, MYF(0)); + my_free((char*) buff, MYF(0)); DBUG_RETURN(0); err: - my_free(buff, MYF(MY_ALLOW_ZERO_PTR)); + my_free((char*) buff, MYF(MY_ALLOW_ZERO_PTR)); DBUG_RETURN(my_errno= errno); } diff --git a/myisam/mi_write.c b/myisam/mi_write.c index 86c45e0692f..d13ba6c2c4e 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -521,7 +521,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo, we cannot easily dispatch an empty page here */ b+=blen+ft2len+2; for (a=anc_buff+a_length ; b < a ; b+=ft2len+2) - insert_dynamic(info->ft1_to_ft2, b); + insert_dynamic(info->ft1_to_ft2, (char*) b); /* fixing the page's length - it contains only one key now */ mi_putint(anc_buff,2+blen+ft2len+2,0); diff --git a/myisam/myisampack.c b/myisam/myisampack.c index 5ca57248204..93edde33bdb 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -51,7 +51,7 @@ struct st_file_buffer { char *buffer,*pos,*end; my_off_t pos_in_file; int bits; - uint byte; + uint current_byte; }; struct st_huff_tree; @@ -1912,7 +1912,7 @@ static void init_file_buffer(File file, pbool read_buffer) file_buffer.pos=file_buffer.buffer; file_buffer.bits=BITS_SAVED; } - file_buffer.byte=0; + file_buffer.current_byte=0; } @@ -1961,13 +1961,13 @@ static void write_bits (register ulong value, register uint bits) { if ((file_buffer.bits-=(int) bits) >= 0) { - file_buffer.byte|=value << file_buffer.bits; + file_buffer.current_byte|=value << file_buffer.bits; } else { reg3 uint byte_buff; bits= (uint) -file_buffer.bits; - byte_buff=file_buffer.byte | (uint) (value >> bits); + byte_buff=file_buffer.current_byte | (uint) (value >> bits); #if BITS_SAVED == 32 *file_buffer.pos++= (byte) (byte_buff >> 24) ; *file_buffer.pos++= (byte) (byte_buff >> 16) ; @@ -1993,7 +1993,7 @@ static void write_bits (register ulong value, register uint bits) if (file_buffer.pos >= file_buffer.end) VOID(flush_buffer((uint) ~0)); file_buffer.bits=(int) (BITS_SAVED - bits); - file_buffer.byte=(uint) (value << (BITS_SAVED - bits)); + file_buffer.current_byte=(uint) (value << (BITS_SAVED - bits)); } return; } @@ -2005,7 +2005,7 @@ static void flush_bits (void) uint bits,byte_buff; bits=(file_buffer.bits) & ~7; - byte_buff = file_buffer.byte >> bits; + byte_buff = file_buffer.current_byte >> bits; bits=BITS_SAVED - bits; while (bits > 0) { @@ -2013,7 +2013,7 @@ static void flush_bits (void) *file_buffer.pos++= (byte) (uchar) (byte_buff >> bits) ; } file_buffer.bits=BITS_SAVED; - file_buffer.byte=0; + file_buffer.current_byte=0; return; } |