diff options
author | serg@serg.mysql.com <> | 2002-11-11 22:43:07 +0100 |
---|---|---|
committer | serg@serg.mysql.com <> | 2002-11-11 22:43:07 +0100 |
commit | 7720348bd29bf6bebc2ceb8fbd9ed8090bdb64c1 (patch) | |
tree | 892d9c1eed08e791d732d25ca72f09d8c4e78dfc /sql/ha_myisammrg.cc | |
parent | b0f5c6d625a77ef51554a1f98f1fd27b4b3f7801 (diff) | |
download | mariadb-git-7720348bd29bf6bebc2ceb8fbd9ed8090bdb64c1.tar.gz |
removed DBUG_ENTER/RETURN tags
Diffstat (limited to 'sql/ha_myisammrg.cc')
-rw-r--r-- | sql/ha_myisammrg.cc | 103 |
1 files changed, 26 insertions, 77 deletions
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index c9e017eb747..2342561b7f8 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -38,14 +38,12 @@ const char **ha_myisammrg::bas_ext() const int ha_myisammrg::open(const char *name, int mode, uint test_if_locked) { char name_buff[FN_REFLEN]; - DBUG_ENTER("ha_myisammrg::open"); - DBUG_PRINT("info", ("ha_myisammrg::open")); if (!(file=myrg_open(fn_format(name_buff,name,"","",2 | 4), mode, test_if_locked))) { DBUG_PRINT("info", ("ha_myisammrg::open exit %d", my_errno)); - DBUG_RETURN((my_errno ? my_errno : -1)); + return (my_errno ? my_errno : -1); } DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc...")) myrg_extrafunc(file, query_cache_invalidate_by_MyISAM_filename_ref); @@ -67,165 +65,132 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked) if (table->crashed) goto err; #endif - DBUG_RETURN((0)); + return (0); err: myrg_close(file); file=0; - DBUG_RETURN((my_errno= HA_ERR_WRONG_TABLE_DEF)); + return (my_errno= HA_ERR_WRONG_TABLE_DEF); } int ha_myisammrg::close(void) { - DBUG_ENTER("ha_myisammrg::close"); - - DBUG_RETURN(myrg_close(file)); + return myrg_close(file); } int ha_myisammrg::write_row(byte * buf) { - DBUG_ENTER("ha_myisammrg::write_row"); - statistic_increment(ha_write_count,&LOCK_status); if (table->time_stamp) update_timestamp(buf+table->time_stamp-1); if (table->next_number_field && buf == table->record[0]) update_auto_increment(); - DBUG_RETURN(myrg_write(file,buf)); + return myrg_write(file,buf); } int ha_myisammrg::update_row(const byte * old_data, byte * new_data) { - DBUG_ENTER("ha_myisammrg::update_row"); - statistic_increment(ha_update_count,&LOCK_status); if (table->time_stamp) update_timestamp(new_data+table->time_stamp-1); - DBUG_RETURN(myrg_update(file,old_data,new_data)); + return myrg_update(file,old_data,new_data); } int ha_myisammrg::delete_row(const byte * buf) { - DBUG_ENTER("ha_myisammrg::delete_row"); - statistic_increment(ha_delete_count,&LOCK_status); - DBUG_RETURN(myrg_delete(file,buf)); + return myrg_delete(file,buf); } int ha_myisammrg::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - DBUG_ENTER("ha_myisammrg::index_read"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - DBUG_ENTER("ha_myisammrg::index_read_idx"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_read_last(byte * buf, const byte * key, uint key_len) { - DBUG_ENTER("ha_myisammrg::index_read_last"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_next(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_next"); - statistic_increment(ha_read_next_count,&LOCK_status); int error=myrg_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_prev(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_prev"); - statistic_increment(ha_read_prev_count,&LOCK_status); int error=myrg_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_first(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_first"); - statistic_increment(ha_read_first_count,&LOCK_status); int error=myrg_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_last(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_last"); - statistic_increment(ha_read_last_count,&LOCK_status); int error=myrg_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::rnd_init(bool scan) { - DBUG_ENTER("ha_myisammrg::rnd_init"); - - DBUG_RETURN(myrg_extra(file,HA_EXTRA_RESET,0)); + return myrg_extra(file,HA_EXTRA_RESET,0); } int ha_myisammrg::rnd_next(byte *buf) { - DBUG_ENTER("ha_myisammrg::rnd_next"); - statistic_increment(ha_read_rnd_next_count,&LOCK_status); int error=myrg_rrnd(file, buf, HA_OFFSET_ERROR); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::rnd_pos(byte * buf, byte *pos) { - DBUG_ENTER("ha_myisammrg::rnd_pos"); - statistic_increment(ha_read_rnd_count,&LOCK_status); int error=myrg_rrnd(file, buf, ha_get_ptr(pos,ref_length)); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } void ha_myisammrg::position(const byte *record) { ulonglong position= myrg_position(file); - DBUG_ENTER("ha_myisammrg::position"); - ha_store_ptr(ref, ref_length, (my_off_t) position); - DBUG_VOID_RETURN; } void ha_myisammrg::info(uint flag) { MYMERGE_INFO info; - DBUG_ENTER("ha_myisammrg::info"); - (void) myrg_status(file,&info,flag); /* The following fails if one has not compiled MySQL with -DBIG_TABLES @@ -251,20 +216,17 @@ void ha_myisammrg::info(uint flag) #else ref_length=4; // Can't be > than my_off_t #endif - DBUG_VOID_RETURN; } int ha_myisammrg::extra(enum ha_extra_function operation) { - DBUG_ENTER("ha_myisammrg::extra"); - /* As this is just a mapping, we don't have to force the underlying tables to be closed */ if (operation == HA_EXTRA_FORCE_REOPEN || operation == HA_EXTRA_PREPARE_FOR_DELETE) - DBUG_RETURN(0); - DBUG_RETURN(myrg_extra(file,operation,0)); + return 0; + return myrg_extra(file,operation,0); } @@ -272,35 +234,27 @@ int ha_myisammrg::extra(enum ha_extra_function operation) int ha_myisammrg::extra_opt(enum ha_extra_function operation, ulong cache_size) { - DBUG_ENTER("ha_myisammrg::extra_opt"); - if ((specialflag & SPECIAL_SAFE_MODE) & (operation == HA_EXTRA_WRITE_CACHE || operation == HA_EXTRA_BULK_INSERT_BEGIN)) - DBUG_RETURN(0); - DBUG_RETURN(myrg_extra(file, operation, (void*) &cache_size)); + return 0; + return myrg_extra(file, operation, (void*) &cache_size); } int ha_myisammrg::reset(void) { - DBUG_ENTER("ha_myisammrg::reset"); - - DBUG_RETURN(myrg_extra(file,HA_EXTRA_RESET,0)); + return myrg_extra(file,HA_EXTRA_RESET,0); } int ha_myisammrg::external_lock(THD *thd, int lock_type) { - DBUG_ENTER("ha_myisammrg::external_lock"); - - DBUG_RETURN(myrg_lock_database(file,lock_type)); + return myrg_lock_database(file,lock_type); } uint ha_myisammrg::lock_count(void) const { - DBUG_ENTER("ha_myisammrg::lock_count"); - - DBUG_RETURN(file->tables); + return file->tables; } @@ -309,7 +263,6 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, enum thr_lock_type lock_type) { MYRG_TABLE *open_table; - DBUG_ENTER("**ha_myisammrg::store_lock"); for (open_table=file->open_tables ; open_table != file->end_table ; @@ -319,14 +272,13 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, if (lock_type != TL_IGNORE && open_table->table->lock.type == TL_UNLOCK) open_table->table->lock.type=lock_type; } - DBUG_RETURN(to); + return to; } void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info) { - DBUG_ENTER("ha_myisammrg::update_create_info"); - // [phi] auto_increment stuff is missing (but currently not needed) + DBUG_ENTER("ha_myisammrg::update_create_info"); if (!(create_info->used_fields & HA_CREATE_USED_UNION)) { MYRG_TABLE *open_table; @@ -407,8 +359,6 @@ int ha_myisammrg::create(const char *name, register TABLE *form, void ha_myisammrg::append_create_info(String *packet) { char buff[FN_REFLEN]; - DBUG_ENTER("ha_myisammrg::append_create_info"); - if (file->merge_insert_method != MERGE_INSERT_DISABLED) { packet->append(" INSERT_METHOD=",15); @@ -428,5 +378,4 @@ void ha_myisammrg::append_create_info(String *packet) packet->append(buff,(uint) strlen(buff)); } packet->append(')'); - DBUG_VOID_RETURN; } |