List:Commits« Previous MessageNext Message »
From:justin.he Date:March 13 2007 11:01am
Subject:bk commit into 5.1 tree (Justin.He:1.2444) BUG#25295
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of justin.he. When justin.he 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, 2007-03-13 18:00:59+08:00, Justin.He@stripped +1 -0
  Bug#25295, ALTER TABLE operations for NDB tables require inclusion of ENGINE=ndbcluster.
  this patch of bug25295 depends on bug25877 and bug25880

  sql/ha_ndbcluster.cc@stripped, 2007-03-13 18:00:56+08:00, Justin.He@stripped
+30 -0
    add check for storage media changes between old and new table when do 'alter table
...'

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	Justin.He
# Host:	dev3-240.dev.cn.tlan
# Root:	/home/justin.he/mysql/mysql-5.1/bug25295-5.1-new-ndb-bj

--- 1.410/sql/ha_ndbcluster.cc	2007-03-13 18:01:06 +08:00
+++ 1.411/sql/ha_ndbcluster.cc	2007-03-13 18:01:06 +08:00
@@ -10641,6 +10641,36 @@
     if (field->flags & FIELD_IN_ADD_INDEX)
       ai=1;
   }
+
+  char tablespace_name[FN_LEN]; 
+  if (get_tablespace_name(current_thd, tablespace_name, FN_LEN))
+  {
+    if (create_info->tablespace) 
+    {
+      if (strcmp(create_info->tablespace, tablespace_name))
+      {
+        DBUG_PRINT("info", ("storage media is changed, old tablespace=%s, new
tablespace=%s",
+          tablespace_name, create_info->tablespace));
+        DBUG_RETURN(COMPATIBLE_DATA_NO);
+      }
+    }
+    else
+    {
+      DBUG_PRINT("info", ("storage media is changed, old is DISK and tablespace=%s, new
is MEM",
+        tablespace_name));
+      DBUG_RETURN(COMPATIBLE_DATA_NO);
+    }
+  }
+  else
+  {
+    if (create_info->storage_media != HA_SM_MEMORY)
+    {
+      DBUG_PRINT("info", ("storage media is changed, old is MEM, new is DISK and
tablespace=%s",
+        create_info->tablespace));
+      DBUG_RETURN(COMPATIBLE_DATA_NO);
+    }
+  }
+
   if (table_changes != IS_EQUAL_YES)
     DBUG_RETURN(COMPATIBLE_DATA_NO);
   
Thread
bk commit into 5.1 tree (Justin.He:1.2444) BUG#25295justin.he13 Mar