#At file:///home/svoj/devel/bzr-mysql/mysql-6.0-falcon-team-bug39702/
2916 Sergey Vojtovich 2008-11-24
BUG#39702 - Unspecific error msg when using non-existent
tablespace in partition definition
Partitioning handler create function didn't pass through
error code from a storage engine, resulting in generic
error message being returned.
added:
mysql-test/suite/falcon/r/falcon_bug_39702.result
mysql-test/suite/falcon/t/falcon_bug_39702.test
modified:
sql/ha_partition.cc
per-file messages:
mysql-test/suite/falcon/r/falcon_bug_39702.result
A test case for BUG#39702.
mysql-test/suite/falcon/t/falcon_bug_39702.test
A test case for BUG#39702.
sql/ha_partition.cc
Pass through error code from del_ren_cre_table().
=== added file 'mysql-test/suite/falcon/r/falcon_bug_39702.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_39702.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_39702.result 2008-11-24 14:25:35 +0000
@@ -0,0 +1,4 @@
+CREATE TABLE t1(a INT) ENGINE=Falcon PARTITION BY RANGE(a) (
+PARTITION p1 VALUES LESS THAN (10) TABLESPACE nosuchtablespace,
+PARTITION p2 VALUES LESS THAN MAXVALUE TABLESPACE nosuchtablespace);
+ERROR HY000: Tablespace 'nosuchtablespace' doesn't exist
=== added file 'mysql-test/suite/falcon/t/falcon_bug_39702.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_39702.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_39702.test 2008-11-24 14:25:35 +0000
@@ -0,0 +1,7 @@
+--source include/have_falcon.inc
+--source include/have_partition.inc
+
+--error ER_NO_SUCH_TABLESPACE
+CREATE TABLE t1(a INT) ENGINE=Falcon PARTITION BY RANGE(a) (
+ PARTITION p1 VALUES LESS THAN (10) TABLESPACE nosuchtablespace,
+ PARTITION p2 VALUES LESS THAN MAXVALUE TABLESPACE nosuchtablespace);
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc 2008-11-06 18:39:27 +0000
+++ b/sql/ha_partition.cc 2008-11-24 14:25:35 +0000
@@ -552,14 +552,15 @@ int ha_partition::create(const char *nam
HA_CREATE_INFO *create_info)
{
char t_name[FN_REFLEN];
+ int error;
DBUG_ENTER("ha_partition::create");
strmov(t_name, name);
DBUG_ASSERT(*fn_rext((char*)name) == '\0');
- if (del_ren_cre_table(t_name, NULL, table_arg, create_info))
+ if ((error= del_ren_cre_table(t_name, NULL, table_arg, create_info)))
{
handler::delete_table(t_name);
- DBUG_RETURN(1);
+ DBUG_RETURN(error);
}
DBUG_RETURN(0);
}
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (svoj:2916) Bug#39702 | Sergey Vojtovich | 24 Nov |