summaryrefslogtreecommitdiff
path: root/heap/hp_test1.c
diff options
context:
space:
mode:
Diffstat (limited to 'heap/hp_test1.c')
-rw-r--r--heap/hp_test1.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/heap/hp_test1.c b/heap/hp_test1.c
index 79edfe2effc..58a13efc12f 100644
--- a/heap/hp_test1.c
+++ b/heap/hp_test1.c
@@ -44,17 +44,19 @@ int main(int argc, char **argv)
keyinfo[0].keysegs=1;
keyinfo[0].seg=keyseg;
+ keyinfo[0].algorithm= HA_KEY_ALG_HASH;
keyinfo[0].seg[0].type=HA_KEYTYPE_BINARY;
keyinfo[0].seg[0].start=1;
keyinfo[0].seg[0].length=6;
+ keyinfo[0].seg[0].charset=default_charset_info;
keyinfo[0].flag = HA_NOSAME;
-
+
deleted=0;
bzero((gptr) flags,sizeof(flags));
printf("- Creating heap-file\n");
- heap_create(filename);
- if (!(file=heap_open(filename,2,1,keyinfo,30,(ulong) flag*100000l,10l)))
+ if (heap_create(filename,1,keyinfo,30,(ulong) flag*100000l,10l) ||
+ !(file= heap_open(filename, 2)))
goto err;
printf("- Writing records:s\n");
strmov(record," ..... key ");
@@ -77,7 +79,7 @@ int main(int argc, char **argv)
if (heap_close(file))
goto err;
printf("- Reopening file\n");
- if (!(file=heap_open(filename,2,1,keyinfo,30,(ulong) flag*100000l,10l)))
+ if (!(file=heap_open(filename, 2)))
goto err;
printf("- Removing records\n");