MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:April 9 2008 10:03am
Subject:bk commit into 6.0 tree (svoj:1.2633) BUG#33216
View as plain text  
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-04-09 15:02:59+05:00, svoj@stripped +7 -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 not empty" message is returned.

  include/my_base.h@stripped, 2008-04-09 15:02:55+05:00, svoj@stripped +2 -1
    Added error code for "Tablespace not empty" error message.

  mysql-test/suite/falcon/r/falcon_bug_33216.result@stripped, 2008-04-09 15:02:56+05:00, svoj@stripped +6 -0
    A test case for BUG#33216.

  mysql-test/suite/falcon/r/falcon_bug_33216.result@stripped, 2008-04-09 15:02:56+05:00, svoj@stripped +0 -0

  mysql-test/suite/falcon/t/falcon_bug_33216.test@stripped, 2008-04-09 15:02:56+05:00, svoj@stripped +11 -0
    A test case for BUG#33216.

  mysql-test/suite/falcon/t/falcon_bug_33216.test@stripped, 2008-04-09 15:02:56+05:00, svoj@stripped +0 -0

  mysys/my_handler_errors.h@stripped, 2008-04-09 15:02:55+05:00, svoj@stripped +3 -1
    Added error message for HA_ERR_TABLESPACE_NOT_EMPTY.

  sql/share/errmsg.txt@stripped, 2008-04-09 15:02:55+05:00, svoj@stripped +2 -0
    Added "Tablespace not empty" error message.

  sql/sql_tablespace.cc@stripped, 2008-04-09 15:02:55+05:00, svoj@stripped +3 -0
    Added handling of HA_ERR_TABLESPACE_NOT_EMPTY error.

  storage/falcon/ha_falcon.cpp@stripped, 2008-04-09 15:02:56+05:00, svoj@stripped +4 -0
    Convert StorageErrorTableNotEmpry to HA_ERR_TABLESPACE_NOT_EMPTY.

diff -Nrup a/include/my_base.h b/include/my_base.h
--- a/include/my_base.h	2008-04-01 20:13:53 +05:00
+++ b/include/my_base.h	2008-04-09 15:02:55 +05:00
@@ -453,7 +453,8 @@ enum ha_base_keytype {
 #define HA_ERR_WRONG_CRC	  176	 /* Wrong CRC on page */
 #define HA_ERR_LOCK_OR_ACTIVE_TRANSACTION 177
 #define HA_ERR_NO_SUCH_TABLESPACE 178
-#define HA_ERR_LAST               178    /* Copy of last error nr */
+#define HA_ERR_TABLESPACE_NOT_EMPTY 179
+#define HA_ERR_LAST               179    /* Copy of last error nr */
 
 /* Number of different errors */
 #define HA_ERR_ERRORS            (HA_ERR_LAST - HA_ERR_FIRST + 1)
diff -Nrup a/mysql-test/suite/falcon/r/falcon_bug_33216.result b/mysql-test/suite/falcon/r/falcon_bug_33216.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/r/falcon_bug_33216.result	2008-04-09 15:02:56 +05:00
@@ -0,0 +1,6 @@
+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' not empty
+DROP TABLE t1;
+DROP TABLESPACE ts1 ENGINE=falcon;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_33216.test b/mysql-test/suite/falcon/t/falcon_bug_33216.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/falcon/t/falcon_bug_33216.test	2008-04-09 15:02:56 +05:00
@@ -0,0 +1,11 @@
+--source include/have_falcon.inc
+
+#
+# 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 ER_TABLESPACE_NOT_EMPTY
+DROP TABLESPACE ts1 ENGINE=falcon;
+DROP TABLE t1;
+DROP TABLESPACE ts1 ENGINE=falcon;
diff -Nrup a/mysys/my_handler_errors.h b/mysys/my_handler_errors.h
--- a/mysys/my_handler_errors.h	2008-04-02 14:33:18 +05:00
+++ b/mysys/my_handler_errors.h	2008-04-09 15:02:55 +05:00
@@ -124,6 +124,8 @@ static const char *handler_error_message
   /* HA_ERR_LOCK_OR_ACTIVE_TRANSACTION */
   "Lock or active transaction", /* TODO: get a better message */
   /* HA_ERR_NO_SUCH_TABLESPACE */
-  "No such table space" /* TODO: get a better message */
+  "No such table space", /* TODO: get a better message */
+  /* HA_ERR_TABLESPACE_NOT_EMPTY */
+  "Tablespace not empty" /* TODO: get a better message */
 };
 
diff -Nrup a/sql/share/errmsg.txt b/sql/share/errmsg.txt
--- a/sql/share/errmsg.txt	2008-04-02 14:47:23 +05:00
+++ b/sql/share/errmsg.txt	2008-04-09 15:02:55 +05:00
@@ -6253,3 +6253,5 @@ ER_SLAVE_HEARTBEAT_FAILURE
   eng "Unexpected master's heartbeat data: %s"
 ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
   eng "The requested value for the heartbeat period %s %s"
+ER_TABLESPACE_NOT_EMPTY
+  eng "Tablespace '%-.192s' not empty"
diff -Nrup a/sql/sql_tablespace.cc b/sql/sql_tablespace.cc
--- a/sql/sql_tablespace.cc	2008-03-11 19:16:30 +04:00
+++ b/sql/sql_tablespace.cc	2008-04-09 15:02:55 +05: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_NOT_EMPTY:
+          my_error(ER_TABLESPACE_NOT_EMPTY, 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-04-08 13:45:26 +05:00
+++ b/storage/falcon/ha_falcon.cpp	2008-04-09 15:02:56 +05:00
@@ -1816,6 +1816,10 @@ int StorageInterface::getMySqlError(int 
 			DBUG_PRINT("info", ("StorageErrorOutOfRecordMemory"));
 			return (200 - storageError);
 
+		case StorageErrorTableNotEmpty:
+			DBUG_PRINT("info", ("StorageErrorTableNotEmpty"));
+			return HA_ERR_TABLESPACE_NOT_EMPTY;
+
 		default:
 			DBUG_PRINT("info", ("Unknown Falcon Error"));
 			return (200 - storageError);
Thread
bk commit into 6.0 tree (svoj:1.2633) BUG#33216Sergey Vojtovich9 Apr