MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Martin Skold Date:September 13 2006 4:49pm
Subject:bk commit into 4.1 tree (mskold:1.2541) BUG#21378
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of marty. When marty 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, 2006-09-13 18:49:05+02:00, mskold@stripped +1 -0
  Bug #21378  Alter table from X storage engine to NDB could cause data loss: skip autodiscover of local tables

  sql/ha_ndbcluster.cc@stripped, 2006-09-13 18:48:22+02:00, mskold@stripped +7 -1
    Bug #21378  Alter table from X storage engine to NDB could cause data loss: skip autodiscover of local tables

# 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:	mskold
# Host:	linux.site
# Root:	/windows/Linux_space/MySQL/mysql-4.1

--- 1.192/sql/ha_ndbcluster.cc	2006-09-13 18:49:12 +02:00
+++ 1.193/sql/ha_ndbcluster.cc	2006-09-13 18:49:12 +02:00
@@ -4720,7 +4720,6 @@ int ndbcluster_find_files(THD *thd,const
     if (hash_search(&ndb_tables, file_name, strlen(file_name)))
     {
       DBUG_PRINT("info", ("%s existed in NDB _and_ on disk ", file_name));
-      // File existed in NDB and as frm file, put in ok_tables list
       file_on_disk= true;
     }
     
@@ -4733,14 +4732,21 @@ int ndbcluster_find_files(THD *thd,const
       DBUG_PRINT("info", ("%s did not exist on disk", name));     
       // .ndb file did not exist on disk, another table type
       if (file_on_disk)
+      {
+	// Ignore this ndb table
+	gptr record=  hash_search(&ndb_tables, file_name, strlen(file_name));
+	DBUG_ASSERT(record);
+	hash_delete(&ndb_tables, record);
 	push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			    ER_TABLE_EXISTS_ERROR,
 			    "Local table %s.%s shadows ndb table",
 			    db, file_name);
+      }
       continue;
     }
     if (file_on_disk) 
     {
+      // File existed in NDB and as frm file, put in ok_tables list
       my_hash_insert(&ok_tables, (byte*)file_name);
       continue;
     }
Thread
bk commit into 4.1 tree (mskold:1.2541) BUG#21378Martin Skold13 Sep