#At file:///home/svoj/devel/bzr-mysql/mysql-6.0-falcon-team-bug33720/
2948 Sergey Vojtovich 2008-12-19
BUG#33720 - Falcon allows FALCON_TEMPORARY to be manually
specified as a tablespace
It was possible to create non-temporary table in
FALCON_TEMPORARY tablespace.
When creating a table, do not accept FALCON_TEMPORARY
tablespace for regular tables.
added:
mysql-test/suite/falcon/r/falcon_bug_33720.result
mysql-test/suite/falcon/t/falcon_bug_33720.test
modified:
storage/falcon/ha_falcon.cpp
per-file messages:
mysql-test/suite/falcon/r/falcon_bug_33720.result
A test case for BUG#33720.
mysql-test/suite/falcon/t/falcon_bug_33720.test
A test case for BUG#33720.
storage/falcon/ha_falcon.cpp
When creating a table, do not accept FALCON_TEMPORARY
tablespace for regular tables.
=== added file 'mysql-test/suite/falcon/r/falcon_bug_33720.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_33720.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_33720.result 2008-12-19 10:47:17 +0000
@@ -0,0 +1,5 @@
+*** Bug #33720 ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT) TABLESPACE FALCON_TEMPORARY;
+ERROR HY000: Cannot create non-temporary table 'T1' in 'FALCON_TEMPORARY' tablespace.
=== added file 'mysql-test/suite/falcon/t/falcon_bug_33720.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_33720.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_33720.test 2008-12-19 10:47:17 +0000
@@ -0,0 +1,31 @@
+--source include/have_falcon.inc
+
+#
+# Bug #33720: Falcon allows FALCON_TEMPORARY to be manually specified as a
+# tablespace
+#
+--echo *** Bug #33720 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TABLE t1(a INT) TABLESPACE FALCON_TEMPORARY;
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp 2008-12-18 01:44:03 +0000
+++ b/storage/falcon/ha_falcon.cpp 2008-12-19 10:47:17 +0000
@@ -859,7 +859,16 @@ int StorageInterface::create(const char
tableSpace = TEMPORARY_TABLESPACE;
}
else if (info->tablespace)
+ {
+ if (!strcasecmp(info->tablespace, TEMPORARY_TABLESPACE))
+ {
+ my_printf_error(ER_ILLEGAL_HA_CREATE_OPTION,
+ "Cannot create non-temporary table '%s' in '%s' tablespace.", MYF(0), tableName,
TEMPORARY_TABLESPACE);
+ storageTable->deleteTable();
+ DBUG_RETURN(HA_WRONG_CREATE_OPTION);
+ }
tableSpace = storageTable->getTableSpaceName();
+ }
else
tableSpace = DEFAULT_TABLESPACE;
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (svoj:2948) Bug#33720 | Sergey Vojtovich | 19 Dec |