MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:January 22 2008 5:15pm
Subject:bk commit into 6.0 tree (svoj:1.2778) BUG#33212
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-01-22 21:00:29+04:00, svoj@stripped +8 -0
  BUG#33212 - DROP TABLESPACE does not fail on non-existing Falcon
              tablespace
  
  Dropping non-existing Falcon tablespace silently succeeds, whereas
  it should return error.

  include/my_base.h@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +2 -1
    Added error code for "Tablespace doesn't exist" error message.

  mysql-test/suite/falcon/r/falcon_bug_29511.result@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +1 -1
    Fixed a test case according to fix for BUG#33212.

  mysql-test/suite/falcon/r/falcon_ts.result@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +3 -1
    A test case for BUG#33212.

  mysql-test/suite/falcon/t/falcon_bug_29511.test@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +1 -1
    Fixed a test case according to fix for BUG#33212. With this fix
    dropping non-existing tablespace returns ER_NO_SUCH_TABLESPACE.

  mysql-test/suite/falcon/t/falcon_ts.test@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +9 -4
    A test case for BUG#33212.
    
    Fixed a test case according to fix for BUG#33212. With this fix
    dropping non-existing tablespace returns ER_NO_SUCH_TABLESPACE.
    
    Removed wrong "--enable/disable_errors" macro.

  sql/share/errmsg.txt@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +3 -1
    Added "Tablespace doesn't exist" error message.

  sql/sql_tablespace.cc@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +3 -0
    Added handling of HA_ERR_NO_SUCH_TABLESPACE error.

  storage/falcon/ha_falcon.cpp@stripped, 2008-01-22 20:59:20+04:00, svoj@april.(none) +3 -3
    Convert StorageErrorTableSpaceNotExist to HA_ERR_TABLESPACE_EXIST.

diff -Nrup a/include/my_base.h b/include/my_base.h
--- a/include/my_base.h	2007-12-06 04:16:53 +04:00
+++ b/include/my_base.h	2008-01-22 20:59:20 +04:00
@@ -430,7 +430,8 @@ enum ha_base_keytype {
 #define HA_ERR_CORRUPT_EVENT      172    /* The event was corrupt, leading to
                                             illegal data being read */
 #define HA_ERR_LOCK_OR_ACTIVE_TRANSACTION 173
-#define HA_ERR_LAST               173    /*Copy last error nr.*/
+#define HA_ERR_NO_SUCH_TABLESPACE 174
+#define HA_ERR_LAST               174    /*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_bug_29511.result b/mysql-test/suite/falcon/r/falcon_bug_29511.result
--- a/mysql-test/suite/falcon/r/falcon_bug_29511.result	2007-11-27 04:52:56 +04:00
+++ b/mysql-test/suite/falcon/r/falcon_bug_29511.result	2008-01-22 20:59:20 +04:00
@@ -2,5 +2,5 @@
 DROP TABLESPACE tablespace1 Engine Falcon;
 CREATE TABLESPACE tablespace1 ADD DATAFILE 'falcon_tablespace.fts' Engine Falcon;
 CREATE TABLESPACE tablespace2 ADD DATAFILE 'falcon_tablespace.fts' Engine Falcon;
-ERROR HY000: Tablespace 'tablespace2' already exists
+ERROR HY000: Tablespace 'tablespace2' already exist
 DROP TABLESPACE tablespace1 Engine Falcon;
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	2007-12-14 19:57:58 +04:00
+++ b/mysql-test/suite/falcon/r/falcon_ts.result	2008-01-22 20:59:20 +04:00
@@ -4,7 +4,7 @@ CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.
 ERROR HY000: Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP'
 CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
 CREATE TABLESPACE ts1 ADD DATAFILE 'ts2.fts' ENGINE=falcon;
-ERROR HY000: Tablespace 'ts1' already exists
+ERROR HY000: Tablespace 'ts1' already exist
 DROP TABLESPACE ts1 ENGINE=falcon;
 CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
 DROP TABLESPACE ts1 ENGINE=falcon;
@@ -34,3 +34,5 @@ t1	CREATE TABLE `t1` (
 ) /*!50100 TABLESPACE `ts 1` */ ENGINE=Falcon DEFAULT CHARSET=latin1
 DROP TABLE t1;
 DROP TABLESPACE `ts 1` ENGINE=falcon;
+DROP TABLESPACE ts1 ENGINE=falcon;
+ERROR HY000: Tablespace 'ts1' doesn't exist
diff -Nrup a/mysql-test/suite/falcon/t/falcon_bug_29511.test b/mysql-test/suite/falcon/t/falcon_bug_29511.test
--- a/mysql-test/suite/falcon/t/falcon_bug_29511.test	2007-11-27 05:42:36 +04:00
+++ b/mysql-test/suite/falcon/t/falcon_bug_29511.test	2008-01-22 20:59:20 +04:00
@@ -9,7 +9,7 @@
 # ----------------------------------------------------- #
 
 --disable_warnings
---error 0,65433
+--error 0,ER_NO_SUCH_TABLESPACE
 DROP TABLESPACE tablespace1 Engine Falcon;
 --enable_warnings
 
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	2007-12-13 21:07:57 +04:00
+++ b/mysql-test/suite/falcon/t/falcon_ts.test	2008-01-22 20:59:20 +04:00
@@ -2,11 +2,9 @@
 
 --disable_warnings
 DROP TABLE IF EXISTS t1;
---enable_warnings
-
---disable_errors
+--error 0,ER_NO_SUCH_TABLESPACE
 DROP TABLESPACE ts1 ENGINE=falcon;
---enable_errors
+--enable_warnings
 
 #
 # BUG#31110 - falcon: missing engine check while dropping tablespace
@@ -53,3 +51,10 @@ CREATE TABLE t1(a INT) ENGINE=falcon TAB
 SHOW CREATE TABLE t1;
 DROP TABLE t1;
 DROP TABLESPACE `ts 1` ENGINE=falcon;
+
+#
+# BUG#33212 - DROP TABLESPACE does not fail on non-existing Falcon
+#             tablespace
+#
+--error ER_NO_SUCH_TABLESPACE
+DROP TABLESPACE ts1 ENGINE=falcon;
diff -Nrup a/sql/share/errmsg.txt b/sql/share/errmsg.txt
--- a/sql/share/errmsg.txt	2007-11-26 19:44:34 +04:00
+++ b/sql/share/errmsg.txt	2008-01-22 20:59:20 +04:00
@@ -6221,4 +6221,6 @@ ER_TRG_CANT_OPEN_TABLE
 ER_CANT_CREATE_SROUTINE
   eng "Cannot create stored routine `%-.64s`. Check warnings"
 ER_TABLESPACE_EXIST
-  eng "Tablespace '%-.192s' already exists"
+  eng "Tablespace '%-.192s' already exist"
+ER_NO_SUCH_TABLESPACE
+  eng "Tablespace '%-.192s' doesn't exist"
diff -Nrup a/sql/sql_tablespace.cc b/sql/sql_tablespace.cc
--- a/sql/sql_tablespace.cc	2007-11-15 03:00:50 +04:00
+++ b/sql/sql_tablespace.cc	2008-01-22 20:59:20 +04:00
@@ -52,6 +52,9 @@ int mysql_alter_tablespace(THD *thd, st_
         case HA_ERR_TABLESPACE_EXIST:
           my_error(ER_TABLESPACE_EXIST, MYF(0), ts_info->tablespace_name);
           break;
+        case HA_ERR_NO_SUCH_TABLESPACE:
+          my_error(ER_NO_SUCH_TABLESPACE, 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 00:48:59 +04:00
+++ b/storage/falcon/ha_falcon.cpp	2008-01-22 20:59:20 +04:00
@@ -1720,6 +1720,9 @@ int StorageInterface::getMySqlError(int 
 			return (HA_ERR_TO_BIG_ROW);
 			
 		case StorageErrorTableSpaceNotExist:
+			DBUG_PRINT("info", ("StorageErrorTableSpaceNotExist"));
+			return (HA_ERR_NO_SUCH_TABLESPACE);
+
 		case StorageErrorTableSpaceExist:
 			DBUG_PRINT("info", ("StorageErrorTableSpaceExist"));
 			return (HA_ERR_TABLESPACE_EXIST);
@@ -1954,9 +1957,6 @@ int StorageInterface::alter_tablespace(h
 
 		case DROP_TABLESPACE:
 			ret = storageHandler->deleteTablespace(ts_info->tablespace_name);
-			
-			if (ret == StorageErrorTableSpaceNotExist)
-				ret = 0;
 			break;
 
 		default:
Thread
bk commit into 6.0 tree (svoj:1.2778) BUG#33212Sergey Vojtovich22 Jan