summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-06-29 10:51:42 +0500
committerunknown <holyfoot/hf@hfmain.(none)>2007-06-29 10:51:42 +0500
commitb70c486e9656d8e6ad8c60ca6d715ac798a9cc55 (patch)
tree64795d9799b6932ea46b06c358cbb1930c019dd9 /sql/handler.h
parent26bed2a607c47e8b382064bc9acbb1198a1da62f (diff)
parent3e7f28edbc8d9acdb596be9a30ee577aba62208f (diff)
downloadmariadb-git-b70c486e9656d8e6ad8c60ca6d715ac798a9cc55.tar.gz
Merge bk@192.168.21.1:mysql-5.1-opt
into mysql.com:/home/hf/work/29247/my51-29247 sql-common/client.c: Auto merged sql/handler.h: Auto merged
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/handler.h b/sql/handler.h
index e80b62c1250..4095a2f4cb1 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1130,10 +1130,12 @@ public:
int ha_index_init(uint idx, bool sorted)
{
+ int result;
DBUG_ENTER("ha_index_init");
DBUG_ASSERT(inited==NONE);
- inited=INDEX;
- DBUG_RETURN(index_init(idx, sorted));
+ if (!(result= index_init(idx, sorted)))
+ inited=INDEX;
+ DBUG_RETURN(result);
}
int ha_index_end()
{
@@ -1144,10 +1146,11 @@ public:
}
int ha_rnd_init(bool scan)
{
+ int result;
DBUG_ENTER("ha_rnd_init");
DBUG_ASSERT(inited==NONE || (inited==RND && scan));
- inited=RND;
- DBUG_RETURN(rnd_init(scan));
+ inited= (result= rnd_init(scan)) ? NONE: RND;
+ DBUG_RETURN(result);
}
int ha_rnd_end()
{