diff options
author | unknown <ram@gw.udmsearch.izhnet.ru> | 2002-04-29 13:53:29 +0500 |
---|---|---|
committer | unknown <ram@gw.udmsearch.izhnet.ru> | 2002-04-29 13:53:29 +0500 |
commit | 958e6c7b30ac6e46a4738df6991fccb2ba42f8f6 (patch) | |
tree | 77b9ea9e8c3560b6e82eaad873f24e15f519602d /heap | |
parent | fb3cc6ef3ed1840ac3629abe113f94e18e43744f (diff) | |
download | mariadb-git-958e6c7b30ac6e46a4738df6991fccb2ba42f8f6.tar.gz |
Index number argument
Fix in test results
heap/hp_rfirst.c:
Index number argument
heap/hp_rlast.c:
Index number argument
heap/hp_test2.c:
Index number argument
include/heap.h:
Index number argument
mysql-test/r/heap_btree.result:
Test results fix
sql/ha_heap.cc:
Index number argument
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_rfirst.c | 4 | ||||
-rw-r--r-- | heap/hp_rlast.c | 9 | ||||
-rw-r--r-- | heap/hp_test2.c | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/heap/hp_rfirst.c b/heap/hp_rfirst.c index 4b7098745a4..390d18fc58f 100644 --- a/heap/hp_rfirst.c +++ b/heap/hp_rfirst.c @@ -18,10 +18,10 @@ /* Read first record with the current key */ -int heap_rfirst(HP_INFO *info, byte *record) +int heap_rfirst(HP_INFO *info, byte *record, int inx) { HP_SHARE *share = info->s; - HP_KEYDEF *keyinfo = share->keydef + info->lastinx; + HP_KEYDEF *keyinfo = share->keydef + inx; DBUG_ENTER("heap_rfirst"); if (keyinfo->algorithm == HA_KEY_ALG_BTREE) diff --git a/heap/hp_rlast.c b/heap/hp_rlast.c index 7f883d3a18b..4c2379427b0 100644 --- a/heap/hp_rlast.c +++ b/heap/hp_rlast.c @@ -19,15 +19,12 @@ /* Read first record with the current key */ -int heap_rlast(HP_INFO *info, byte *record) +int heap_rlast(HP_INFO *info, byte *record, int inx) { - HP_SHARE *share = info->s; - HP_KEYDEF *keyinfo; + HP_SHARE *share= info->s; + HP_KEYDEF *keyinfo= share->keydef + inx; DBUG_ENTER("heap_rlast"); - if (info->lastinx < 0) - DBUG_RETURN(my_errno = HA_ERR_WRONG_INDEX); - keyinfo = share->keydef + info->lastinx; if (keyinfo->algorithm == HA_KEY_ALG_BTREE) { byte *pos; diff --git a/heap/hp_test2.c b/heap/hp_test2.c index f8b6a8cd7d3..a972e7073e0 100644 --- a/heap/hp_test2.c +++ b/heap/hp_test2.c @@ -306,7 +306,7 @@ int main(int argc, char *argv[]) if (!silent) printf("- Read last key - delete - prev - prev - opt_delete - prev -> first\n"); - if (heap_rlast(file,record3)) goto err; + if (heap_rlast(file,record3,0)) goto err; if (heap_delete(file,record3)) goto err; key_check-=atoi(record3); key1[atoi(record+keyinfo[0].seg[0].start)]--; @@ -513,7 +513,7 @@ int main(int argc, char *argv[]) } ant=0; - for (error=heap_rlast(file,record) ; + for (error=heap_rlast(file,record,0) ; ! error ; error=heap_rprev(file,record)) { |