diff options
author | unknown <kostja@bodhi.(none)> | 2007-06-01 12:12:06 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-06-01 12:12:06 +0400 |
commit | 63791f4cc4d7f79e3fe6d41c701b152674073019 (patch) | |
tree | 2c2de88de3152746bd0ffaea698446ff1cede244 /sql/handler.cc | |
parent | 80af30efe10621b7c2b64f98cf957e0c1b5b5f8d (diff) | |
parent | c6ff8a6500f6e3e08d01fcf0687f6987e5adefa6 (diff) | |
download | mariadb-git-63791f4cc4d7f79e3fe6d41c701b152674073019.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
client/mysqlbinlog.cc:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_xmlfunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/heap/hp_hash.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/item_func.cc:
Manual merge.
sql/sp.cc:
Manual merge.
sql/sql_cache.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
strings/my_vsnprintf.c:
Manual merge.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 6bdcdc72bdb..afb88dc962d 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -368,7 +368,7 @@ static int ha_finish_errors(void) /* Allocate a pointer array for the error message strings. */ if (! (errmsgs= my_error_unregister(HA_ERR_FIRST, HA_ERR_LAST))) return 1; - my_free((gptr) errmsgs, MYF(0)); + my_free((uchar*) errmsgs, MYF(0)); return 0; } @@ -406,7 +406,7 @@ int ha_finalize_handlerton(st_plugin_int *plugin) } } - my_free((gptr)hton, MYF(0)); + my_free((uchar*)hton, MYF(0)); DBUG_RETURN(0); } @@ -1053,7 +1053,7 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin, } // recovery mode if (info->commit_list ? - hash_search(info->commit_list, (byte *)&x, sizeof(x)) != 0 : + hash_search(info->commit_list, (uchar *)&x, sizeof(x)) != 0 : tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT) { #ifndef DBUG_OFF @@ -1123,7 +1123,7 @@ int ha_recover(HASH *commit_list) plugin_foreach(NULL, xarecover_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &info); - my_free((gptr)info.list, MYF(0)); + my_free((uchar*)info.list, MYF(0)); if (info.found_foreign_xids) sql_print_warning("Found %d prepared XA transactions", info.found_foreign_xids); @@ -1247,7 +1247,7 @@ int ha_rollback_to_savepoint(THD *thd, SAVEPOINT *sv) { int err; DBUG_ASSERT((*ht)->savepoint_set != 0); - if ((err= (*(*ht)->savepoint_rollback)(*ht, thd, (byte *)(sv+1)+(*ht)->savepoint_offset))) + if ((err= (*(*ht)->savepoint_rollback)(*ht, thd, (uchar *)(sv+1)+(*ht)->savepoint_offset))) { // cannot happen my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); error=1; @@ -1295,7 +1295,7 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv) error=1; break; } - if ((err= (*(*ht)->savepoint_set)(*ht, thd, (byte *)(sv+1)+(*ht)->savepoint_offset))) + if ((err= (*(*ht)->savepoint_set)(*ht, thd, (uchar *)(sv+1)+(*ht)->savepoint_offset))) { // cannot happen my_error(ER_GET_ERRNO, MYF(0), err); error=1; @@ -1322,7 +1322,7 @@ int ha_release_savepoint(THD *thd, SAVEPOINT *sv) if (!(*ht)->savepoint_release) continue; if ((err= (*(*ht)->savepoint_release)(*ht, thd, - (byte *)(sv+1)+ + (uchar *)(sv+1)+ (*ht)->savepoint_offset))) { // cannot happen my_error(ER_GET_ERRNO, MYF(0), err); @@ -1572,7 +1572,7 @@ int handler::ha_open(TABLE *table_arg, const char *name, int mode, table->db_stat|=HA_READ_ONLY; (void) extra(HA_EXTRA_NO_READCHECK); // Not needed in SQL - if (!(ref= (byte*) alloc_root(&table->mem_root, ALIGN_SIZE(ref_length)*2))) + if (!(ref= (uchar*) alloc_root(&table->mem_root, ALIGN_SIZE(ref_length)*2))) { close(); error=HA_ERR_OUT_OF_MEM; @@ -1590,7 +1590,7 @@ int handler::ha_open(TABLE *table_arg, const char *name, int mode, This is never called for InnoDB tables, as these table types has the HA_STATS_RECORDS_IS_EXACT set. */ -int handler::read_first_row(byte * buf, uint primary_key) +int handler::read_first_row(uchar * buf, uint primary_key) { register int error; DBUG_ENTER("handler::read_first_row"); @@ -1999,7 +1999,7 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment, } else { - byte key[MAX_KEY_LENGTH]; + uchar key[MAX_KEY_LENGTH]; key_copy(key, table->record[0], table->key_info + table->s->next_number_index, table->s->next_number_key_offset); @@ -2358,12 +2358,12 @@ static bool update_frm_version(TABLE *table) int4store(version, MYSQL_VERSION_ID); - if ((result= my_pwrite(file,(byte*) version,4,51L,MYF_RW))) + if ((result= my_pwrite(file,(uchar*) version,4,51L,MYF_RW))) goto err; - for (entry=(TABLE*) hash_first(&open_cache,(byte*) key,key_length, &state); + for (entry=(TABLE*) hash_first(&open_cache,(uchar*) key,key_length, &state); entry; - entry= (TABLE*) hash_next(&open_cache,(byte*) key,key_length, &state)) + entry= (TABLE*) hash_next(&open_cache,(uchar*) key,key_length, &state)) entry->s->mysql_version= MYSQL_VERSION_ID; } err: @@ -2526,7 +2526,7 @@ int ha_enable_transaction(THD *thd, bool on) DBUG_RETURN(error); } -int handler::index_next_same(byte *buf, const byte *key, uint keylen) +int handler::index_next_same(uchar *buf, const uchar *key, uint keylen) { int error; if (!(error=index_next(buf))) @@ -2635,8 +2635,8 @@ err: int ha_create_table_from_engine(THD* thd, const char *db, const char *name) { int error; - const void *frmblob; - uint frmlen; + uchar *frmblob; + size_t frmlen; char path[FN_REFLEN]; HA_CREATE_INFO create_info; TABLE table; @@ -2644,7 +2644,7 @@ int ha_create_table_from_engine(THD* thd, const char *db, const char *name) DBUG_ENTER("ha_create_table_from_engine"); DBUG_PRINT("enter", ("name '%s'.'%s'", db, name)); - bzero((char*) &create_info,sizeof(create_info)); + bzero((uchar*) &create_info,sizeof(create_info)); if ((error= ha_discover(thd, db, name, &frmblob, &frmlen))) { /* Table could not be discovered and thus not created */ @@ -2659,7 +2659,7 @@ int ha_create_table_from_engine(THD* thd, const char *db, const char *name) (void)strxnmov(path,FN_REFLEN-1,mysql_data_home,"/",db,"/",name,NullS); // Save the frm file error= writefrm(path, frmblob, frmlen); - my_free((char*) frmblob, MYF(0)); + my_free(frmblob, MYF(0)); if (error) DBUG_RETURN(2); @@ -2801,8 +2801,8 @@ struct st_discover_args { const char *db; const char *name; - const void** frmblob; - uint* frmlen; + uchar **frmblob; + size_t *frmlen; }; static my_bool discover_handlerton(THD *thd, plugin_ref plugin, @@ -2820,7 +2820,7 @@ static my_bool discover_handlerton(THD *thd, plugin_ref plugin, } int ha_discover(THD *thd, const char *db, const char *name, - const void **frmblob, uint *frmlen) + uchar **frmblob, size_t *frmlen) { int error= -1; // Table does not exist in any handler DBUG_ENTER("ha_discover"); @@ -3310,7 +3310,7 @@ int handler::compare_key(key_range *range) } -int handler::index_read_idx(byte * buf, uint index, const byte * key, +int handler::index_read_idx(uchar * buf, uint index, const uchar * key, key_part_map keypart_map, enum ha_rkey_function find_flag) { @@ -3570,8 +3570,8 @@ namespace template<class RowsEventT> int binlog_log_row(TABLE* table, - const byte *before_record, - const byte *after_record) + const uchar *before_record, + const uchar *after_record) { if (table->file->ha_table_flags() & HA_HAS_OWN_BINLOGGING) return 0; @@ -3620,13 +3620,13 @@ namespace */ template int - binlog_log_row<Write_rows_log_event>(TABLE *, const byte *, const byte *); + binlog_log_row<Write_rows_log_event>(TABLE *, const uchar *, const uchar *); template int - binlog_log_row<Delete_rows_log_event>(TABLE *, const byte *, const byte *); + binlog_log_row<Delete_rows_log_event>(TABLE *, const uchar *, const uchar *); template int - binlog_log_row<Update_rows_log_event>(TABLE *, const byte *, const byte *); + binlog_log_row<Update_rows_log_event>(TABLE *, const uchar *, const uchar *); } @@ -3650,9 +3650,9 @@ int handler::ha_reset() { DBUG_ENTER("ha_reset"); /* Check that we have called all proper deallocation functions */ - DBUG_ASSERT((byte*) table->def_read_set.bitmap + + DBUG_ASSERT((uchar*) table->def_read_set.bitmap + table->s->column_bitmap_size == - (byte*) table->def_write_set.bitmap); + (uchar*) table->def_write_set.bitmap); DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set)); DBUG_ASSERT(table->key_read == 0); /* ensure that ha_index_end / ha_rnd_end has been called */ @@ -3663,7 +3663,7 @@ int handler::ha_reset() } -int handler::ha_write_row(byte *buf) +int handler::ha_write_row(uchar *buf) { int error; if (unlikely(error= write_row(buf))) @@ -3673,7 +3673,7 @@ int handler::ha_write_row(byte *buf) return 0; } -int handler::ha_update_row(const byte *old_data, byte *new_data) +int handler::ha_update_row(const uchar *old_data, uchar *new_data) { int error; @@ -3690,7 +3690,7 @@ int handler::ha_update_row(const byte *old_data, byte *new_data) return 0; } -int handler::ha_delete_row(const byte *buf) +int handler::ha_delete_row(const uchar *buf) { int error; if (unlikely(error= delete_row(buf))) @@ -3813,7 +3813,7 @@ int fl_log_iterator_next(struct handler_iterator *iterator, void fl_log_iterator_destroy(struct handler_iterator *iterator) { - my_free((gptr)iterator->buffer, MYF(MY_ALLOW_ZERO_PTR)); + my_free((uchar*)iterator->buffer, MYF(MY_ALLOW_ZERO_PTR)); } @@ -3826,7 +3826,7 @@ fl_log_iterator_buffer_init(struct handler_iterator *iterator) MY_DIR *dirp; struct fl_buff *buff; char *name_ptr; - byte *ptr; + uchar *ptr; FILEINFO *file; uint32 i; @@ -3837,7 +3837,7 @@ fl_log_iterator_buffer_init(struct handler_iterator *iterator) { return HA_ITERATOR_ERROR; } - if ((ptr= (byte*)my_malloc(ALIGN_SIZE(sizeof(fl_buff)) + + if ((ptr= (uchar*)my_malloc(ALIGN_SIZE(sizeof(fl_buff)) + ((ALIGN_SIZE(sizeof(LEX_STRING)) + sizeof(enum log_status) + + FN_REFLEN) * |