List:Commits« Previous MessageNext Message »
From:tomas Date:February 2 2006 12:24am
Subject:bk commit into 5.1 tree (tomas:1.2125)
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
  1.2125 06/02/02 00:24:42 tomas@stripped +1 -0
  bug, added error handling to information_schema files

  sql/ha_ndbcluster.cc
    1.256 06/02/02 00:24:35 tomas@stripped +46 -24
    bug, added error handling to information_schema files

# 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:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-release

--- 1.255/sql/ha_ndbcluster.cc	2006-02-01 22:37:19 +01:00
+++ 1.256/sql/ha_ndbcluster.cc	2006-02-02 00:24:35 +01:00
@@ -9608,10 +9608,14 @@
   Ndb *ndb= check_ndb_in_thd(thd);
   NdbDictionary::Dictionary* dict= ndb->getDictionary();
   NdbDictionary::Dictionary::List dflist;
+  NdbError ndberr;
 
-  dict->listObjects(dflist,NdbDictionary::Object::Datafile);
+  dict->listObjects(dflist, NdbDictionary::Object::Datafile);
+  ndberr= dict->getNdbError();
+  if (ndberr.classification != ndberror_cl_none)
+    return 0;
 
-  for(unsigned i= 0;i < dflist.count;i++)
+  for (unsigned i= 0; i < dflist.count; i++)
   {
     NdbDictionary::Dictionary::List::Element& elt = dflist.elements[i];
     Ndb_cluster_connection_node_iter iter;
@@ -9619,21 +9623,28 @@
 
     g_ndb_cluster_connection->init_get_next_node(iter);
 
-    while(id= g_ndb_cluster_connection->get_next_node(iter))
+    while (id= g_ndb_cluster_connection->get_next_node(iter))
     {
       NdbDictionary::Datafile df= dict->getDatafile(id, elt.name);
-      int c=0;
+      ndberr= dict->getNdbError();
+      if(ndberr.classification != ndberror_cl_none)
+        continue;
+      NdbDictionary::Tablespace ts= dict->getTablespace(df.getTablespace());
+      ndberr= dict->getNdbError();
+      if (ndberr.classification != ndberror_cl_none)
+        continue;
+
+      int c= 0;
       table->field[c++]->set_null(); // FILE_ID
-      table->field[c++]->store(elt.name,strlen(elt.name),system_charset_info);
+      table->field[c++]->store(elt.name, strlen(elt.name),
+                               system_charset_info);
       table->field[c++]->store("DATAFILE",8,system_charset_info);
-      table->field[c++]->store(df.getTablespace(),strlen(df.getTablespace()),
+      table->field[c++]->store(df.getTablespace(), strlen(df.getTablespace()),
                                system_charset_info);
       table->field[c++]->set_null(); // TABLE_CATALOG
       table->field[c++]->set_null(); // TABLE_SCHEMA
       table->field[c++]->set_null(); // TABLE_NAME
 
-      NdbDictionary::Tablespace ts= dict->getTablespace(df.getTablespace());
-
       // LOGFILE_GROUP_NAME
       table->field[c++]->store(ts.getDefaultLogfileGroup(),
                                strlen(ts.getDefaultLogfileGroup()),
@@ -9662,7 +9673,7 @@
 
       table->field[c++]->store(df.getObjectVersion()); // VERSION
 
-      table->field[c++]->store("FIXED",5,system_charset_info); // ROW_FORMAT
+      table->field[c++]->store("FIXED", 5, system_charset_info); // ROW_FORMAT
 
       table->field[c++]->set_null(); // TABLE_ROWS
       table->field[c++]->set_null(); // AVG_ROW_LENGTH
@@ -9675,40 +9686,50 @@
       table->field[c++]->set_null(); // CHECK_TIME
       table->field[c++]->set_null(); // CHECKSUM
 
-      table->field[c++]->store("NORMAL",6, system_charset_info);
+      table->field[c++]->store("NORMAL", 6, system_charset_info);
 
       char extra[30];
-      int len= my_snprintf(extra,sizeof(extra),"CLUSTER_NODE=%u",id);
-      table->field[c]->store(extra,len,system_charset_info);
+      int len= my_snprintf(extra, sizeof(extra), "CLUSTER_NODE=%u", id);
+      table->field[c]->store(extra, len, system_charset_info);
       schema_table_store_record(thd, table);
     }
   }
 
-  dict->listObjects(dflist,NdbDictionary::Object::Undofile);
+  dict->listObjects(dflist, NdbDictionary::Object::Undofile);
+  ndberr= dict->getNdbError();
+  if (ndberr.classification != ndberror_cl_none)
+    return 0;
 
-  for(unsigned i= 0;i < dflist.count;i++)
+  for (unsigned i= 0; i < dflist.count; i++)
   {
-    NdbDictionary::Dictionary::List::Element& elt = dflist.elements[i];
+    NdbDictionary::Dictionary::List::Element& elt= dflist.elements[i];
     Ndb_cluster_connection_node_iter iter;
     unsigned id;
 
     g_ndb_cluster_connection->init_get_next_node(iter);
 
-    while(id= g_ndb_cluster_connection->get_next_node(iter))
+    while (id= g_ndb_cluster_connection->get_next_node(iter))
     {
       NdbDictionary::Undofile uf= dict->getUndofile(id, elt.name);
-      int c=0;
+      ndberr= dict->getNdbError();
+      if (ndberr.classification != ndberror_cl_none)
+        continue;
+      NdbDictionary::LogfileGroup lfg=
+        dict->getLogfileGroup(uf.getLogfileGroup());
+      ndberr= dict->getNdbError();
+      if (ndberr.classification != ndberror_cl_none)
+        continue;
+
+      int c= 0;
       table->field[c++]->set_null(); // FILE_ID
-      table->field[c++]->store(elt.name,strlen(elt.name),system_charset_info);
-      table->field[c++]->store("UNDO LOG",8,system_charset_info);
+      table->field[c++]->store(elt.name, strlen(elt.name),
+                               system_charset_info);
+      table->field[c++]->store("UNDO LOG", 8, system_charset_info);
       table->field[c++]->set_null(); // TABLESPACE NAME
       table->field[c++]->set_null(); // TABLE_CATALOG
       table->field[c++]->set_null(); // TABLE_SCHEMA
       table->field[c++]->set_null(); // TABLE_NAME
 
-      NdbDictionary::LogfileGroup lfg=
-        dict->getLogfileGroup(uf.getLogfileGroup());
-
       // LOGFILE_GROUP_NAME
       table->field[c++]->store(uf.getLogfileGroup(),
                                strlen(uf.getLogfileGroup()),
@@ -9750,12 +9771,13 @@
       table->field[c++]->set_null(); // CHECK_TIME
       table->field[c++]->set_null(); // CHECKSUM
 
-      table->field[c++]->store("NORMAL",6, system_charset_info);
+      table->field[c++]->store("NORMAL", 6, system_charset_info);
 
       char extra[30];
       int len= my_snprintf(extra,sizeof(extra),"CLUSTER_NODE=%u",id);
-      table->field[c]->store(extra,len,system_charset_info);
+      table->field[c]->store(extra, len, system_charset_info);
       schema_table_store_record(thd, table);
     }
   }
+  return 0;
 }
Thread
bk commit into 5.1 tree (tomas:1.2125)tomas1 Feb