diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 4052b647f4d..582c9bb110b 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1701,7 +1701,7 @@ void ha_partition::cleanup_new_partition(uint part_count) handler **file= m_added_file; while ((part_count > 0) && (*file)) { - (*file)->ha_external_lock(thd, F_UNLCK); + (*file)->ha_external_unlock(thd); (*file)->ha_close(); /* Leave the (*file)->ha_delete_table(part_name) to the ddl-log */ @@ -4055,7 +4055,7 @@ err_handler: j < i; j= bitmap_get_next_set(&m_locked_partitions, j)) { - (void) m_file[j]->ha_external_lock(thd, F_UNLCK); + (void) m_file[j]->ha_external_unlock(thd); } bitmap_clear_all(&m_locked_partitions); DBUG_RETURN(error); diff --git a/sql/handler.cc b/sql/handler.cc index 359ead530af..3633f4aa961 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -6556,7 +6556,7 @@ int handler::ha_reset() clear_top_table_fields(); if (lookup_handler != this) { - lookup_handler->ha_external_lock(table->in_use, F_UNLCK); + lookup_handler->ha_external_unlock(table->in_use); lookup_handler->close(); delete lookup_handler; lookup_handler= this; diff --git a/sql/handler.h b/sql/handler.h index 0fa492a2a6f..afad986c883 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -3381,6 +3381,7 @@ public: and delete_row() below. */ int ha_external_lock(THD *thd, int lock_type); + int ha_external_unlock(THD *thd) { return ha_external_lock(thd, F_UNLCK); } int ha_write_row(const uchar * buf); int ha_update_row(const uchar * old_data, const uchar * new_data); int ha_delete_row(const uchar * buf); diff --git a/sql/lock.cc b/sql/lock.cc index f427ee0e115..b7bf4eb4f63 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -396,7 +396,7 @@ static int lock_external(THD *thd, TABLE **tables, uint count) while (--i) { tables--; - (*tables)->file->ha_external_lock(thd, F_UNLCK); + (*tables)->file->ha_external_unlock(thd); (*tables)->current_lock=F_UNLCK; } DBUG_RETURN(error); @@ -724,7 +724,7 @@ static int unlock_external(THD *thd, TABLE **table,uint count) if ((*table)->current_lock != F_UNLCK) { (*table)->current_lock = F_UNLCK; - if (unlikely((error=(*table)->file->ha_external_lock(thd, F_UNLCK)))) + if (unlikely((error=(*table)->file->ha_external_unlock(thd)))) { error_code= error; (*table)->file->print_error(error, MYF(0)); diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index 3a708895d78..ec039962be9 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -1380,7 +1380,7 @@ void DsMrr_impl::close_second_handler() { secondary_file->extra(HA_EXTRA_NO_KEYREAD); secondary_file->ha_index_or_rnd_end(); - secondary_file->ha_external_lock(current_thd, F_UNLCK); + secondary_file->ha_external_unlock(current_thd); secondary_file->ha_close(); delete secondary_file; secondary_file= NULL; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 569d53ced0c..29cf73aeea0 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1338,7 +1338,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT() { DBUG_PRINT("info", ("Freeing separate handler %p (free: %d)", file, free_file)); - file->ha_external_lock(current_thd, F_UNLCK); + file->ha_external_unlock(current_thd); file->ha_close(); delete file; } @@ -1528,7 +1528,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler, if (init()) { - file->ha_external_lock(thd, F_UNLCK); + file->ha_external_unlock(thd); file->ha_close(); goto failure; } @@ -1557,7 +1557,7 @@ end: { if (!reuse_handler) { - file->ha_external_lock(thd, F_UNLCK); + file->ha_external_unlock(thd); file->ha_close(); goto failure; } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 1054796d170..b272a0f44b5 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -11322,7 +11322,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, ha_enable_transaction(thd, TRUE); } - if (to->file->ha_external_lock(thd,F_UNLCK)) + if (to->file->ha_external_unlock(thd)) error=1; if (error < 0 && !from->s->tmp_table && to->file->extra(HA_EXTRA_PREPARE_FOR_RENAME)) diff --git a/storage/mroonga/lib/mrn_external_lock.cpp b/storage/mroonga/lib/mrn_external_lock.cpp index 512a20a00af..762a96d0455 100644 --- a/storage/mroonga/lib/mrn_external_lock.cpp +++ b/storage/mroonga/lib/mrn_external_lock.cpp @@ -33,7 +33,7 @@ namespace mrn { ExternalLock::~ExternalLock() { if (lock_type_ != F_UNLCK) { - handler_->ha_external_lock(thd_, F_UNLCK); + handler_->ha_external_unlock(thd_); } } diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc index bc3c6baa4a9..657e81671ee 100644 --- a/storage/spider/spd_db_conn.cc +++ b/storage/spider/spd_db_conn.cc @@ -10453,7 +10453,7 @@ int spider_db_udf_direct_sql( if (table->file->has_transactions()) #endif { - table->file->ha_external_lock(table->in_use, F_UNLCK); + table->file->ha_external_unlock(table->in_use); #if MYSQL_VERSION_ID < 50500 #else if (