BUG#21350: No errors on using erroneus DATA DIRECTORY clause

set_up_table_before_create can fail due to erroneus path to
data directory or index directory
Added abort handling to ensure created partitions are dropped
if a failure occurs in the middle of the create process.


mysql-test/r/partition.result:
  New test cases
mysql-test/t/partition.test:
  New test cases
sql/ha_partition.cc:
  set_up_table_before_create can fail due to erroneus path to
  data directory or index directory
  Added abort handling to ensure created partitions are dropped
  if a failure occurs in the middle of the create process.
sql/ha_partition.h:
  set_up_table_before_create can fail due to erroneus path to
  data directory or index directory
  Added abort handling to ensure created partitions are dropped
  if a failure occurs in the middle of the create process.
This commit is contained in:
unknown 2006-08-07 06:22:08 -04:00
commit 09a27bb217
4 changed files with 72 additions and 24 deletions

View file

@ -222,11 +222,11 @@ private:
bool new_handlers_from_part_info(MEM_ROOT *mem_root);
bool create_handlers(MEM_ROOT *mem_root);
void clear_handler_file();
void set_up_table_before_create(TABLE *table_arg,
const char *partition_name_with_path,
HA_CREATE_INFO *info,
uint part_id,
partition_element *p_elem);
int set_up_table_before_create(TABLE *table_arg,
const char *partition_name_with_path,
HA_CREATE_INFO *info,
uint part_id,
partition_element *p_elem);
partition_element *find_partition_element(uint part_id);
public: