diff options
author | monty@mysql.com <> | 2003-11-20 22:06:25 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2003-11-20 22:06:25 +0200 |
commit | 7c6113a39f56832da982cfb4ff191e9db49ca798 (patch) | |
tree | 685b3a2a60fc00121d338cb0b5f84b4cd028bfe1 /heap | |
parent | ba659679e7816cd9c992c866645f65b06e5f69de (diff) | |
download | mariadb-git-7c6113a39f56832da982cfb4ff191e9db49ca798.tar.gz |
Merge key cache structures to one
Fixed compiler warnings (IRIX C compiler and VC++)
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_test1.c | 4 | ||||
-rw-r--r-- | heap/hp_test2.c | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/heap/hp_test1.c b/heap/hp_test1.c index 96399fe4f2e..dd696528eb8 100644 --- a/heap/hp_test1.c +++ b/heap/hp_test1.c @@ -91,7 +91,7 @@ int main(int argc, char **argv) { if (i == remove_ant) { VOID(heap_close(file)) ; return (0) ; } sprintf(key,"%6d",(j=(int) ((rand() & 32767)/32767.*25))); - if ((error = heap_rkey(file,record,0,key,0,6))) + if ((error = heap_rkey(file,record,0,key,6,HA_READ_KEY_EXACT))) { if (verbose || (flags[j] == 1 || (error && my_errno != HA_ERR_KEY_NOT_FOUND))) @@ -119,7 +119,7 @@ int main(int argc, char **argv) sprintf(key,"%6d",i); bmove(record+1,key,6); my_errno=0; - error=heap_rkey(file,record,0,key,0,6); + error=heap_rkey(file,record,0,key,6,HA_READ_KEY_EXACT); if (verbose || (error == 0 && flags[i] != 1) || (error && (flags[i] != 0 || my_errno != HA_ERR_KEY_NOT_FOUND))) diff --git a/heap/hp_test2.c b/heap/hp_test2.c index 97fe1471ca1..2de49bcb66b 100644 --- a/heap/hp_test2.c +++ b/heap/hp_test2.c @@ -179,7 +179,7 @@ int main(int argc, char *argv[]) if (j != 0) { sprintf(key,"%6d",j); - if (heap_rkey(file,record,0,key,6,0)) + if (heap_rkey(file,record,0,key,6, HA_READ_KEY_EXACT)) { printf("can't find key1: \"%s\"\n",key); goto err; @@ -239,7 +239,7 @@ int main(int argc, char *argv[]) if (!key1[j]) continue; sprintf(key,"%6d",j); - if (heap_rkey(file,record,0,key,6,0)) + if (heap_rkey(file,record,0,key,6, HA_READ_KEY_EXACT)) { printf("can't find key1: \"%s\"\n",key); goto err; @@ -289,7 +289,7 @@ int main(int argc, char *argv[]) printf("- Read first key - next - delete - next -> last\n"); DBUG_PRINT("progpos",("first - next - delete - next -> last")); - if (heap_rkey(file,record,0,key,6,0)) + if (heap_rkey(file,record,0,key,6, HA_READ_KEY_EXACT)) goto err; if (heap_rnext(file,record3)) goto err; if (heap_delete(file,record3)) goto err; @@ -513,7 +513,7 @@ int main(int argc, char *argv[]) } printf("- Read through all keys with first-next-last-prev\n"); ant=0; - for (error=heap_rkey(file,record,0,key,6,0); + for (error=heap_rkey(file,record,0,key,6, HA_READ_KEY_EXACT); ! error ; error=heap_rnext(file,record)) ant++; @@ -550,7 +550,8 @@ int main(int argc, char *argv[]) { if (error == 0) { - if (heap_rkey(file2,record2,2,record+keyinfo[2].seg[0].start,8,0)) + if (heap_rkey(file2,record2,2,record+keyinfo[2].seg[0].start,8, + HA_READ_KEY_EXACT)) { printf("can't find key3: \"%.8s\"\n", record+keyinfo[2].seg[0].start); |