diff options
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index ac105855c02..de3671c2f44 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4691,11 +4691,14 @@ void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info, about this call). We pass this along to all underlying MyISAM handlers and ignore it for the rest. - HA_EXTRA_PREPARE_FOR_DELETE: + HA_EXTRA_PREPARE_FOR_DROP: Only used by MyISAM, called in preparation for a DROP TABLE. It's used mostly by Windows that cannot handle dropping an open file. On other platforms it has the same effect as HA_EXTRA_FORCE_REOPEN. + HA_EXTRA_PREPARE_FOR_RENAME: + Informs the handler we are about to attempt a rename of the table. + HA_EXTRA_READCHECK: HA_EXTRA_NO_READCHECK: Only one call to HA_EXTRA_NO_READCHECK from ha_open where it says that @@ -4821,14 +4824,15 @@ int ha_partition::extra(enum ha_extra_function operation) } /* Category 3), used by MyISAM handlers */ - case HA_EXTRA_PREPARE_FOR_DELETE: - DBUG_RETURN(prepare_for_delete()); + case HA_EXTRA_PREPARE_FOR_RENAME: + DBUG_RETURN(prepare_for_rename()); break; case HA_EXTRA_NORMAL: case HA_EXTRA_QUICK: case HA_EXTRA_NO_READCHECK: case HA_EXTRA_PREPARE_FOR_UPDATE: case HA_EXTRA_FORCE_REOPEN: + case HA_EXTRA_PREPARE_FOR_DROP: case HA_EXTRA_FLUSH_CACHE: { if (m_myisam) @@ -4980,24 +4984,24 @@ void ha_partition::prepare_extra_cache(uint cachesize) 0 Success */ -int ha_partition::prepare_for_delete() +int ha_partition::prepare_for_rename() { int result= 0, tmp; handler **file; - DBUG_ENTER("ha_partition::prepare_for_delete()"); + DBUG_ENTER("ha_partition::prepare_for_rename()"); if (m_new_file != NULL) { for (file= m_new_file; *file; file++) - if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE))) + if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_RENAME))) result= tmp; for (file= m_reorged_file; *file; file++) - if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE))) + if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_RENAME))) result= tmp; DBUG_RETURN(result); } - DBUG_RETURN(loop_extra(HA_EXTRA_PREPARE_FOR_DELETE)); + DBUG_RETURN(loop_extra(HA_EXTRA_PREPARE_FOR_RENAME)); } /* |