diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index 6e2dfc4fe1542175423ed5d2b7f5e2f36fd08570..3292ce65ff162e4f4453da1d5c625994e0206b55 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -999,7 +999,7 @@ static void compact_page(uchar *buff, uint block_size, uint rownr, EMPTY_SPACE is not updated */ -static void make_empty_page(byte *buff, uint block_size, uint page_type) +static void make_empty_page(uchar *buff, uint block_size, uint page_type) { bzero(buff, PAGE_HEADER_SIZE); @@ -1010,7 +1010,7 @@ static void make_empty_page(byte *buff, uint block_size, uint page_type) PAGE_OVERHEAD_SIZE */ bzero(buff+ PAGE_HEADER_SIZE, block_size - PAGE_HEADER_SIZE); - buff[PAGE_TYPE_OFFSET]= (byte) page_type; + buff[PAGE_TYPE_OFFSET]= (uchar) page_type; buff[DIR_COUNT_OFFSET]= 1; /* Store position to the first row */ int2store(buff + block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE, @@ -2509,12 +2509,12 @@ err: 1 Page is now empty */ -static int delete_dir_entry(byte *buff, uint block_size, uint record_number, +static int delete_dir_entry(uchar *buff, uint block_size, uint record_number, uint *empty_space_res) { uint number_of_records= (uint) ((uchar *) buff)[DIR_COUNT_OFFSET]; uint length, empty_space; - byte *dir; + uchar *dir; DBUG_ENTER("delete_dir_entry"); #ifdef SANITY_CHECKS @@ -2538,21 +2538,21 @@ static int delete_dir_entry(byte *buff, uint block_size, uint record_number, if (record_number == number_of_records - 1) { /* Delete this entry and all following empty directory entries */ - byte *end= buff + block_size - PAGE_SUFFIX_SIZE; + uchar *end= buff + block_size - PAGE_SUFFIX_SIZE; do { number_of_records--; dir+= DIR_ENTRY_SIZE; empty_space+= DIR_ENTRY_SIZE; } while (dir < end && dir[0] == 0 && dir[1] == 0); - buff[DIR_COUNT_OFFSET]= (byte) (uchar) number_of_records; + buff[DIR_COUNT_OFFSET]= (uchar) number_of_records; } empty_space+= length; if (number_of_records != 0) { /* Update directory */ int2store(buff + EMPTY_SPACE_OFFSET, empty_space); - buff[PAGE_TYPE_OFFSET]|= (byte) PAGE_CAN_BE_COMPACTED; + buff[PAGE_TYPE_OFFSET]|= (uchar) PAGE_CAN_BE_COMPACTED; *empty_space_res= empty_space; DBUG_RETURN(0); @@ -4111,8 +4111,8 @@ static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec, uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn, uint page_type, - const byte *header, - const byte *data, + const uchar *header, + const uchar *data, size_t data_length) { MARIA_SHARE *share= info->s; @@ -4120,7 +4120,7 @@ uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn, uint rownr, empty_space; uint block_size= share->block_size; uint rec_offset; - byte *buff= info->keyread_buff, *dir; + uchar *buff= info->keyread_buff, *dir; DBUG_ENTER("_ma_apply_redo_insert_row_head"); info->keyread_buff_used= 1; @@ -4201,14 +4201,14 @@ uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn, if ((uint) (dir - buff) < rec_offset + data_length) goto err; } - buff[DIR_COUNT_OFFSET]= (byte) (uchar) max_entry+1; + buff[DIR_COUNT_OFFSET]= (uchar) max_entry+1; int2store(dir, rec_offset); empty_space-= DIR_ENTRY_SIZE; } else { /* reuse old empty entry */ - byte *pos, *end, *end_data; + uchar *pos, *end, *end_data; DBUG_ASSERT(uint2korr(dir) == 0); if (uint2korr(dir)) goto err; /* Should have been empty */ @@ -4305,13 +4305,13 @@ err: uint _ma_apply_redo_purge_row_head_or_tail(MARIA_HA *info, LSN lsn, uint page_type, - const byte *header) + const uchar *header) { MARIA_SHARE *share= info->s; ulonglong page; uint record_number, empty_space; uint block_size= share->block_size; - byte *buff= info->keyread_buff; + uchar *buff= info->keyread_buff; DBUG_ENTER("_ma_apply_redo_purge_row_head_or_tail"); info->keyread_buff_used= 1; @@ -4324,7 +4324,7 @@ uint _ma_apply_redo_purge_row_head_or_tail(MARIA_HA *info, LSN lsn, buff, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, 0))) DBUG_RETURN(my_errno); - DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (byte) page_type); + DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (uchar) page_type); if (lsn_korr(buff) >= lsn) { diff --git a/storage/maria/ma_blockrec.h b/storage/maria/ma_blockrec.h index 1eeb3368972af06cd743952428e1cdd6dae88702..c11c341f782743420c43878f0adba23f8dc7def3 100644 --- a/storage/maria/ma_blockrec.h +++ b/storage/maria/ma_blockrec.h @@ -180,9 +180,9 @@ my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info, void _ma_bitmap_delete_all(MARIA_SHARE *share); uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn, uint page_type, - const byte *header, - const byte *data, + const uchar *header, + const uchar *data, size_t data_length); uint _ma_apply_redo_purge_row_head_or_tail(MARIA_HA *info, LSN lsn, uint page_type, - const byte *header); + const uchar *header); diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index e1fd9c0170abd57838ffee09d4d5e6c5ec74f944..4d23b66421df5716ad3141912f52d4d7098492f4 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -2060,7 +2060,7 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info, goto err; } - if (!(sort_param.record=(byte*) my_malloc((uint) share->base.pack_reclength, + if (!(sort_param.record=(uchar*) my_malloc((uint) share->base.pack_reclength, MYF(0))) || _ma_alloc_buffer(&sort_param.rec_buff, &sort_param.rec_buff_size, info->s->base.default_rec_buff_size)) @@ -5373,7 +5373,7 @@ static void copy_data_file_state(MARIA_STATE_INFO *to, static int _ma_safe_scan_block_record(MARIA_SORT_INFO *sort_info, - MARIA_HA *info, byte *record) + MARIA_HA *info, uchar *record) { uint record_pos= info->cur_row.nextpos; ulonglong page= sort_info->page; @@ -5385,7 +5385,7 @@ static int _ma_safe_scan_block_record(MARIA_SORT_INFO *sort_info, if (likely(record_pos < info->scan.number_of_rows)) { uint length, offset; - byte *data, *end_of_data; + uchar *data, *end_of_data; char llbuff[22]; while (!(offset= uint2korr(info->scan.dir))) diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index 95c8aacaf0967cf868772a00e15603d6532fe2b5..8e38e374a4d53b111884832ee859a37494283060 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -632,7 +632,7 @@ typedef struct st_loghandler_file_info my_bool translog_read_file_header(LOGHANDLER_FILE_INFO *desc) { - byte page_buff[TRANSLOG_PAGE_SIZE], *ptr; + uchar page_buff[TRANSLOG_PAGE_SIZE], *ptr; DBUG_ENTER("translog_read_file_header"); if (my_pread(log_descriptor.log_file_num[0], page_buff, diff --git a/storage/maria/ma_loghandler.h b/storage/maria/ma_loghandler.h index 088e0d8ab8b69b58c98e1f2e28866518c9142477..8382271a07a1591251061462b0ca598951ed7126 100644 --- a/storage/maria/ma_loghandler.h +++ b/storage/maria/ma_loghandler.h @@ -295,7 +295,7 @@ typedef my_bool(*inwrite_rec_hook) (enum translog_record_type type, typedef uint16(*read_rec_hook) (enum translog_record_type type, uint16 read_length, uchar *read_buff, - byte *decoded_buff); + uchar *decoded_buff); /* record classes */ diff --git a/storage/maria/maria_read_log.c b/storage/maria/maria_read_log.c index 2d664e086620207c47392c634701f4ad092f3d54..dd130f287f55c3ef48fbec40062fd669c9cb9974 100644 --- a/storage/maria/maria_read_log.c +++ b/storage/maria/maria_read_log.c @@ -284,11 +284,11 @@ end: static struct my_option my_long_options[] = { {"only-display", 'o', "display brief info about records's header", - (gptr*) &opt_only_display, (gptr*) &opt_only_display, 0, GET_BOOL, NO_ARG, + (uchar**) &opt_only_display, (uchar**) &opt_only_display, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"display-and-apply", 'a', "like --only-display but displays more info and modifies tables", - (gptr*) &opt_display_and_apply, (gptr*) &opt_display_and_apply, 0, + (uchar**) &opt_display_and_apply, (uchar**) &opt_display_and_apply, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #ifndef DBUG_OFF {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", @@ -641,7 +641,7 @@ prototype_exec_hook(REDO_INSERT_ROW_HEAD) ulonglong page; MARIA_HA *info; char llbuf[22]; - byte *buff= 0; + uchar *buff= 0; sid= fileid_korr(rec->header); page= page_korr(rec->header + FILEID_STORE_SIZE); @@ -678,7 +678,7 @@ prototype_exec_hook(REDO_INSERT_ROW_HEAD) differences. So we use the UNDO's LSN which is current_group_end_lsn. */ - if ((!(buff= (byte*) my_malloc(rec->record_length, MYF(MY_WME)))) || + if ((!(buff= (uchar*) my_malloc(rec->record_length, MYF(MY_WME)))) || (translog_read_record(rec->lsn, 0, rec->record_length, buff, NULL) != rec->record_length)) { @@ -707,7 +707,7 @@ prototype_exec_hook(REDO_INSERT_ROW_TAIL) ulonglong page; MARIA_HA *info; char llbuf[22]; - byte *buff= 0; + uchar *buff= 0; sid= fileid_korr(rec->header); page= page_korr(rec->header + FILEID_STORE_SIZE); @@ -744,7 +744,7 @@ prototype_exec_hook(REDO_INSERT_ROW_TAIL) differences. So we use the UNDO's LSN which is current_group_end_lsn. */ - if ((!(buff= (byte*) my_malloc(rec->record_length, MYF(MY_WME)))) || + if ((!(buff= (uchar*) my_malloc(rec->record_length, MYF(MY_WME)))) || (translog_read_record(rec->lsn, 0, rec->record_length, buff, NULL) != rec->record_length)) {