summaryrefslogtreecommitdiff
path: root/storage/myisammrg
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisammrg')
-rw-r--r--storage/myisammrg/ha_myisammrg.cc38
-rw-r--r--storage/myisammrg/ha_myisammrg.h28
-rw-r--r--storage/myisammrg/myrg_close.c2
-rw-r--r--storage/myisammrg/myrg_def.h2
-rw-r--r--storage/myisammrg/myrg_delete.c2
-rw-r--r--storage/myisammrg/myrg_open.c13
-rw-r--r--storage/myisammrg/myrg_queue.c4
-rw-r--r--storage/myisammrg/myrg_rfirst.c4
-rw-r--r--storage/myisammrg/myrg_rkey.c10
-rw-r--r--storage/myisammrg/myrg_rlast.c4
-rw-r--r--storage/myisammrg/myrg_rnext.c4
-rw-r--r--storage/myisammrg/myrg_rnext_same.c4
-rw-r--r--storage/myisammrg/myrg_rprev.c4
-rw-r--r--storage/myisammrg/myrg_rrnd.c12
-rw-r--r--storage/myisammrg/myrg_rsame.c2
-rw-r--r--storage/myisammrg/myrg_update.c2
-rw-r--r--storage/myisammrg/myrg_write.c2
17 files changed, 69 insertions, 68 deletions
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index 96f7db6e633..3399694ecc3 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -120,12 +120,12 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked)
u_table->table->s->base.keys,
u_table->table->s->base.fields, false))
{
- my_free((gptr) recinfo, MYF(0));
+ my_free((uchar*) recinfo, MYF(0));
error= HA_ERR_WRONG_MRG_TABLE_DEF;
goto err;
}
}
- my_free((gptr) recinfo, MYF(0));
+ my_free((uchar*) recinfo, MYF(0));
#if !defined(BIG_TABLES) || SIZEOF_OFF_T == 4
/* Merge table has more than 2G rows */
if (table->s->crashed)
@@ -146,7 +146,7 @@ int ha_myisammrg::close(void)
return myrg_close(file);
}
-int ha_myisammrg::write_row(byte * buf)
+int ha_myisammrg::write_row(uchar * buf)
{
statistic_increment(table->in_use->status_var.ha_write_count,&LOCK_status);
@@ -164,7 +164,7 @@ int ha_myisammrg::write_row(byte * buf)
return myrg_write(file,buf);
}
-int ha_myisammrg::update_row(const byte * old_data, byte * new_data)
+int ha_myisammrg::update_row(const uchar * old_data, uchar * new_data)
{
statistic_increment(table->in_use->status_var.ha_update_count,&LOCK_status);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
@@ -172,13 +172,13 @@ int ha_myisammrg::update_row(const byte * old_data, byte * new_data)
return myrg_update(file,old_data,new_data);
}
-int ha_myisammrg::delete_row(const byte * buf)
+int ha_myisammrg::delete_row(const uchar * buf)
{
statistic_increment(table->in_use->status_var.ha_delete_count,&LOCK_status);
return myrg_delete(file,buf);
}
-int ha_myisammrg::index_read(byte * buf, const byte * key,
+int ha_myisammrg::index_read(uchar * buf, const uchar * key,
key_part_map keypart_map,
enum ha_rkey_function find_flag)
{
@@ -189,7 +189,7 @@ int ha_myisammrg::index_read(byte * buf, const byte * key,
return error;
}
-int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key,
+int ha_myisammrg::index_read_idx(uchar * buf, uint index, const uchar * key,
key_part_map keypart_map,
enum ha_rkey_function find_flag)
{
@@ -200,7 +200,7 @@ int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key,
return error;
}
-int ha_myisammrg::index_read_last(byte * buf, const byte * key,
+int ha_myisammrg::index_read_last(uchar * buf, const uchar * key,
key_part_map keypart_map)
{
statistic_increment(table->in_use->status_var.ha_read_key_count,
@@ -211,7 +211,7 @@ int ha_myisammrg::index_read_last(byte * buf, const byte * key,
return error;
}
-int ha_myisammrg::index_next(byte * buf)
+int ha_myisammrg::index_next(uchar * buf)
{
statistic_increment(table->in_use->status_var.ha_read_next_count,
&LOCK_status);
@@ -220,7 +220,7 @@ int ha_myisammrg::index_next(byte * buf)
return error;
}
-int ha_myisammrg::index_prev(byte * buf)
+int ha_myisammrg::index_prev(uchar * buf)
{
statistic_increment(table->in_use->status_var.ha_read_prev_count,
&LOCK_status);
@@ -229,7 +229,7 @@ int ha_myisammrg::index_prev(byte * buf)
return error;
}
-int ha_myisammrg::index_first(byte * buf)
+int ha_myisammrg::index_first(uchar * buf)
{
statistic_increment(table->in_use->status_var.ha_read_first_count,
&LOCK_status);
@@ -238,7 +238,7 @@ int ha_myisammrg::index_first(byte * buf)
return error;
}
-int ha_myisammrg::index_last(byte * buf)
+int ha_myisammrg::index_last(uchar * buf)
{
statistic_increment(table->in_use->status_var.ha_read_last_count,
&LOCK_status);
@@ -247,8 +247,8 @@ int ha_myisammrg::index_last(byte * buf)
return error;
}
-int ha_myisammrg::index_next_same(byte * buf,
- const byte *key __attribute__((unused)),
+int ha_myisammrg::index_next_same(uchar * buf,
+ const uchar *key __attribute__((unused)),
uint length __attribute__((unused)))
{
statistic_increment(table->in_use->status_var.ha_read_next_count,
@@ -265,7 +265,7 @@ int ha_myisammrg::rnd_init(bool scan)
}
-int ha_myisammrg::rnd_next(byte *buf)
+int ha_myisammrg::rnd_next(uchar *buf)
{
statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
&LOCK_status);
@@ -275,7 +275,7 @@ int ha_myisammrg::rnd_next(byte *buf)
}
-int ha_myisammrg::rnd_pos(byte * buf, byte *pos)
+int ha_myisammrg::rnd_pos(uchar * buf, uchar *pos)
{
statistic_increment(table->in_use->status_var.ha_read_rnd_count,
&LOCK_status);
@@ -284,7 +284,7 @@ int ha_myisammrg::rnd_pos(byte * buf, byte *pos)
return error;
}
-void ha_myisammrg::position(const byte *record)
+void ha_myisammrg::position(const uchar *record)
{
ulonglong row_position= myrg_position(file);
my_store_ptr(ref, ref_length, (my_off_t) row_position);
@@ -474,8 +474,8 @@ void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info)
goto err;
create_info->merge_list.elements++;
- (*create_info->merge_list.next) = (byte*) ptr;
- create_info->merge_list.next= (byte**) &ptr->next_local;
+ (*create_info->merge_list.next) = (uchar*) ptr;
+ create_info->merge_list.next= (uchar**) &ptr->next_local;
}
*create_info->merge_list.next=0;
}
diff --git a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h
index 7bbe659d4b7..88bb5dd2e21 100644
--- a/storage/myisammrg/ha_myisammrg.h
+++ b/storage/myisammrg/ha_myisammrg.h
@@ -53,23 +53,23 @@ class ha_myisammrg: public handler
int open(const char *name, int mode, uint test_if_locked);
int close(void);
- int write_row(byte * buf);
- int update_row(const byte * old_data, byte * new_data);
- int delete_row(const byte * buf);
- int index_read(byte * buf, const byte * key, key_part_map keypart_map,
+ int write_row(uchar * buf);
+ int update_row(const uchar * old_data, uchar * new_data);
+ int delete_row(const uchar * buf);
+ int index_read(uchar * buf, const uchar * key, key_part_map keypart_map,
enum ha_rkey_function find_flag);
- int index_read_idx(byte * buf, uint index, const byte * key,
+ int index_read_idx(uchar * buf, uint index, const uchar * key,
key_part_map keypart_map, enum ha_rkey_function find_flag);
- int index_read_last(byte * buf, const byte * key, key_part_map keypart_map);
- int index_next(byte * buf);
- int index_prev(byte * buf);
- int index_first(byte * buf);
- int index_last(byte * buf);
- int index_next_same(byte *buf, const byte *key, uint keylen);
+ int index_read_last(uchar * buf, const uchar * key, key_part_map keypart_map);
+ int index_next(uchar * buf);
+ int index_prev(uchar * buf);
+ int index_first(uchar * buf);
+ int index_last(uchar * buf);
+ int index_next_same(uchar *buf, const uchar *key, uint keylen);
int rnd_init(bool scan);
- int rnd_next(byte *buf);
- int rnd_pos(byte * buf, byte *pos);
- void position(const byte *record);
+ int rnd_next(uchar *buf);
+ int rnd_pos(uchar * buf, uchar *pos);
+ void position(const uchar *record);
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
int info(uint);
int reset(void);
diff --git a/storage/myisammrg/myrg_close.c b/storage/myisammrg/myrg_close.c
index 971a83928b1..baae24634b3 100644
--- a/storage/myisammrg/myrg_close.c
+++ b/storage/myisammrg/myrg_close.c
@@ -30,7 +30,7 @@ int myrg_close(MYRG_INFO *info)
pthread_mutex_lock(&THR_LOCK_open);
myrg_open_list=list_delete(myrg_open_list,&info->open_list);
pthread_mutex_unlock(&THR_LOCK_open);
- my_free((gptr) info,MYF(0));
+ my_free((uchar*) info,MYF(0));
if (error)
{
DBUG_RETURN(my_errno=error);
diff --git a/storage/myisammrg/myrg_def.h b/storage/myisammrg/myrg_def.h
index 344bd4edd3c..ec33d2c0bb4 100644
--- a/storage/myisammrg/myrg_def.h
+++ b/storage/myisammrg/myrg_def.h
@@ -28,5 +28,5 @@ extern pthread_mutex_t THR_LOCK_open;
#endif
int _myrg_init_queue(MYRG_INFO *info,int inx,enum ha_rkey_function search_flag);
-int _myrg_mi_read_record(MI_INFO *info, byte *buf);
+int _myrg_mi_read_record(MI_INFO *info, uchar *buf);
diff --git a/storage/myisammrg/myrg_delete.c b/storage/myisammrg/myrg_delete.c
index f9604f66885..93d45198b36 100644
--- a/storage/myisammrg/myrg_delete.c
+++ b/storage/myisammrg/myrg_delete.c
@@ -17,7 +17,7 @@
#include "myrg_def.h"
-int myrg_delete(MYRG_INFO *info, const byte *record)
+int myrg_delete(MYRG_INFO *info, const uchar *record)
{
if (!info->current_table)
return (my_errno= HA_ERR_NO_ACTIVE_RECORD);
diff --git a/storage/myisammrg/myrg_open.c b/storage/myisammrg/myrg_open.c
index 3dbb605463e..cca81f0f605 100644
--- a/storage/myisammrg/myrg_open.c
+++ b/storage/myisammrg/myrg_open.c
@@ -40,6 +40,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
IO_CACHE file;
MI_INFO *isam=0;
uint found_merge_insert_method= 0;
+ size_t name_buff_length;
DBUG_ENTER("myrg_open");
LINT_INIT(key_parts);
@@ -48,13 +49,13 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
if ((fd=my_open(fn_format(name_buff,name,"",MYRG_NAME_EXT,
MY_UNPACK_FILENAME|MY_APPEND_EXT),
O_RDONLY | O_SHARE,MYF(0))) < 0)
- goto err;
- errpos=1;
- if (init_io_cache(&file, fd, 4*IO_SIZE, READ_CACHE, 0, 0,
+ goto err;
+ errpos=1;
+ if (init_io_cache(&file, fd, 4*IO_SIZE, READ_CACHE, 0, 0,
MYF(MY_WME | MY_NABP)))
- goto err;
- errpos=2;
- dir_length=dirname_part(name_buff,name);
+ goto err;
+ errpos=2;
+ dir_length=dirname_part(name_buff, name, &name_buff_length);
while ((length=my_b_gets(&file,buff,FN_REFLEN-1)))
{
if ((end=buff+length)[-1] == '\n')
diff --git a/storage/myisammrg/myrg_queue.c b/storage/myisammrg/myrg_queue.c
index 1d252207db1..d2579053784 100644
--- a/storage/myisammrg/myrg_queue.c
+++ b/storage/myisammrg/myrg_queue.c
@@ -15,7 +15,7 @@
#include "myrg_def.h"
-static int queue_key_cmp(void *keyseg, byte *a, byte *b)
+static int queue_key_cmp(void *keyseg, uchar *a, uchar *b)
{
MYRG_TABLE *ma= (MYRG_TABLE *)a;
MYRG_TABLE *mb= (MYRG_TABLE *)b;
@@ -69,7 +69,7 @@ int _myrg_init_queue(MYRG_INFO *info,int inx,enum ha_rkey_function search_flag)
return error;
}
-int _myrg_mi_read_record(MI_INFO *info, byte *buf)
+int _myrg_mi_read_record(MI_INFO *info, uchar *buf)
{
if (!(*info->read_record)(info,info->lastpos,buf))
{
diff --git a/storage/myisammrg/myrg_rfirst.c b/storage/myisammrg/myrg_rfirst.c
index 80736537d02..9d7b0f9e83f 100644
--- a/storage/myisammrg/myrg_rfirst.c
+++ b/storage/myisammrg/myrg_rfirst.c
@@ -17,7 +17,7 @@
/* Read first row according to specific key */
-int myrg_rfirst(MYRG_INFO *info, byte *buf, int inx)
+int myrg_rfirst(MYRG_INFO *info, uchar *buf, int inx)
{
MYRG_TABLE *table;
MI_INFO *mi;
@@ -35,7 +35,7 @@ int myrg_rfirst(MYRG_INFO *info, byte *buf, int inx)
return err;
}
/* adding to queue */
- queue_insert(&(info->by_key),(byte *)table);
+ queue_insert(&(info->by_key),(uchar *)table);
}
/* We have done a read in all tables */
info->last_used_table=table;
diff --git a/storage/myisammrg/myrg_rkey.c b/storage/myisammrg/myrg_rkey.c
index 2d744ae31ec..8e7886f5a43 100644
--- a/storage/myisammrg/myrg_rkey.c
+++ b/storage/myisammrg/myrg_rkey.c
@@ -35,10 +35,10 @@
SerG
*/
-int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
+int myrg_rkey(MYRG_INFO *info,uchar *buf,int inx, const uchar *key,
key_part_map keypart_map, enum ha_rkey_function search_flag)
{
- byte *key_buff;
+ uchar *key_buff;
uint pack_key_length;
uint16 last_used_keyseg;
MYRG_TABLE *table;
@@ -60,7 +60,7 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
{
err=mi_rkey(mi, 0, inx, key, keypart_map, search_flag);
/* Get the saved packed key and packed key length. */
- key_buff=(byte*) mi->lastkey+mi->s->base.max_key_length;
+ key_buff=(uchar*) mi->lastkey+mi->s->base.max_key_length;
pack_key_length=mi->pack_key_length;
last_used_keyseg= mi->last_used_keyseg;
}
@@ -80,7 +80,7 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
DBUG_RETURN(err);
}
/* adding to queue */
- queue_insert(&(info->by_key),(byte *)table);
+ queue_insert(&(info->by_key),(uchar *)table);
}
@@ -92,6 +92,6 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
mi->once_flags|= RRND_PRESERVE_LASTINX;
DBUG_PRINT("info", ("using table no: %d",
(int) (info->current_table - info->open_tables + 1)));
- DBUG_DUMP("result key", (byte*) mi->lastkey, mi->lastkey_length);
+ DBUG_DUMP("result key", (uchar*) mi->lastkey, mi->lastkey_length);
DBUG_RETURN(_myrg_mi_read_record(mi,buf));
}
diff --git a/storage/myisammrg/myrg_rlast.c b/storage/myisammrg/myrg_rlast.c
index f364bf9b32f..8086a2f8104 100644
--- a/storage/myisammrg/myrg_rlast.c
+++ b/storage/myisammrg/myrg_rlast.c
@@ -17,7 +17,7 @@
/* Read last row with the same key as the previous read. */
-int myrg_rlast(MYRG_INFO *info, byte *buf, int inx)
+int myrg_rlast(MYRG_INFO *info, uchar *buf, int inx)
{
MYRG_TABLE *table;
MI_INFO *mi;
@@ -35,7 +35,7 @@ int myrg_rlast(MYRG_INFO *info, byte *buf, int inx)
return err;
}
/* adding to queue */
- queue_insert(&(info->by_key),(byte *)table);
+ queue_insert(&(info->by_key),(uchar *)table);
}
/* We have done a read in all tables */
info->last_used_table=table;
diff --git a/storage/myisammrg/myrg_rnext.c b/storage/myisammrg/myrg_rnext.c
index de1aa4df4b6..82d5cbf38b1 100644
--- a/storage/myisammrg/myrg_rnext.c
+++ b/storage/myisammrg/myrg_rnext.c
@@ -19,7 +19,7 @@
Read next row with the same key as previous read
*/
-int myrg_rnext(MYRG_INFO *info, byte *buf, int inx)
+int myrg_rnext(MYRG_INFO *info, uchar *buf, int inx)
{
int err;
MI_INFO *mi;
@@ -42,7 +42,7 @@ int myrg_rnext(MYRG_INFO *info, byte *buf, int inx)
else
{
/* Found here, adding to queue */
- queue_top(&(info->by_key))=(byte *)(info->current_table);
+ queue_top(&(info->by_key))=(uchar *)(info->current_table);
queue_replaced(&(info->by_key));
}
diff --git a/storage/myisammrg/myrg_rnext_same.c b/storage/myisammrg/myrg_rnext_same.c
index 9c6b522ee8a..ad7bbfb0f6e 100644
--- a/storage/myisammrg/myrg_rnext_same.c
+++ b/storage/myisammrg/myrg_rnext_same.c
@@ -16,7 +16,7 @@
#include "myrg_def.h"
-int myrg_rnext_same(MYRG_INFO *info, byte *buf)
+int myrg_rnext_same(MYRG_INFO *info, uchar *buf)
{
int err;
MI_INFO *mi;
@@ -39,7 +39,7 @@ int myrg_rnext_same(MYRG_INFO *info, byte *buf)
else
{
/* Found here, adding to queue */
- queue_top(&(info->by_key))=(byte *)(info->current_table);
+ queue_top(&(info->by_key))=(uchar *)(info->current_table);
queue_replaced(&(info->by_key));
}
diff --git a/storage/myisammrg/myrg_rprev.c b/storage/myisammrg/myrg_rprev.c
index b1b86a93fad..66c94974940 100644
--- a/storage/myisammrg/myrg_rprev.c
+++ b/storage/myisammrg/myrg_rprev.c
@@ -19,7 +19,7 @@
Read previous row with the same key as previous read
*/
-int myrg_rprev(MYRG_INFO *info, byte *buf, int inx)
+int myrg_rprev(MYRG_INFO *info, uchar *buf, int inx)
{
int err;
MI_INFO *mi;
@@ -42,7 +42,7 @@ int myrg_rprev(MYRG_INFO *info, byte *buf, int inx)
else
{
/* Found here, adding to queue */
- queue_top(&(info->by_key))=(byte *)(info->current_table);
+ queue_top(&(info->by_key))=(uchar *)(info->current_table);
queue_replaced(&(info->by_key));
}
diff --git a/storage/myisammrg/myrg_rrnd.c b/storage/myisammrg/myrg_rrnd.c
index 55e72b2170d..b598563680c 100644
--- a/storage/myisammrg/myrg_rrnd.c
+++ b/storage/myisammrg/myrg_rrnd.c
@@ -30,7 +30,7 @@ static MYRG_TABLE *find_table(MYRG_TABLE *start,MYRG_TABLE *end,ulonglong pos);
HA_ERR_END_OF_FILE = EOF.
*/
-int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
+int myrg_rrnd(MYRG_INFO *info,uchar *buf,ulonglong filepos)
{
int error;
MI_INFO *isam_info;
@@ -47,7 +47,7 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
}
isam_info=(info->current_table=info->open_tables)->table;
if (info->cache_in_use)
- mi_extra(isam_info,HA_EXTRA_CACHE,(byte*) &info->cache_size);
+ mi_extra(isam_info,HA_EXTRA_CACHE,(uchar*) &info->cache_size);
filepos=isam_info->s->pack.header_length;
isam_info->lastinx= (uint) -1; /* Can't forward or backward */
}
@@ -60,20 +60,20 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
for (;;)
{
isam_info->update&= HA_STATE_CHANGED;
- if ((error=(*isam_info->s->read_rnd)(isam_info,(byte*) buf,
+ if ((error=(*isam_info->s->read_rnd)(isam_info,(uchar*) buf,
(my_off_t) filepos,1)) !=
HA_ERR_END_OF_FILE)
DBUG_RETURN(error);
if (info->cache_in_use)
mi_extra(info->current_table->table, HA_EXTRA_NO_CACHE,
- (byte*) &info->cache_size);
+ (uchar*) &info->cache_size);
if (info->current_table+1 == info->end_table)
DBUG_RETURN(HA_ERR_END_OF_FILE);
info->current_table++;
info->last_used_table=info->current_table;
if (info->cache_in_use)
mi_extra(info->current_table->table, HA_EXTRA_CACHE,
- (byte*) &info->cache_size);
+ (uchar*) &info->cache_size);
info->current_table->file_offset=
info->current_table[-1].file_offset+
info->current_table[-1].table->state->data_file_length;
@@ -88,7 +88,7 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
isam_info=info->current_table->table;
isam_info->update&= HA_STATE_CHANGED;
DBUG_RETURN((*isam_info->s->read_rnd)
- (isam_info, (byte*) buf,
+ (isam_info, (uchar*) buf,
(my_off_t) (filepos - info->current_table->file_offset),
0));
}
diff --git a/storage/myisammrg/myrg_rsame.c b/storage/myisammrg/myrg_rsame.c
index 56b16c0aa3c..2f7523759dc 100644
--- a/storage/myisammrg/myrg_rsame.c
+++ b/storage/myisammrg/myrg_rsame.c
@@ -15,7 +15,7 @@
#include "myrg_def.h"
-int myrg_rsame(MYRG_INFO *info,byte *record,int inx)
+int myrg_rsame(MYRG_INFO *info,uchar *record,int inx)
{
if (inx) /* not yet used, should be 0 */
return (my_errno=HA_ERR_WRONG_INDEX);
diff --git a/storage/myisammrg/myrg_update.c b/storage/myisammrg/myrg_update.c
index ba667d69f12..5d883be8484 100644
--- a/storage/myisammrg/myrg_update.c
+++ b/storage/myisammrg/myrg_update.c
@@ -17,7 +17,7 @@
#include "myrg_def.h"
-int myrg_update(register MYRG_INFO *info,const byte *oldrec, byte *newrec)
+int myrg_update(register MYRG_INFO *info,const uchar *oldrec, uchar *newrec)
{
if (!info->current_table)
return (my_errno=HA_ERR_NO_ACTIVE_RECORD);
diff --git a/storage/myisammrg/myrg_write.c b/storage/myisammrg/myrg_write.c
index ed0a4a7996a..27534df2821 100644
--- a/storage/myisammrg/myrg_write.c
+++ b/storage/myisammrg/myrg_write.c
@@ -17,7 +17,7 @@
#include "myrg_def.h"
-int myrg_write(register MYRG_INFO *info, byte *rec)
+int myrg_write(register MYRG_INFO *info, uchar *rec)
{
/* [phi] MERGE_WRITE_DISABLED is handled by the else case */
if (info->merge_insert_method == MERGE_INSERT_TO_FIRST)