List:Commits« Previous MessageNext Message »
From:tomas Date:August 28 2007 1:43pm
Subject:bk commit into 5.1 tree (tomas:1.2583) BUG#30667
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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-08-28 15:43:06+02:00, tomas@stripped +2 -0
  Bug #30667 ndb table discovery does not work correcly with information schema
  - the listed file_names are not necessarily on disk, so we need to discover them if they aren't

  mysql-test/t/ndb_restore.test@stripped, 2007-08-28 15:43:02+02:00, tomas@stripped +5 -0
    Bug #30667 ndb table discovery does not work correcly with information schema

  sql/ha_ndbcluster.cc@stripped, 2007-08-28 15:43:03+02:00, tomas@stripped +18 -1
    Bug #30667 ndb table discovery does not work correcly with information schema
    - the listed file_names are not necessarily on disk, so we need to discover them if they aren't

# 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:	tomas
# Host:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new-ndb

--- 1.464/sql/ha_ndbcluster.cc	2007-08-13 17:51:47 +02:00
+++ 1.465/sql/ha_ndbcluster.cc	2007-08-28 15:43:03 +02:00
@@ -6955,9 +6955,26 @@
   while ((file_name=it++))
   {
     bool file_on_disk= FALSE;
-    DBUG_PRINT("info", ("%s", file_name));     
+    DBUG_PRINT("info", ("%s", file_name));
     if (hash_search(&ndb_tables, file_name, strlen(file_name)))
     {
+      build_table_filename(name, sizeof(name), db, file_name, reg_ext, 0);
+      if (my_access(name, F_OK))
+      {
+        pthread_mutex_lock(&LOCK_open);
+        DBUG_PRINT("info", ("Table %s listed and need discovery",
+                            file_name));
+        if (ndb_create_table_from_engine(thd, db, file_name))
+        {
+          pthread_mutex_unlock(&LOCK_open);
+          push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+                              ER_TABLE_EXISTS_ERROR,
+                              "Discover of table %s.%s failed",
+                              db, file_name);
+          continue;
+        }
+        pthread_mutex_unlock(&LOCK_open);
+      }
       DBUG_PRINT("info", ("%s existed in NDB _and_ on disk ", file_name));
       file_on_disk= TRUE;
     }

--- 1.29/mysql-test/t/ndb_restore.test	2007-06-17 22:04:25 +02:00
+++ 1.30/mysql-test/t/ndb_restore.test	2007-08-28 15:43:02 +02:00
@@ -180,6 +180,11 @@
 --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart
 --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart
 
+# Bug #30667
+# ndb table discovery does not work correcly with information schema
+# - prior to bug fix this would yeild no output and a warning
+select * from information_schema.columns where table_name = "t1_c";
+
 # random output order??
 #show tables;
 
Thread
bk commit into 5.1 tree (tomas:1.2583) BUG#30667tomas28 Aug