-/* $Id: zebraapi.c,v 1.111 2003-07-07 13:55:37 pop Exp $
+/* $Id: zebraapi.c,v 1.114 2003-09-05 10:51:17 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
Index Data Aps
02111-1307, USA.
*/
-
-
#include <assert.h>
#include <stdio.h>
#ifdef WIN32
return 0;
}
+
+void zebra_pidfname(ZebraService zs, char *path)
+{
+ zebra_lock_prefix (zs->global_res, path);
+ strcat(path, "zebrasrv.pid");
+}
+
static
struct zebra_register *zebra_register_open (ZebraService zs, const char *name,
int rw, int useshadow, Res res,
int zebra_drop_database (ZebraHandle zh, const char *database)
{
+ int ret = 0;
ASSERTZH;
yaz_log(LOG_API,"zebra_drop_database");
zh->errCode = 0;
zebraExplain_trav_ord(zh->reg->zei, zh, delete_SU_handle);
zebraExplain_removeDatabase(zh->reg->zei, zh);
}
+ else
+ {
+ yaz_log(LOG_WARN, "drop database only supported for isam:b");
+ ret = -1;
+ }
zebra_end_trans (zh);
- return 0;
+ return ret;
}
int zebra_create_database (ZebraHandle zh, const char *database)
int zebra_begin_trans (ZebraHandle zh, int rw)
{
- yaz_log(LOG_LOG, "zebra_begin_trans rw=%d trans=%d", rw, zh->trans_no);
if (!zh->res)
{
zh->errCode = 2;
odr_destroy(odr);
- yaz_log(LOG_API,"Hits: %d",numhits);
+ yaz_log(LOG_API,"Hits: %d",hits);
if (numhits)
*numhits=hits;