List:Commits« Previous MessageNext Message »
From:jonas Date:January 11 2006 8:21am
Subject:bk commit into 5.1 tree (jonas:1.2001)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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.2001 06/01/11 09:21:35 jonas@stripped +5 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
  into  perch.ndb.mysql.com:/home/jonas/src/51-dd

  sql/mysql_priv.h
    1.349 06/01/11 09:21:31 jonas@stripped +0 -0
    Auto merged

  sql/handler.h
    1.174 06/01/11 09:21:31 jonas@stripped +0 -0
    Auto merged

  sql/ha_partition.cc
    1.20 06/01/11 09:21:31 jonas@stripped +0 -0
    Auto merged

  sql/ha_ndbcluster.h
    1.102 06/01/11 09:21:31 jonas@stripped +0 -0
    Auto merged

  sql/ha_ndbcluster.cc
    1.224 06/01/11 09:21:31 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/51-dd/RESYNC

--- 1.173/sql/handler.h	2006-01-09 15:59:56 +01:00
+++ 1.174/sql/handler.h	2006-01-11 09:21:31 +01:00
@@ -571,6 +571,19 @@
   PART_ADDED= 6
 };
 
+typedef struct {
+  ulonglong data_file_length;
+  ulonglong max_data_file_length;
+  ulonglong index_file_length;
+  ulonglong delete_length;
+  ha_rows records;
+  ulong mean_rec_length;
+  time_t create_time;
+  time_t check_time;
+  time_t update_time;
+  ulonglong check_sum;
+} PARTITION_INFO;
+
 #define UNDEF_NODEGROUP 65535
 class Item;
 
@@ -1306,6 +1319,8 @@
     { return (ha_rows) 10; }
   virtual void position(const byte *record)=0;
   virtual void info(uint)=0; // see my_base.h for full description
+  virtual void get_dynamic_partition_info(PARTITION_INFO *stat_info,
+                                          uint part_id);
   virtual int extra(enum ha_extra_function operation)
   { return 0; }
   virtual int extra_opt(enum ha_extra_function operation, ulong cache_size)

--- 1.348/sql/mysql_priv.h	2006-01-09 14:39:37 +01:00
+++ 1.349/sql/mysql_priv.h	2006-01-11 09:21:31 +01:00
@@ -890,6 +890,7 @@
 
 /* information schema */
 extern LEX_STRING information_schema_name;
+const extern LEX_STRING partition_keywords[];
 LEX_STRING *make_lex_string(THD *thd, LEX_STRING *lex_str,
                             const char* str, uint length,
                             bool allocate_lex_string);

--- 1.223/sql/ha_ndbcluster.cc	2006-01-10 10:39:15 +01:00
+++ 1.224/sql/ha_ndbcluster.cc	2006-01-11 09:21:31 +01:00
@@ -3124,6 +3124,20 @@
   DBUG_VOID_RETURN;
 }
 
+
+void ha_ndbcluster::get_dynamic_partition_info(PARTITION_INFO *stat_info,
+                                               uint part_id)
+{
+  /* 
+     This functions should be fixed. Suggested fix: to
+     implement ndb function which retrives the statistics
+     about ndb partitions.
+  */
+  bzero((char*) stat_info, sizeof(PARTITION_INFO));
+  return;
+}
+
+
 int ha_ndbcluster::extra(enum ha_extra_function operation)
 {
   DBUG_ENTER("extra");

--- 1.101/sql/ha_ndbcluster.h	2006-01-09 14:39:37 +01:00
+++ 1.102/sql/ha_ndbcluster.h	2006-01-11 09:21:31 +01:00
@@ -523,6 +523,7 @@
 
   bool get_error_message(int error, String *buf);
   void info(uint);
+  void get_dynamic_partition_info(PARTITION_INFO *stat_info, uint part_id);
   int extra(enum ha_extra_function operation);
   int extra_opt(enum ha_extra_function operation, ulong cache_size);
   int external_lock(THD *thd, int lock_type);

--- 1.19/sql/ha_partition.cc	2006-01-04 16:30:55 +01:00
+++ 1.20/sql/ha_partition.cc	2006-01-11 09:21:31 +01:00
@@ -2445,6 +2445,29 @@
 }
 
 
+void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info,
+                                              uint part_id)
+{
+  handler *file= m_file[part_id];
+  file->info(HA_STATUS_CONST | HA_STATUS_TIME | HA_STATUS_VARIABLE |
+             HA_STATUS_NO_LOCK);
+
+  stat_info->records= file->records;
+  stat_info->mean_rec_length= file->mean_rec_length;
+  stat_info->data_file_length= file->data_file_length;
+  stat_info->max_data_file_length= file->max_data_file_length;
+  stat_info->index_file_length= file->index_file_length;
+  stat_info->delete_length= file->delete_length;
+  stat_info->create_time= file->create_time;
+  stat_info->update_time= file->update_time;
+  stat_info->check_time= file->check_time;
+  stat_info->check_sum= 0;
+  if (file->table_flags() & (ulong) HA_HAS_CHECKSUM)
+    stat_info->check_sum= file->checksum();
+  return;
+}
+
+
 /*
   extra() is called whenever the server wishes to send a hint to
   the storage engine. The MyISAM engine implements the most hints.
Thread
bk commit into 5.1 tree (jonas:1.2001)jonas11 Jan