-/* $Id: zebraapi.c,v 1.197 2005-12-09 10:49:10 adam Exp $
+/* $Id: zebraapi.c,v 1.198 2005-12-09 10:56:59 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
assert(is_partial);
assert(entries);
yaz_log(log_level, "zebra_scan");
- zebra_clearError(zh);
+
if (zebra_begin_read (zh) == ZEBRA_FAIL)
{
*entries = 0;
assert(sort_sequence);
assert(sort_status);
yaz_log(log_level, "zebra_sort");
- zebra_clearError(zh);
+
if (zebra_begin_read(zh) == ZEBRA_FAIL)
return ZEBRA_FAIL;
res = resultSetSort(zh, stream->mem, num_input_setnames, input_setnames,
ZEBRA_RES ret = ZEBRA_OK;
ASSERTZH;
yaz_log(log_level, "zebra_drop_database %s", db);
- zebra_clearError(zh);
if (zebra_select_database (zh, db) == ZEBRA_FAIL)
return ZEBRA_FAIL;
else
{
yaz_log(YLOG_WARN, "drop database only supported for isam:b");
+ zebra_setError(zh, YAZ_BIB1_ES_IMMEDIATE_EXECUTION_FAILED,
+ "drop database only supported for isam:b");
ret = ZEBRA_FAIL;
}
zebra_end_trans (zh);
ASSERTZH;
yaz_log(log_level, "zebra_create_database %s", db);
assert(db);
- zebra_clearError(zh);
if (zebra_select_database (zh, db) == ZEBRA_FAIL)
return ZEBRA_FAIL;
assert(input_str);
assert(output_str);
yaz_log(log_level, "zebra_string_norm ");
- zebra_clearError(zh);
+
if (!zh->reg->zebra_maps)
return -1;
wrbuf = zebra_replace(zh->reg->zebra_maps, reg_id, "",
FILE *f;
ASSERTZH;
yaz_log(log_level, "zebra_set_state v=%d seq=%d", val, seqno);
- zebra_clearError(zh);
sprintf (state_fname, "state.%s.LCK", zh->reg_name);
fname = zebra_mk_fname (res_get(zh->res, "lockDir"), state_fname);
ASSERTZH;
yaz_log(log_level, "zebra_get_state ");
- zebra_clearError(zh);
+
sprintf (state_fname, "state.%s.LCK", zh->reg_name);
fname = zebra_mk_fname (res_get(zh->res, "lockDir"), state_fname);
f = fopen (fname, "r");
}
zh->trans_w_no = zh->trans_no;
- zebra_clearError(zh);
-
zh->records_inserted = 0;
zh->records_updated = 0;
zh->records_deleted = 0;
zebra_flush_reg (zh);
return ZEBRA_OK;
}
- zebra_clearError(zh);
#if HAVE_SYS_TIMES_H
times (&zh->tms1);
#endif