diff options
Diffstat (limited to 'storage/myisam/ha_myisam.cc')
-rw-r--r-- | storage/myisam/ha_myisam.cc | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index d31f5b7e792..d2a45d41566 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -121,7 +121,7 @@ int table2myisam(TABLE *table_arg, MI_KEYDEF **keydef_out, { uint i, j, recpos, minpos, fieldpos, temp_length, length; enum ha_base_keytype type= HA_KEYTYPE_BINARY; - byte *record; + uchar *record; KEY *pos; MI_KEYDEF *keydef; MI_COLUMNDEF *recinfo, *recinfo_pos; @@ -531,7 +531,7 @@ int ha_myisam::net_read_dump(NET* net) error= -1; goto err; } - if (my_write(data_fd, (byte*)net->read_pos, (uint) packet_len, + if (my_write(data_fd, (uchar*)net->read_pos, (uint) packet_len, MYF(MY_WME|MY_FNABP))) { error = errno; @@ -550,7 +550,7 @@ int ha_myisam::dump(THD* thd, int fd) uint blocksize = share->blocksize; my_off_t bytes_to_read = share->state.state.data_file_length; int data_fd = file->dfile; - byte * buf = (byte*) my_malloc(blocksize, MYF(MY_WME)); + uchar *buf = (uchar*) my_malloc(blocksize, MYF(MY_WME)); if (!buf) return ENOMEM; @@ -558,7 +558,7 @@ int ha_myisam::dump(THD* thd, int fd) my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)); for (; bytes_to_read > 0;) { - uint bytes = my_read(data_fd, buf, blocksize, MYF(MY_WME)); + size_t bytes = my_read(data_fd, buf, blocksize, MYF(MY_WME)); if (bytes == MY_FILE_ERROR) { error = errno; @@ -575,7 +575,7 @@ int ha_myisam::dump(THD* thd, int fd) } else { - if (my_net_write(net, (char*) buf, bytes)) + if (my_net_write(net, buf, bytes)) { error = errno ? errno : EPIPE; goto err; @@ -586,13 +586,13 @@ int ha_myisam::dump(THD* thd, int fd) if (fd < 0) { - if (my_net_write(net, "", 0)) + if (my_net_write(net, (uchar*) "", 0)) error = errno ? errno : EPIPE; net_flush(net); } err: - my_free((gptr) buf, MYF(0)); + my_free((uchar*) buf, MYF(0)); return error; } #endif /* HAVE_REPLICATION */ @@ -710,7 +710,7 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked) recinfo must be freed. */ if (recinfo) - my_free((gptr) recinfo, MYF(0)); + my_free((uchar*) recinfo, MYF(0)); return my_errno; } @@ -721,7 +721,7 @@ int ha_myisam::close(void) return mi_close(tmp); } -int ha_myisam::write_row(byte * buf) +int ha_myisam::write_row(uchar *buf) { statistic_increment(table->in_use->status_var.ha_write_count,&LOCK_status); @@ -1594,7 +1594,7 @@ bool ha_myisam::is_crashed() const (my_disable_locking && file->s->state.open_count)); } -int ha_myisam::update_row(const byte * old_data, byte * new_data) +int ha_myisam::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) @@ -1602,13 +1602,13 @@ int ha_myisam::update_row(const byte * old_data, byte * new_data) return mi_update(file,old_data,new_data); } -int ha_myisam::delete_row(const byte * buf) +int ha_myisam::delete_row(const uchar *buf) { statistic_increment(table->in_use->status_var.ha_delete_count,&LOCK_status); return mi_delete(file,buf); } -int ha_myisam::index_read(byte *buf, const byte *key, key_part_map keypart_map, +int ha_myisam::index_read(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) { DBUG_ASSERT(inited==INDEX); @@ -1619,7 +1619,7 @@ int ha_myisam::index_read(byte *buf, const byte *key, key_part_map keypart_map, return error; } -int ha_myisam::index_read_idx(byte *buf, uint index, const byte *key, +int ha_myisam::index_read_idx(uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) { @@ -1630,7 +1630,7 @@ int ha_myisam::index_read_idx(byte *buf, uint index, const byte *key, return error; } -int ha_myisam::index_read_last(byte *buf, const byte *key, +int ha_myisam::index_read_last(uchar *buf, const uchar *key, key_part_map keypart_map) { DBUG_ENTER("ha_myisam::index_read_last"); @@ -1643,7 +1643,7 @@ int ha_myisam::index_read_last(byte *buf, const byte *key, DBUG_RETURN(error); } -int ha_myisam::index_next(byte * buf) +int ha_myisam::index_next(uchar *buf) { DBUG_ASSERT(inited==INDEX); statistic_increment(table->in_use->status_var.ha_read_next_count, @@ -1653,7 +1653,7 @@ int ha_myisam::index_next(byte * buf) return error; } -int ha_myisam::index_prev(byte * buf) +int ha_myisam::index_prev(uchar *buf) { DBUG_ASSERT(inited==INDEX); statistic_increment(table->in_use->status_var.ha_read_prev_count, @@ -1663,7 +1663,7 @@ int ha_myisam::index_prev(byte * buf) return error; } -int ha_myisam::index_first(byte * buf) +int ha_myisam::index_first(uchar *buf) { DBUG_ASSERT(inited==INDEX); statistic_increment(table->in_use->status_var.ha_read_first_count, @@ -1673,7 +1673,7 @@ int ha_myisam::index_first(byte * buf) return error; } -int ha_myisam::index_last(byte * buf) +int ha_myisam::index_last(uchar *buf) { DBUG_ASSERT(inited==INDEX); statistic_increment(table->in_use->status_var.ha_read_last_count, @@ -1683,8 +1683,8 @@ int ha_myisam::index_last(byte * buf) return error; } -int ha_myisam::index_next_same(byte * buf, - const byte *key __attribute__((unused)), +int ha_myisam::index_next_same(uchar *buf, + const uchar *key __attribute__((unused)), uint length __attribute__((unused))) { DBUG_ASSERT(inited==INDEX); @@ -1703,7 +1703,7 @@ int ha_myisam::rnd_init(bool scan) return mi_reset(file); // Free buffers } -int ha_myisam::rnd_next(byte *buf) +int ha_myisam::rnd_next(uchar *buf) { statistic_increment(table->in_use->status_var.ha_read_rnd_next_count, &LOCK_status); @@ -1712,12 +1712,12 @@ int ha_myisam::rnd_next(byte *buf) return error; } -int ha_myisam::restart_rnd_next(byte *buf, byte *pos) +int ha_myisam::restart_rnd_next(uchar *buf, uchar *pos) { return rnd_pos(buf,pos); } -int ha_myisam::rnd_pos(byte * buf, byte *pos) +int ha_myisam::rnd_pos(uchar *buf, uchar *pos) { statistic_increment(table->in_use->status_var.ha_read_rnd_count, &LOCK_status); @@ -1726,7 +1726,7 @@ int ha_myisam::rnd_pos(byte * buf, byte *pos) return error; } -void ha_myisam::position(const byte* record) +void ha_myisam::position(const uchar *record) { my_off_t row_position= mi_position(file); my_store_ptr(ref, ref_length, row_position); @@ -1911,7 +1911,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg, records, recinfo, 0, (MI_UNIQUEDEF*) 0, &create_info, create_flags); - my_free((gptr) recinfo, MYF(0)); + my_free((uchar*) recinfo, MYF(0)); DBUG_RETURN(error); } @@ -1929,7 +1929,7 @@ void ha_myisam::get_auto_increment(ulonglong offset, ulonglong increment, { ulonglong nr; int error; - byte key[MI_MAX_KEY_LENGTH]; + uchar key[MI_MAX_KEY_LENGTH]; if (!table->s->next_number_key_offset) { // Autoincrement at key-start @@ -2002,7 +2002,7 @@ ha_rows ha_myisam::records_in_range(uint inx, key_range *min_key, } -int ha_myisam::ft_read(byte * buf) +int ha_myisam::ft_read(uchar *buf) { int error; |