summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-07-14 17:44:37 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-07-14 17:44:37 +0400
commit130046e59e2adcc49dfe1fcbb7b7540c9f433a01 (patch)
treef9013a418d57f090cdb37d4751f01a21e9c5b8b1 /sql/sql_class.h
parentc8ddb34d4e25fa5f5300f49e9c1273816ddf66b9 (diff)
downloadmariadb-git-130046e59e2adcc49dfe1fcbb7b7540c9f433a01.tar.gz
BUG#778434 Wrong result with in_to_exists=on in maria-5.3-mwl89
- Make {ha_myisam,ha_maria}::index_read_idx_map check pushed index condition. - Address review feedback (added comments)
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index f20d7ae1aab..d304eb72d0e 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -3627,11 +3627,19 @@ inline int handler::ha_index_read_map(uchar * buf, const uchar * key,
return error;
}
+
+/*
+ @note: Other index lookup/navigation functions require prior
+ handler->index_init() call. This function is different, it requires
+ that the scan is not initialized, and accepts "uint index" as an argument.
+*/
+
inline int handler::ha_index_read_idx_map(uchar * buf, uint index,
const uchar * key,
key_part_map keypart_map,
enum ha_rkey_function find_flag)
{
+ DBUG_ASSERT(inited==NONE);
increment_statistics(&SSV::ha_read_key_count);
int error= index_read_idx_map(buf, index, key, keypart_map, find_flag);
if (!error)