diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-06-13 21:23:19 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-07-04 01:44:46 +0200 |
commit | c55c292832e2776d37e06c43174ac006e00143a2 (patch) | |
tree | e83cc7fd44b132de7a4c33975737825ccd18907e /sql/ha_partition.cc | |
parent | f17f7a43ba7da44608618f9e612f9808d363da23 (diff) | |
download | mariadb-git-c55c292832e2776d37e06c43174ac006e00143a2.tar.gz |
introduce hton->drop_table() method
first step in moving drop table out of the handler.
todo: other methods that don't need an open table
for now hton->drop_table is optional, for backward compatibility
reasons
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index dfbc8d52dcd..f5eab028755 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -811,7 +811,7 @@ create_error: { if (!create_partition_name(name_buff, sizeof(name_buff), path, name_buffer_ptr, NORMAL_PART_NAME, FALSE)) - (void) (*file)->ha_delete_table((const char*) name_buff); + (void) (*file)->delete_table((const char*) name_buff); name_buffer_ptr= strend(name_buffer_ptr) + 1; } handler::delete_table(name); @@ -880,7 +880,7 @@ int ha_partition::drop_partitions(const char *path) error= ret_error; file= m_file[part]; DBUG_PRINT("info", ("Drop subpartition %s", part_name_buff)); - if (unlikely((ret_error= file->ha_delete_table(part_name_buff)))) + if (unlikely((ret_error= file->delete_table(part_name_buff)))) error= ret_error; if (unlikely(deactivate_ddl_log_entry(sub_elem->log_entry-> entry_pos))) @@ -897,7 +897,7 @@ int ha_partition::drop_partitions(const char *path) { file= m_file[i]; DBUG_PRINT("info", ("Drop partition %s", part_name_buff)); - if (unlikely((ret_error= file->ha_delete_table(part_name_buff)))) + if (unlikely((ret_error= file->delete_table(part_name_buff)))) error= ret_error; if (unlikely(deactivate_ddl_log_entry(part_elem->log_entry-> entry_pos))) @@ -989,7 +989,7 @@ int ha_partition::rename_partitions(const char *path) NORMAL_PART_NAME)))) error= ret_error; DBUG_PRINT("info", ("Delete subpartition %s", norm_name_buff)); - if (unlikely((ret_error= file->ha_delete_table(norm_name_buff)))) + if (unlikely((ret_error= file->delete_table(norm_name_buff)))) error= ret_error; else if (unlikely(deactivate_ddl_log_entry(sub_elem->log_entry-> entry_pos))) @@ -1010,7 +1010,7 @@ int ha_partition::rename_partitions(const char *path) else { DBUG_PRINT("info", ("Delete partition %s", norm_name_buff)); - if (unlikely((ret_error= file->ha_delete_table(norm_name_buff)))) + if (unlikely((ret_error= file->delete_table(norm_name_buff)))) error= ret_error; else if (unlikely(deactivate_ddl_log_entry(part_elem->log_entry-> entry_pos))) @@ -1071,7 +1071,7 @@ int ha_partition::rename_partitions(const char *path) { file= m_reorged_file[part_count++]; DBUG_PRINT("info", ("Delete subpartition %s", norm_name_buff)); - if (unlikely((ret_error= file->ha_delete_table(norm_name_buff)))) + if (unlikely((ret_error= file->delete_table(norm_name_buff)))) error= ret_error; else if (unlikely(deactivate_ddl_log_entry(sub_elem->log_entry-> entry_pos))) @@ -1118,7 +1118,7 @@ int ha_partition::rename_partitions(const char *path) { file= m_reorged_file[part_count++]; DBUG_PRINT("info", ("Delete partition %s", norm_name_buff)); - if (unlikely((ret_error= file->ha_delete_table(norm_name_buff)))) + if (unlikely((ret_error= file->delete_table(norm_name_buff)))) error= ret_error; else if (unlikely(deactivate_ddl_log_entry(part_elem->log_entry-> entry_pos))) @@ -1670,7 +1670,7 @@ int ha_partition::prepare_new_partition(TABLE *tbl, error_external_lock: (void) file->ha_close(); error_open: - (void) file->ha_delete_table(part_name); + (void) file->delete_table(part_name); error_create: DBUG_RETURN(error); } @@ -1716,7 +1716,7 @@ void ha_partition::cleanup_new_partition(uint part_count) (*file)->ha_external_unlock(thd); (*file)->ha_close(); - /* Leave the (*file)->ha_delete_table(part_name) to the ddl-log */ + /* Leave the (*file)->delete_table(part_name) to the ddl-log */ file++; part_count--; @@ -2309,7 +2309,7 @@ void ha_partition::update_create_info(HA_CREATE_INFO *create_info) @param table_arg TABLE object @param share New share to use - @note Is used in error handling in ha_delete_table. + @note Is used in error handling in delete_table. All handlers should exist (lock_partitions should not be used) */ @@ -2450,7 +2450,7 @@ uint ha_partition::del_ren_table(const char *from, const char *to) } else // delete branch { - error= (*file)->ha_delete_table(from_buff); + error= (*file)->delete_table(from_buff); } name_buffer_ptr= strend(name_buffer_ptr) + 1; if (unlikely(error)) |