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-09-28 23:41:37+10:00, stewart@willster.(none) +10 -0
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@stripped, 2006-09-28 23:41:33+10:00, stewart@willster.(none) +2 -2
update for handler::info() now returning int
sql/ha_blackhole.h@stripped, 2006-09-28 23:41:33+10:00, stewart@willster.(none) +1 -1
update for handler::info() now returning int
sql/ha_isam.cc@stripped, 2006-09-28 23:41:33+10:00, stewart@willster.(none) +2 -1
update for handler::info() now returning int
sql/ha_isam.h@stripped, 2006-09-28 23:41:33+10:00, stewart@willster.(none) +1 -1
update for handler::info() now returning int
sql/ha_isammrg.cc@stripped, 2006-09-28 23:41:33+10:00, stewart@willster.(none) +2 -1
update for handler::info() now returning int
sql/ha_isammrg.h@stripped, 2006-09-28 23:41:33+10:00, stewart@willster.(none) +1 -1
update for handler::info() now returning int
sql/item_sum.cc@stripped, 2006-09-28 23:41:33+10:00, stewart@willster.(none) +9 -1
update for handler::info() now returning int.
return error to user if info call fails
sql/sql_delete.cc@stripped, 2006-09-28 23:41:33+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-09-28 23:41:33+10:00, stewart@willster.(none) +6 -1
update for handler::info() now returning int.
return error to user if info call fails
sql/sql_union.cc@stripped, 2006-09-28 23:41:34+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
--- 1.34/sql/ha_isam.cc 2006-09-28 23:41:40 +10:00
+++ 1.35/sql/ha_isam.cc 2006-09-28 23:41:40 +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-09-28 23:41:40 +10:00
+++ 1.30/sql/ha_isam.h 2006-09-28 23:41:40 +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-09-28 23:41:40 +10:00
+++ 1.21/sql/ha_isammrg.cc 2006-09-28 23:41:40 +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-09-28 23:41:40 +10:00
+++ 1.24/sql/ha_isammrg.h 2006-09-28 23:41:40 +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.148/sql/item_sum.cc 2006-09-28 23:41:40 +10:00
+++ 1.149/sql/item_sum.cc 2006-09-28 23:41:40 +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.139/sql/sql_delete.cc 2006-09-28 23:41:40 +10:00
+++ 1.140/sql/sql_delete.cc 2006-09-28 23:41:40 +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.460/sql/sql_select.cc 2006-09-28 23:41:40 +10:00
+++ 1.461/sql/sql_select.cc 2006-09-28 23:41:40 +10:00
@@ -1786,7 +1786,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-09-28 23:41:40 +10:00
+++ 1.146/sql/sql_union.cc 2006-09-28 23:41:40 +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.12/sql/ha_blackhole.cc 2006-09-28 23:41:40 +10:00
+++ 1.13/sql/ha_blackhole.cc 2006-09-28 23:41:40 +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-09-28 23:41:40 +10:00
+++ 1.5/sql/ha_blackhole.h 2006-09-28 23:41:40 +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,
| Thread |
|---|
| • bk commit into 4.1 tree (stewart:1.2536) BUG#19914 | Stewart Smith | 28 Sep |