MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:justin.he Date:March 5 2007 11:15am
Subject:bk commit into 5.1 tree (Justin.He:1.2441) BUG#25877
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-05 19:14:56+08:00, Justin.He@stripped +1 -0
  BUG#25877, After DROP INDEX non-indexed data isn't moved from memory into tablespace

  sql/ha_ndbcluster.cc@stripped, 2007-03-05 19:14:53+08:00, Justin.He@stripped +13 -0
    add/drop index online will change storage media type, 
    so add storage type check in check_if_incompatible_data(),
    when storage type is changed, will create a new table,
    then this can correct the column and table's storage type.

# 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/bug25877-5.1-new-ndb-bj

--- 1.408/sql/ha_ndbcluster.cc	2007-03-05 19:15:03 +08:00
+++ 1.409/sql/ha_ndbcluster.cc	2007-03-05 19:15:04 +08:00
@@ -10606,10 +10606,23 @@
 
   int pk= 0;
   int ai= 0;
+
+  if (create_info->tablespace)
+    create_info->storage_media = HA_SM_DISK;
+  else
+    create_info->storage_media = HA_SM_MEMORY;
+
   for (i= 0; i < table->s->fields; i++) 
   {
     Field *field= table->field[i];
     const NDBCOL *col= tab->getColumn(i);
+    if (col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY ||
+        col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK)
+    {
+      DBUG_PRINT("info", ("Column storage media is changed"));
+      DBUG_RETURN(COMPATIBLE_DATA_NO);
+    }
+    
     if (field->flags & FIELD_IS_RENAMED)
     {
       DBUG_PRINT("info", ("Field has been renamed, copy table"));
Thread
bk commit into 5.1 tree (Justin.He:1.2441) BUG#25877justin.he5 Mar