List:Commits« Previous MessageNext Message »
From:Stewart Smith Date:October 5 2006 2:56pm
Subject:bk commit into 4.1 tree (stewart:1.2537) BUG#19914
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of stewart. When stewart 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, 2006-10-06 00:56:12+10:00, stewart@willster.(none) +30 -0
  BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
  
  allow handler::info to return an error code (that will be returned to the user)
  including post-review fixes as indicated by Serg.
  
  manual testing of error cases done in 5.0 due to support for DBUG_EXECUTE_IF
  to insert errors.

  sql/examples/ha_archive.cc@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +2 -2
    update handler::info interface to return int

  sql/examples/ha_archive.h@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/examples/ha_example.cc@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +2 -2
    update handler::info interface to return int

  sql/examples/ha_example.h@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/examples/ha_tina.cc@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +2 -2
    update handler::info interface to return int

  sql/examples/ha_tina.h@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_berkeley.cc@stripped, 2006-10-06 00:56:08+10:00, stewart@willster.(none) +2 -2
    update handler::info interface to return int

  sql/ha_berkeley.h@stripped, 2006-10-06 00:56:08+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_blackhole.cc@stripped, 2006-10-06 00:56:08+10:00, stewart@willster.(none) +2 -2
    update handler::info interface to return int

  sql/ha_blackhole.h@stripped, 2006-10-06 00:56:08+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_heap.cc@stripped, 2006-10-06 00:56:08+10:00, stewart@willster.(none) +2 -1
    update handler::info interface to return int

  sql/ha_heap.h@stripped, 2006-10-06 00:56:08+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_innodb.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +3 -3
    update handler::info interface to return int

  sql/ha_innodb.h@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_isam.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +2 -1
    update handler::info interface to return int

  sql/ha_isam.h@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_isammrg.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +2 -1
    update handler::info interface to return int

  sql/ha_isammrg.h@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_myisam.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +3 -1
    update handler::info interface to return int

  sql/ha_myisam.h@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_myisammrg.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +2 -1
    update handler::info interface to return int

  sql/ha_myisammrg.h@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/ha_ndbcluster.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +16 -9
    update handler::info interface to return int

  sql/ha_ndbcluster.h@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +2 -2
    update handler::info interface to return int

  sql/handler.h@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +1 -1
    update handler::info interface to return int

  sql/item_sum.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +9 -1
    update for handler::info() now returning int.
    
    return error to user if info call fails

  sql/opt_sum.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +6 -1
    If we get an error when using handler::info to get count(*),
    print and return the error.

  sql/sql_delete.cc@stripped, 2006-10-06 00:56:09+10:00, stewart@willster.(none) +6 -1
    update for handler::info() now returning int.
    
    return error to user if info call fails

  sql/sql_select.cc@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +8 -1
    if error, set fatal error.

  sql/sql_union.cc@stripped, 2006-10-06 00:56:10+10:00, stewart@willster.(none) +6 -1
    update for handler::info() now returning int.
    
    return error to user if info call fails

# 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:	stewart
# Host:	willster.(none)
# Root:	/home/stewart/Documents/MySQL/4.1/bug19914-mk2-goodmerge

--- 1.153/sql/ha_berkeley.cc	2006-10-06 00:56:16 +10:00
+++ 1.154/sql/ha_berkeley.cc	2006-10-06 00:56:16 +10:00
@@ -1715,7 +1715,7 @@
 }
 
 
-void ha_berkeley::info(uint flag)
+int ha_berkeley::info(uint flag)
 {
   DBUG_ENTER("ha_berkeley::info");
   if (flag & HA_STATUS_VARIABLE)
@@ -1735,7 +1735,7 @@
   /* Don't return key if we got an error for the internal primary key */
   if (flag & HA_STATUS_ERRKEY && last_dup_key < table->keys)
     errkey= last_dup_key;
-  DBUG_VOID_RETURN;
+  DBUG_RETURN(0);
 }
 
 

--- 1.69/sql/ha_berkeley.h	2006-10-06 00:56:16 +10:00
+++ 1.70/sql/ha_berkeley.h	2006-10-06 00:56:16 +10:00
@@ -127,7 +127,7 @@
   int rnd_next(byte *buf);
   int rnd_pos(byte * buf, byte *pos);
   void position(const byte *record);
-  void info(uint);
+  int info(uint);
   int extra(enum ha_extra_function operation);
   int reset(void);
   int external_lock(THD *thd, int lock_type);

--- 1.60/sql/ha_heap.cc	2006-10-06 00:56:16 +10:00
+++ 1.61/sql/ha_heap.cc	2006-10-06 00:56:16 +10:00
@@ -282,7 +282,7 @@
   *(HEAP_PTR*) ref= heap_position(file);	// Ref is aligned
 }
 
-void ha_heap::info(uint flag)
+int ha_heap::info(uint flag)
 {
   HEAPINFO info;
   (void) heap_info(file,&info,flag);
@@ -304,6 +304,7 @@
   */
   if (key_stat_version != file->s->key_stat_version)
     update_key_stats();
+  return 0;
 }
 
 int ha_heap::extra(enum ha_extra_function operation)

--- 1.34/sql/ha_heap.h	2006-10-06 00:56:16 +10:00
+++ 1.35/sql/ha_heap.h	2006-10-06 00:56:16 +10:00
@@ -80,7 +80,7 @@
   int rnd_next(byte *buf);
   int rnd_pos(byte * buf, byte *pos);
   void position(const byte *record);
-  void info(uint);
+  int info(uint);
   int extra(enum ha_extra_function operation);
   int external_lock(THD *thd, int lock_type);
   int delete_all_rows(void);

--- 1.34/sql/ha_isam.cc	2006-10-06 00:56:16 +10:00
+++ 1.35/sql/ha_isam.cc	2006-10-06 00:56:16 +10:00
@@ -178,7 +178,7 @@
   ha_store_ptr(ref, ref_length, position);
 }
 
-void ha_isam::info(uint flag)
+int ha_isam::info(uint flag)
 {
   N_ISAMINFO info;
   (void) nisam_info(file,&info,flag);
@@ -224,6 +224,7 @@
   }
   if (flag & HA_STATUS_TIME)
     update_time = info.update_time;
+  return 0;
 }
 
 

--- 1.29/sql/ha_isam.h	2006-10-06 00:56:16 +10:00
+++ 1.30/sql/ha_isam.h	2006-10-06 00:56:16 +10:00
@@ -67,7 +67,7 @@
   int rnd_next(byte *buf);
   int rnd_pos(byte * buf, byte *pos);
   void position(const byte *record);
-  void info(uint);
+  int info(uint);
   int extra(enum ha_extra_function operation);
   int external_lock(THD *thd, int lock_type);
   ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);

--- 1.20/sql/ha_isammrg.cc	2006-10-06 00:56:16 +10:00
+++ 1.21/sql/ha_isammrg.cc	2006-10-06 00:56:16 +10:00
@@ -149,7 +149,7 @@
 }
 
 
-void ha_isammrg::info(uint flag)
+int ha_isammrg::info(uint flag)
 {
   MERGE_INFO info;
   (void) mrg_info(file,&info,flag);
@@ -163,6 +163,7 @@
   block_size=0;
   update_time=0;
   ref_length=4;					// Should be big enough
+  return 0;
 }
 
 

--- 1.23/sql/ha_isammrg.h	2006-10-06 00:56:16 +10:00
+++ 1.24/sql/ha_isammrg.h	2006-10-06 00:56:16 +10:00
@@ -58,7 +58,7 @@
   int rnd_next(byte *buf);
   int rnd_pos(byte * buf, byte *pos);
   void position(const byte *record);
-  void info(uint);
+  int info(uint);
   int extra(enum ha_extra_function operation);
   int external_lock(THD *thd, int lock_type);
   uint lock_count(void) const;

--- 1.162/sql/ha_myisam.cc	2006-10-06 00:56:16 +10:00
+++ 1.163/sql/ha_myisam.cc	2006-10-06 00:56:16 +10:00
@@ -1214,7 +1214,7 @@
   ha_store_ptr(ref, ref_length, position);
 }
 
-void ha_myisam::info(uint flag)
+int ha_myisam::info(uint flag)
 {
   MI_ISAMINFO info;
   char name_buff[FN_REFLEN];
@@ -1273,6 +1273,8 @@
     update_time = info.update_time;
   if (flag & HA_STATUS_AUTO)
     auto_increment_value= info.auto_increment;
+
+  return 0;
 }
 
 

--- 1.64/sql/ha_myisam.h	2006-10-06 00:56:16 +10:00
+++ 1.65/sql/ha_myisam.h	2006-10-06 00:56:16 +10:00
@@ -100,7 +100,7 @@
   int rnd_pos(byte * buf, byte *pos);
   int restart_rnd_next(byte *buf, byte *pos);
   void position(const byte *record);
-  void info(uint);
+  int info(uint);
   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.62/sql/ha_myisammrg.cc	2006-10-06 00:56:16 +10:00
+++ 1.63/sql/ha_myisammrg.cc	2006-10-06 00:56:16 +10:00
@@ -218,7 +218,7 @@
 }
 
 
-void ha_myisammrg::info(uint flag)
+int ha_myisammrg::info(uint flag)
 {
   MYMERGE_INFO info;
   (void) myrg_status(file,&info,flag);
@@ -253,6 +253,7 @@
 	     (char*) info.rec_per_key,
 	     sizeof(table->key_info[0].rec_per_key)*table->key_parts);
   }
+  return 0;
 }
 
 

--- 1.38/sql/ha_myisammrg.h	2006-10-06 00:56:16 +10:00
+++ 1.39/sql/ha_myisammrg.h	2006-10-06 00:56:16 +10:00
@@ -71,7 +71,7 @@
   int rnd_pos(byte * buf, byte *pos);
   void position(const byte *record);
   ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
-  void info(uint);
+  int info(uint);
   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.144/sql/handler.h	2006-10-06 00:56:16 +10:00
+++ 1.145/sql/handler.h	2006-10-06 00:56:16 +10:00
@@ -394,7 +394,7 @@
                                    key_range *max_key)
     { return (ha_rows) 10; }
   virtual void position(const byte *record)=0;
-  virtual void info(uint)=0;
+  virtual int info(uint)=0;
   virtual int extra(enum ha_extra_function operation)
   { return 0; }
   virtual int extra_opt(enum ha_extra_function operation, ulong cache_size)

--- 1.148/sql/item_sum.cc	2006-10-06 00:56:16 +10:00
+++ 1.149/sql/item_sum.cc	2006-10-06 00:56:16 +10:00
@@ -1410,12 +1410,20 @@
 
 longlong Item_sum_count_distinct::val_int()
 {
+  int error;
   DBUG_ASSERT(fixed == 1);
   if (!table)					// Empty query
     return LL(0);
   if (use_tree)
     return tree->elements_in_tree;
-  table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+
+  error= table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+
+  if(error)
+  {
+    table->file->print_error(error, MYF(0));
+  }
+
   return table->file->records;
 }
 

--- 1.48/sql/opt_sum.cc	2006-10-06 00:56:16 +10:00
+++ 1.49/sql/opt_sum.cc	2006-10-06 00:56:16 +10:00
@@ -125,7 +125,12 @@
     }
     else
     {
-      tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+      error= tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+      if(error)
+      {
+        tl->table->file->print_error(error, MYF(0));
+        return error;
+      }
       count*= tl->table->file->records;
     }
   }

--- 1.139/sql/sql_delete.cc	2006-10-06 00:56:16 +10:00
+++ 1.140/sql/sql_delete.cc	2006-10-06 00:56:16 +10:00
@@ -43,7 +43,12 @@
   if ((open_and_lock_tables(thd, table_list)))
     DBUG_RETURN(-1);
   table= table_list->table;
-  table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+  error= table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+  if (error)
+  {
+    table->file->print_error(error, MYF(0));
+    DBUG_RETURN(error);
+  }
   thd->proc_info="init";
   table->map=1;
 

--- 1.464/sql/sql_select.cc	2006-10-06 00:56:16 +10:00
+++ 1.465/sql/sql_select.cc	2006-10-06 00:56:16 +10:00
@@ -537,6 +537,8 @@
     {
       if (res > 1)
       {
+        thd->fatal_error();
+        error= res;
 	DBUG_RETURN(1);
       }
       if (res < 0)
@@ -1778,7 +1780,12 @@
     s->checked_keys.init();
     s->needed_reg.init();
     table_vector[i]=s->table=table=tables->table;
-    table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);// record count
+    error= table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+    if(error)
+    {
+        table->file->print_error(error, MYF(0));
+        DBUG_RETURN(1);
+    }
     table->quick_keys.clear_all();
     table->reginfo.join_tab=s;
     table->reginfo.not_exists_optimize=0;

--- 1.145/sql/sql_union.cc	2006-10-06 00:56:16 +10:00
+++ 1.146/sql/sql_union.cc	2006-10-06 00:56:16 +10:00
@@ -492,7 +492,12 @@
 	DBUG_RETURN(res);
       }
       /* Needed for the following test and for records_at_start in next loop */
-      table->file->info(HA_STATUS_VARIABLE);
+      int error= table->file->info(HA_STATUS_VARIABLE);
+      if(error)
+      {
+        table->file->print_error(error, MYF(0));
+        DBUG_RETURN(1);
+      }
       if (found_rows_for_union && !sl->braces && 
           select_limit_cnt != HA_POS_ERROR)
       {

--- 1.30/sql/examples/ha_archive.cc	2006-10-06 00:56:16 +10:00
+++ 1.31/sql/examples/ha_archive.cc	2006-10-06 00:56:16 +10:00
@@ -972,7 +972,7 @@
 }
 
 
-void ha_archive::info(uint flag)
+int ha_archive::info(uint flag)
 {
   DBUG_ENTER("ha_archive::info");
 
@@ -980,7 +980,7 @@
   records= share->rows_recorded;
   deleted= 0;
 
-  DBUG_VOID_RETURN;
+  DBUG_RETURN(0);
 }
 
 int ha_archive::extra(enum ha_extra_function operation)

--- 1.15/sql/examples/ha_archive.h	2006-10-06 00:56:16 +10:00
+++ 1.16/sql/examples/ha_archive.h	2006-10-06 00:56:16 +10:00
@@ -116,7 +116,7 @@
   int read_data_header(gzFile file_to_read);
   int write_data_header(gzFile file_to_write);
   void position(const byte *record);
-  void info(uint);
+  int info(uint);
   int extra(enum ha_extra_function operation);
   int reset(void);
   int external_lock(THD *thd, int lock_type);

--- 1.10/sql/examples/ha_tina.cc	2006-10-06 00:56:16 +10:00
+++ 1.11/sql/examples/ha_tina.cc	2006-10-06 00:56:16 +10:00
@@ -683,13 +683,13 @@
   Currently this table handler doesn't implement most of the fields
   really needed. SHOW also makes use of this data
 */
-void ha_tina::info(uint flag)
+int ha_tina::info(uint flag)
 {
   DBUG_ENTER("ha_tina::info");
   /* This is a lie, but you don't want the optimizer to see zero or 1 */
   if (records < 2) 
     records= 2;
-  DBUG_VOID_RETURN;
+  DBUG_RETURN(0);
 }
 
 /*

--- 1.2/sql/examples/ha_tina.h	2006-10-06 00:56:16 +10:00
+++ 1.3/sql/examples/ha_tina.h	2006-10-06 00:56:16 +10:00
@@ -115,7 +115,7 @@
   int rnd_pos(byte * buf, byte *pos);
   int rnd_end();
   void position(const byte *record);
-  void info(uint);
+  int info(uint);
   int extra(enum ha_extra_function operation);
   int reset(void);
   int external_lock(THD *thd, int lock_type);

--- 1.12/sql/examples/ha_example.cc	2006-10-06 00:56:16 +10:00
+++ 1.13/sql/examples/ha_example.cc	2006-10-06 00:56:16 +10:00
@@ -486,10 +486,10 @@
     sql_update.cc
 
 */
-void ha_example::info(uint flag)
+int ha_example::info(uint flag)
 {
   DBUG_ENTER("ha_example::info");
-  DBUG_VOID_RETURN;
+  DBUG_RETURN(0);
 }
 
 

--- 1.9/sql/examples/ha_example.h	2006-10-06 00:56:16 +10:00
+++ 1.10/sql/examples/ha_example.h	2006-10-06 00:56:16 +10:00
@@ -138,7 +138,7 @@
   int rnd_next(byte *buf);                                      //required
   int rnd_pos(byte * buf, byte *pos);                           //required
   void position(const byte *record);                            //required
-  void info(uint);                                              //required
+  int info(uint);                                              //required
 
   int extra(enum ha_extra_function operation);
   int reset(void);

--- 1.12/sql/ha_blackhole.cc	2006-10-06 00:56:16 +10:00
+++ 1.13/sql/ha_blackhole.cc	2006-10-06 00:56:16 +10:00
@@ -100,7 +100,7 @@
 }
 
 
-void ha_blackhole::info(uint flag)
+int ha_blackhole::info(uint flag)
 {
   DBUG_ENTER("ha_blackhole::info");
 
@@ -114,7 +114,7 @@
   delete_length= 0;
   if (flag & HA_STATUS_AUTO)
     auto_increment_value= 1;
-  DBUG_VOID_RETURN;
+  DBUG_RETURN(0);
 }
 
 int ha_blackhole::external_lock(THD *thd, int lock_type)

--- 1.4/sql/ha_blackhole.h	2006-10-06 00:56:16 +10:00
+++ 1.5/sql/ha_blackhole.h	2006-10-06 00:56:16 +10:00
@@ -78,7 +78,7 @@
   int index_first(byte * buf);
   int index_last(byte * buf);
   void position(const byte *record);
-  void info(uint flag);
+  int info(uint flag);
   int external_lock(THD *thd, int lock_type);
   uint lock_count(void) const;
   int create(const char *name, TABLE *table_arg,

--- 1.190/sql/ha_ndbcluster.cc	2006-10-06 00:56:16 +10:00
+++ 1.191/sql/ha_ndbcluster.cc	2006-10-06 00:56:16 +10:00
@@ -256,11 +256,13 @@
   DBUG_VOID_RETURN;
 }
 
-void ha_ndbcluster::records_update()
+int ha_ndbcluster::records_update()
 {
   if (m_ha_not_exact_count)
-    return;
+    return 0;
   DBUG_ENTER("ha_ndbcluster::records_update");
+  int result= 0;
+
   struct Ndb_local_table_statistics *info= 
     (struct Ndb_local_table_statistics *)m_table_info;
   DBUG_PRINT("info", ("id=%d, no_uncommitted_rows_count=%d",
@@ -271,7 +273,7 @@
     Ndb *ndb= get_ndb();
     Uint64 rows;
     ndb->setDatabaseName(m_dbname);
-    if(ndb_get_table_statistics(ndb, m_tabname, &rows, 0) == 0){
+    if((result= ndb_get_table_statistics(ndb, m_tabname, &rows, 0)) == 0){
       info->records= rows;
     }
   }
@@ -281,7 +283,7 @@
       info->no_uncommitted_rows_count= 0;
   }
   records= info->records+ info->no_uncommitted_rows_count;
-  DBUG_VOID_RETURN;
+  DBUG_RETURN(result);
 }
 
 void ha_ndbcluster::no_uncommitted_rows_execute_failure()
@@ -2858,8 +2860,9 @@
 }
 
 
-void ha_ndbcluster::info(uint flag)
+int ha_ndbcluster::info(uint flag)
 {
+  int result= 0;
   DBUG_ENTER("info");
   DBUG_PRINT("enter", ("flag: %d", flag));
   
@@ -2877,17 +2880,17 @@
       if (m_ha_not_exact_count)
 	records= 100;
       else
-	records_update();
+	result= records_update();
     }
     else
     {
       if ((my_errno= check_ndb_connection()))
-        DBUG_VOID_RETURN;
+        DBUG_RETURN(my_errno);
       Ndb *ndb= get_ndb();
       Uint64 rows= 100;
       ndb->setDatabaseName(m_dbname);
       if (current_thd->variables.ndb_use_exact_count)
-	ndb_get_table_statistics(ndb, m_tabname, &rows, 0);
+	result= ndb_get_table_statistics(ndb, m_tabname, &rows, 0);
       records= rows;
     }
   }
@@ -2912,7 +2915,11 @@
         ndb->readAutoIncrementValue((const NDBTAB *) m_table);
     }
   }
-  DBUG_VOID_RETURN;
+
+  if(result == -1)
+    result= HA_ERR_NO_CONNECTION;
+
+  DBUG_RETURN(result);
 }
 
 

--- 1.59/sql/ha_ndbcluster.h	2006-10-06 00:56:16 +10:00
+++ 1.60/sql/ha_ndbcluster.h	2006-10-06 00:56:16 +10:00
@@ -115,7 +115,7 @@
   int read_range_next();
 
   bool get_error_message(int error, String *buf);
-  void info(uint);
+  int info(uint);
   int extra(enum ha_extra_function operation);
   int extra_opt(enum ha_extra_function operation, ulong cache_size);
   int reset();
@@ -256,7 +256,7 @@
 
   Ndb *get_ndb();
   void set_rec_per_key();
-  void records_update();
+  int records_update();
   void no_uncommitted_rows_execute_failure();
   void no_uncommitted_rows_update(int);
   void no_uncommitted_rows_init(THD *);

--- 1.215/sql/ha_innodb.cc	2006-10-06 00:56:16 +10:00
+++ 1.216/sql/ha_innodb.cc	2006-10-06 00:56:16 +10:00
@@ -4570,7 +4570,7 @@
 Returns statistics information of the table to the MySQL interpreter,
 in various fields of the handle object. */
 
-void
+int
 ha_innobase::info(
 /*==============*/
 	uint flag)	/* in: what information MySQL requests */
@@ -4593,7 +4593,7 @@
 
         if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) {
 
-                DBUG_VOID_RETURN;
+                DBUG_RETURN(HA_ERR_CRASHED);
         }
 
 	/* We do not know if MySQL can call this function before calling
@@ -4758,7 +4758,7 @@
 
 	prebuilt->trx->op_info = (char*)"";
 
-  	DBUG_VOID_RETURN;
+  	DBUG_RETURN(0);
 }
 
 /**************************************************************************

--- 1.80/sql/ha_innodb.h	2006-10-06 00:56:16 +10:00
+++ 1.81/sql/ha_innodb.h	2006-10-06 00:56:16 +10:00
@@ -142,7 +142,7 @@
   	int rnd_pos(byte * buf, byte *pos);
 
   	void position(const byte *record);
-  	void info(uint);
+  	int info(uint);
         int analyze(THD* thd,HA_CHECK_OPT* check_opt);
         int optimize(THD* thd,HA_CHECK_OPT* check_opt);
 	int discard_or_import_tablespace(my_bool discard);
Thread
bk commit into 4.1 tree (stewart:1.2537) BUG#19914Stewart Smith5 Oct