Below is the list of changes that have just been committed into a local
6.0 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-01-23 15:35:05+04:00, svoj@stripped +6 -0
BUG#33216 - DROP TABLESPACE containing tables results in a vague error
Dropping Falcon tablespace that contains tables returns vague error.
With this fix "Tablespace busy" message is returned.
include/my_base.h@stripped, 2008-01-23 15:35:02+04:00, svoj@stripped +2 -1
Added error code for "Tablespace busy" error message.
mysql-test/suite/falcon/r/falcon_ts.result@stripped, 2008-01-23 15:35:02+04:00,
svoj@stripped +6 -0
A test case for BUG#33216.
mysql-test/suite/falcon/t/falcon_ts.test@stripped, 2008-01-23 15:35:02+04:00, svoj@stripped
+10 -0
A test case for BUG#33216.
sql/share/errmsg.txt@stripped, 2008-01-23 15:35:02+04:00, svoj@stripped +2 -0
Added "Tablespace busy" error message.
sql/sql_tablespace.cc@stripped, 2008-01-23 15:35:02+04:00, svoj@stripped +3 -0
Added handling of HA_ERR_TABLESPACE_BUSY error.
storage/falcon/ha_falcon.cpp@stripped, 2008-01-23 15:35:02+04:00, svoj@stripped +4 -0
Convert StorageErrorTableNotEmpry to HA_ERR_TABLESPACE_BUSY.
diff -Nrup a/include/my_base.h b/include/my_base.h
--- a/include/my_base.h 2008-01-22 20:59:20 +04:00
+++ b/include/my_base.h 2008-01-23 15:35:02 +04:00
@@ -431,7 +431,8 @@ enum ha_base_keytype {
illegal data being read */
#define HA_ERR_LOCK_OR_ACTIVE_TRANSACTION 173
#define HA_ERR_NO_SUCH_TABLESPACE 174
-#define HA_ERR_LAST 174 /*Copy last error nr.*/
+#define HA_ERR_TABLESPACE_BUSY 175
+#define HA_ERR_LAST 175 /*Copy last error nr.*/
/* Add error numbers before HA_ERR_LAST and change it accordingly. */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
diff -Nrup a/mysql-test/suite/falcon/r/falcon_ts.result
b/mysql-test/suite/falcon/r/falcon_ts.result
--- a/mysql-test/suite/falcon/r/falcon_ts.result 2008-01-22 20:59:20 +04:00
+++ b/mysql-test/suite/falcon/r/falcon_ts.result 2008-01-23 15:35:02 +04:00
@@ -36,3 +36,9 @@ DROP TABLE t1;
DROP TABLESPACE `ts 1` ENGINE=falcon;
DROP TABLESPACE ts1 ENGINE=falcon;
ERROR HY000: Tablespace 'ts1' doesn't exist
+CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
+CREATE TABLE t1(a INT) ENGINE=falcon TABLESPACE ts1;
+DROP TABLESPACE ts1 ENGINE=falcon;
+ERROR HY000: Tablespace 'ts1' busy
+DROP TABLE t1;
+DROP TABLESPACE ts1 ENGINE=falcon;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_ts.test
b/mysql-test/suite/falcon/t/falcon_ts.test
--- a/mysql-test/suite/falcon/t/falcon_ts.test 2008-01-22 20:59:20 +04:00
+++ b/mysql-test/suite/falcon/t/falcon_ts.test 2008-01-23 15:35:02 +04:00
@@ -58,3 +58,13 @@ DROP TABLESPACE `ts 1` ENGINE=falcon;
#
--error ER_NO_SUCH_TABLESPACE
DROP TABLESPACE ts1 ENGINE=falcon;
+
+#
+# BUG#33216 - DROP TABLESPACE containing tables results in a vague error
+#
+CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
+CREATE TABLE t1(a INT) ENGINE=falcon TABLESPACE ts1;
+--error 1658
+DROP TABLESPACE ts1 ENGINE=falcon;
+DROP TABLE t1;
+DROP TABLESPACE ts1 ENGINE=falcon;
diff -Nrup a/sql/share/errmsg.txt b/sql/share/errmsg.txt
--- a/sql/share/errmsg.txt 2008-01-22 20:59:20 +04:00
+++ b/sql/share/errmsg.txt 2008-01-23 15:35:02 +04:00
@@ -6224,3 +6224,5 @@ ER_TABLESPACE_EXIST
eng "Tablespace '%-.192s' already exist"
ER_NO_SUCH_TABLESPACE
eng "Tablespace '%-.192s' doesn't exist"
+ER_TABLESPACE_BUSY
+ eng "Tablespace '%-.192s' busy"
diff -Nrup a/sql/sql_tablespace.cc b/sql/sql_tablespace.cc
--- a/sql/sql_tablespace.cc 2008-01-22 20:59:20 +04:00
+++ b/sql/sql_tablespace.cc 2008-01-23 15:35:02 +04:00
@@ -55,6 +55,9 @@ int mysql_alter_tablespace(THD *thd, st_
case HA_ERR_NO_SUCH_TABLESPACE:
my_error(ER_NO_SUCH_TABLESPACE, MYF(0), ts_info->tablespace_name);
break;
+ case HA_ERR_TABLESPACE_BUSY:
+ my_error(ER_TABLESPACE_BUSY, MYF(0), ts_info->tablespace_name);
+ break;
default:
my_error(error, MYF(0));
}
diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
--- a/storage/falcon/ha_falcon.cpp 2008-01-22 20:59:20 +04:00
+++ b/storage/falcon/ha_falcon.cpp 2008-01-23 15:35:02 +04:00
@@ -1744,6 +1744,10 @@ int StorageInterface::getMySqlError(int
case StorageErrorOutOfRecordMemory:
DBUG_PRINT("info", ("StorageErrorOutOfRecordMemory"));
return (200 - storageError);
+
+ case StorageErrorTableNotEmpty:
+ DBUG_PRINT("info", ("StorageErrorTableNotEmpty"));
+ return HA_ERR_TABLESPACE_BUSY;
default:
DBUG_PRINT("info", ("Unknown Falcon Error"));
| Thread |
|---|
| • bk commit into 6.0 tree (svoj:1.2787) BUG#33216 | Sergey Vojtovich | 23 Jan |