projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor
[idzebra-moved-to-github.git]
/
isamb
/
isamb.c
diff --git
a/isamb/isamb.c
b/isamb/isamb.c
index
706d0df
..
ed28809
100644
(file)
--- a/
isamb/isamb.c
+++ b/
isamb/isamb.c
@@
-2,7
+2,7
@@
* Copyright (c) 1995-1998, Index Data.
* See the file LICENSE for details.
*
* Copyright (c) 1995-1998, Index Data.
* See the file LICENSE for details.
*
- * $Id: isamb.c,v 1.4 2002-04-17 08:17:13 adam Exp $
+ * $Id: isamb.c,v 1.7 2002-04-17 09:44:56 adam Exp $
*/
#include <yaz/xmalloc.h>
#include <yaz/log.h>
*/
#include <yaz/xmalloc.h>
#include <yaz/log.h>
@@
-436,9
+436,8
@@
int insert_flat (ISAMB b, const void *new_item, ISAMC_P *posp)
p->dirty = 1;
}
new_size = dst - dst_buf + ISAMB_DATA_OFFSET;
p->dirty = 1;
}
new_size = dst - dst_buf + ISAMB_DATA_OFFSET;
- if (p && new_size > p->size)
+ if (p && new_size > b->file[p->cat].head.block_size)
{
{
- yaz_log (LOG_LOG, "resize %d -> %d", p->size, new_size);
close_block (b, p);
/* delete it too!! */
p = 0; /* make a new one anyway */
close_block (b, p);
/* delete it too!! */
p = 0; /* make a new one anyway */
@@
-472,10
+471,11
@@
int isamb_insert_one (ISAMB b, const void *item, ISAMC_P pos)
else
{
/* b-tree insert */
else
{
/* b-tree insert */
- struct ISAMB_block *p, *sp = 0;
+ struct ISAMB_block *p = open_block (b, pos), *sp = 0;
char sub_item[DST_ITEM_MAX];
int sub_size;
char sub_item[DST_ITEM_MAX];
int sub_size;
+
insert_sub (b, p, item, &sp, sub_item, &sub_size);
if (sp)
{ /* increase level of tree by one */
insert_sub (b, p, item, &sp, sub_item, &sub_size);
if (sp)
{ /* increase level of tree by one */