MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tomas Date:May 11 2007 6:11am
Subject:bk commit into 5.1 tree (tomas:1.2515)
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-05-11 08:11:48+02:00, tomas@stripped +1 -0
  Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
  into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
  MERGE: 1.1810.2870.42

  sql/ha_ndbcluster.cc@stripped, 2007-05-11 08:11:45+02:00, tomas@stripped +9 -2
    manual merge
    MERGE: 1.175.1.137

# 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-single-user/RESYNC

--- 1.447/sql/ha_ndbcluster.cc	2007-05-10 07:16:59 +02:00
+++ 1.448/sql/ha_ndbcluster.cc	2007-05-11 08:11:45 +02:00
@@ -6263,23 +6263,23 @@
   set_dbname(name);
   set_tabname(name);
   
-  if (check_ndb_connection())
+  if ((res= check_ndb_connection()) ||
+      (res= get_metadata(name)))
   {
     /* ndb_share reference handler free */
     DBUG_PRINT("NDB_SHARE", ("%s handler free  use_count: %u",
                              m_share->key, m_share->use_count));
     free_share(&m_share);
     m_share= 0;
-    DBUG_RETURN(HA_ERR_NO_CONNECTION);
+    DBUG_RETURN(res);
   }
-  
-  res= get_metadata(name);
-  if (!res)
+  while (1)
   {
     Ndb *ndb= get_ndb();
     if (ndb->setDatabaseName(m_dbname))
     {
-      ERR_RETURN(ndb->getNdbError());
+      res= ndb_to_mysql_error(&ndb->getNdbError());
+      break;
     }
     struct Ndb_statistics stat;
     res= ndb_get_table_statistics(NULL, FALSE, ndb, m_table, &stat);
@@ -6288,14 +6288,20 @@
     stats.records= stat.row_count;
     if(!res)
       res= info(HA_STATUS_CONST);
+    break;
+  }
+  if (res)
+  {
+    free_share(m_share);
+    m_share= 0;
+    release_metadata();
+    DBUG_RETURN(res);
   }
-
 #ifdef HAVE_NDB_BINLOG
   if (!ndb_binlog_tables_inited && ndb_binlog_running)
     table->db_stat|= HA_READ_ONLY;
 #endif
-
-  DBUG_RETURN(res);
+  DBUG_RETURN(0);
 }
 
 /*
Thread
bk commit into 5.1 tree (tomas:1.2515)tomas11 May