List:Internals« Previous MessageNext Message »
From:jonas Date:September 20 2005 12:22pm
Subject:bk commit into 5.0 tree (jonas:1.1981)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas 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.1981 05/09/20 12:22:31 jonas@stripped +1 -0
  Merge joreland@stripped:/home/bk/mysql-5.0
  into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push

  sql/ha_ndbcluster.cc
    1.207 05/09/20 12:22:27 jonas@stripped +0 -0
    Auto merged

# 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:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/mysql-5.0-push/RESYNC

--- 1.206/sql/ha_ndbcluster.cc	2005-09-19 21:06:19 +02:00
+++ 1.207/sql/ha_ndbcluster.cc	2005-09-20 12:22:27 +02:00
@@ -7392,4 +7392,49 @@
   DBUG_RETURN(0);
 }
 
+int
+ndbcluster_show_status(THD* thd)
+{
+  Protocol *protocol= thd->protocol;
+  
+  DBUG_ENTER("ndbcluster_show_status");
+  
+  if (have_ndbcluster != SHOW_OPTION_YES) 
+  {
+    my_message(ER_NOT_SUPPORTED_YET,
+	       "Cannot call SHOW NDBCLUSTER STATUS because skip-ndbcluster is defined",
+	       MYF(0));
+    DBUG_RETURN(TRUE);
+  }
+  
+  List<Item> field_list;
+  field_list.push_back(new Item_empty_string("free_list", 255));
+  field_list.push_back(new Item_return_int("created", 10,MYSQL_TYPE_LONG));
+  field_list.push_back(new Item_return_int("free", 10,MYSQL_TYPE_LONG));
+  field_list.push_back(new Item_return_int("sizeof", 10,MYSQL_TYPE_LONG));
+
+  if (protocol->send_fields(&field_list, 1))
+    DBUG_RETURN(TRUE);
+  
+  if (get_thd_ndb(thd) && get_thd_ndb(thd)->ndb)
+  {
+    Ndb* ndb= (get_thd_ndb(thd))->ndb;
+    Ndb::Free_list_usage tmp; tmp.m_name= 0;
+    while (ndb->get_free_list_usage(&tmp))
+    {
+      protocol->prepare_for_resend();
+      
+      protocol->store(tmp.m_name, &my_charset_bin);
+      protocol->store((uint)tmp.m_created);
+      protocol->store((uint)tmp.m_free);
+      protocol->store((uint)tmp.m_sizeof);
+      if (protocol->write())
+	DBUG_RETURN(TRUE);
+    }
+  }
+  send_eof(thd);
+  
+  DBUG_RETURN(FALSE);
+}
+
 #endif /* HAVE_NDBCLUSTER_DB */
Thread
bk commit into 5.0 tree (jonas:1.1981)jonas20 Sep