diff options
author | unknown <reggie@linux.site> | 2006-01-25 13:10:00 -0600 |
---|---|---|
committer | unknown <reggie@linux.site> | 2006-01-25 13:10:00 -0600 |
commit | 0e155240e97a69d2d8ddf60be771338618eeab2a (patch) | |
tree | 58fdcd2cbca8d61af9f544ef9c6f9e982f74ec51 /sql/ha_partition.cc | |
parent | cbfc0f4c60553722ae93417dc1bc88eb0ac324c6 (diff) | |
parent | f37545521b112444c5468fb37e00970c192000af (diff) | |
download | mariadb-git-0e155240e97a69d2d8ddf60be771338618eeab2a.tar.gz |
Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into linux.site:/home/reggie/work/mysql-5.1-bug14354
mysql-test/r/partition_mgm_err.result:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
mysql-test/t/partition_mgm_err.test:
SCCS merged
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 61ffa49def2..4bca3365cb2 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1696,7 +1696,7 @@ uint ha_partition::del_ren_cre_table(const char *from, error= (*file)->delete_table((const char*) from_buff); else { - set_up_table_before_create(table_arg, create_info, i); + set_up_table_before_create(table_arg, from_buff, create_info, i); error= (*file)->create(from_buff, table_arg, create_info); } name_buffer_ptr= strend(name_buffer_ptr) + 1; @@ -1770,8 +1770,9 @@ partition_element *ha_partition::find_partition_element(uint part_id) */ void ha_partition::set_up_table_before_create(TABLE *table, - HA_CREATE_INFO *info, - uint part_id) + const char *partition_name_with_path, + HA_CREATE_INFO *info, + uint part_id) { partition_element *part_elem= find_partition_element(part_id); @@ -1779,6 +1780,15 @@ void ha_partition::set_up_table_before_create(TABLE *table, return; // Fatal error table->s->max_rows= part_elem->part_max_rows; table->s->min_rows= part_elem->part_min_rows; + char *partition_name= strrchr(partition_name_with_path, FN_LIBCHAR); + if (part_elem->index_file_name) + append_file_to_dir(current_thd, + (const char**)&part_elem->index_file_name, + partition_name+1); + if (part_elem->data_file_name) + append_file_to_dir(current_thd, + (const char**)&part_elem->data_file_name, + partition_name+1); info->index_file_name= part_elem->index_file_name; info->data_file_name= part_elem->data_file_name; } |