Commit 44a882f9 authored by unknown's avatar unknown
Browse files

BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables

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.
Unable to write test case for mysql-test until 5.1 due to support for setting
debug options at runtime.


sql/ha_blackhole.cc:
  update for handler::info() now returning int
sql/ha_blackhole.h:
  update for handler::info() now returning int
sql/ha_isam.cc:
  update for handler::info() now returning int
sql/ha_isam.h:
  update for handler::info() now returning int
sql/ha_isammrg.cc:
  update for handler::info() now returning int
sql/ha_isammrg.h:
  update for handler::info() now returning int
sql/item_sum.cc:
  update for handler::info() now returning int.
  
  return error to user if info call fails
sql/sql_delete.cc:
  update for handler::info() now returning int.
  
  return error to user if info call fails
sql/sql_select.cc:
  update for handler::info() now returning int.
  
  return error to user if info call fails
sql/sql_union.cc:
  update for handler::info() now returning int.
  
  return error to user if info call fails
parent 0f72ee67
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ void ha_blackhole::position(const byte *record)
}


void ha_blackhole::info(uint flag)
int ha_blackhole::info(uint flag)
{
  DBUG_ENTER("ha_blackhole::info");

@@ -114,7 +114,7 @@ void ha_blackhole::info(uint flag)
  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 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ class ha_blackhole: public handler
  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,
+2 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ void ha_isam::position(const byte *record)
  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 @@ void ha_isam::info(uint flag)
  }
  if (flag & HA_STATUS_TIME)
    update_time = info.update_time;
  return 0;
}


+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ class ha_isam: public handler
  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);
+2 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ void ha_isammrg::position(const byte *record)
}


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 @@ void ha_isammrg::info(uint flag)
  block_size=0;
  update_time=0;
  ref_length=4;					// Should be big enough
  return 0;
}


Loading