summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-11-02 11:03:33 +0200
committerMichael Widenius <monty@askmonty.org>2010-11-02 11:03:33 +0200
commitc4a5cf111bb1a2ecc2de14478a679283b081e3b2 (patch)
tree06fc72775ec3407f9d9a31187c41e879255ec813 /sql/item_subselect.cc
parentd48a8b60345c5b5f95c2ce590f7032a7c9f87c4b (diff)
downloadmariadb-git-c4a5cf111bb1a2ecc2de14478a679283b081e3b2.tar.gz
Fixed wrong queue_replace(), which caused timeout failure in pbxt.flush_read_lock_kill
Fixed compiler warnings. include/queues.h: Added prototype for queue_replace() mysys/queues.c: Fixed wrong queue_replace() mysys/thr_alarm.c: Added DBUG_PRINT sql/item_subselect.cc: Check return value of ha_rnd_init(). (Fixes compiler warnings) sql/sql_class.cc: Fixed wrong test sql/sql_show.cc: Removed not used variable.
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 57f146511b3..8a17ce73556 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -4827,7 +4827,8 @@ subselect_rowid_merge_engine::init(MY_BITMAP *non_null_key_parts,
DBUG_ASSERT(cur_keyid == keys_count);
/* Populate the indexes with data from the temporary table. */
- tmp_table->file->ha_rnd_init(1);
+ if (tmp_table->file->ha_rnd_init_with_error(1))
+ return TRUE;
tmp_table->file->extra_opt(HA_EXTRA_CACHE,
current_thd->variables.read_buff_size);
tmp_table->null_row= 0;
@@ -5008,7 +5009,11 @@ bool subselect_rowid_merge_engine::partial_match()
DBUG_ASSERT(!pq.elements);
/* All data accesses during execution are via handler::ha_rnd_pos() */
- tmp_table->file->ha_rnd_init(0);
+ if (tmp_table->file->ha_rnd_init_with_error(0))
+ {
+ res= FALSE;
+ goto end;
+ }
/* Check if there is a match for the columns of the only non-NULL key. */
if (non_null_key && !non_null_key->lookup())
@@ -5175,7 +5180,12 @@ bool subselect_table_scan_engine::partial_match()
int error;
bool res;
- tmp_table->file->ha_rnd_init(1);
+ if (tmp_table->file->ha_rnd_init_with_error(1))
+ {
+ res= FALSE;
+ goto end;
+ }
+
tmp_table->file->extra_opt(HA_EXTRA_CACHE,
current_thd->variables.read_buff_size);
/*