summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-06-26 17:34:44 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-06-26 17:34:44 +0300
commitc6392d52ee2e918a65b05c275286ff4d450eef2c (patch)
tree1a5f9623ff08bfca9eacb83e21502563e656e932 /sql/handler.h
parentc4eb4bcef648eb2ebdc6edc06905f39f95ef7f6b (diff)
parentcc8772f33e8f94844e32f3aa79e5f41d784f8ec0 (diff)
downloadmariadb-git-c6392d52ee2e918a65b05c275286ff4d450eef2c.tar.gz
Merge 10.0 into 10.1
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h
index a047f276349..d17bccab25c 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -3180,9 +3180,17 @@ private:
*/
virtual int rnd_pos_by_record(uchar *record)
{
+ int error;
DBUG_ASSERT(table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION);
+
+ error = ha_rnd_init(false);
+ if (error != 0)
+ return error;
+
position(record);
- return rnd_pos(record, ref);
+ error = ha_rnd_pos(record, ref);
+ ha_rnd_end();
+ return error;
}
virtual int read_first_row(uchar *buf, uint primary_key);
public: