summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2006-02-13 10:15:42 -0800
committerunknown <jimw@mysql.com>2006-02-13 10:15:42 -0800
commit5664784f6cc2c2460f2acc72efee05951bd8cd13 (patch)
tree695b1df7b913d2e52f2988fc996a447992c06766 /sql
parentc02246c461007ae32297a43c2dca90c0ad909dab (diff)
downloadmariadb-git-5664784f6cc2c2460f2acc72efee05951bd8cd13.tar.gz
Bug #16775: DROP TABLE of subpartitioned table can fail if default engine
used. The problem is that the actual engine was not stored in the .par file, causing confusion when the default engine was changed. Now the actual storage engine is stored for subpartitions, as was intended. mysql-test/r/partition.result: Add new results mysql-test/t/partition.test: Add new regression test, marker for end of 5.1 tests sql/ha_partition.cc: Record correct engine type for subpartition parts, and fix use of constant for .par extension instead of ha_par_ext variable.
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_partition.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 2bc4a106536..babc8a0e969 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1937,7 +1937,8 @@ bool ha_partition::create_handler_file(const char *name)
name_buffer_ptr+= name_add(name_buffer_ptr,
part_name,
subpart_name);
- *engine_array= (uchar) ha_legacy_type(part_elem->engine_type);
+ *engine_array= (uchar) ha_legacy_type(subpart_elem->engine_type);
+ DBUG_PRINT("info", ("engine: %u", *engine_array));
engine_array++;
}
}
@@ -1954,7 +1955,7 @@ bool ha_partition::create_handler_file(const char *name)
Create and write and close file
to be used at open, delete_table and rename_table
*/
- fn_format(file_name, name, "", ".par", MY_APPEND_EXT);
+ fn_format(file_name, name, "", ha_par_ext, MY_APPEND_EXT);
if ((file= my_create(file_name, CREATE_MODE, O_RDWR | O_TRUNC,
MYF(MY_WME))) >= 0)
{