summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-14 19:59:28 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-14 19:59:28 +0300
commitb886cac7123bc37d055fecd49d9a30ce0c39da73 (patch)
treec20877daef97377e843fd3c821a58b6c90f08174 /sql/item_subselect.cc
parentc0f04fa31cd46c2507b2152eeeeb4950e0d5edc9 (diff)
downloadmariadb-git-b886cac7123bc37d055fecd49d9a30ce0c39da73.tar.gz
Fixed compiler errors
Updated test to also work on 32 bit mysql-test/suite/heap/heap.test: Updated test to also work on 32 bit
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 49d232d31be..8b9904ea260 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -5167,10 +5167,16 @@ Ordered_key::cmp_keys_by_row_data(ha_rows a, ha_rows b)
rowid_a= row_num_to_rowid + a * rowid_length;
rowid_b= row_num_to_rowid + b * rowid_length;
/* Fetch the rows for comparison. */
- error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a);
- DBUG_ASSERT(!error);
- error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b);
- DBUG_ASSERT(!error);
+ if ((error= tbl->file->ha_rnd_pos(tbl->record[0], rowid_a)))
+ {
+ tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
+ return 0;
+ }
+ if ((error= tbl->file->ha_rnd_pos(tbl->record[1], rowid_b)))
+ {
+ tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
+ return 0;
+ }
/*
Compare the two rows by the corresponding values of the indexed
columns.
@@ -5245,8 +5251,11 @@ int Ordered_key::cmp_key_with_search_key(rownum_t row_num)
uchar *cur_rowid= row_num_to_rowid + row_num * rowid_length;
int error, cmp_res;
- error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid);
- DBUG_ASSERT(!error);
+ if ((error= tbl->file->ha_rnd_pos(tbl->record[0], cur_rowid)))
+ {
+ tbl->file->print_error(error, MYF(ME_FATALERROR)); // Sets fatal_error
+ return 0;
+ }
for (uint i= 0; i < key_column_count; i++)
{