mirror of
https://codeberg.org/scip/dbtool.git
synced 2026-02-04 23:20:58 +01:00
fix berkeley db key deletion
This commit is contained in:
@@ -562,8 +562,9 @@ void Engine::regexp() {
|
|||||||
*/
|
*/
|
||||||
void Engine::remove() {
|
void Engine::remove() {
|
||||||
init();
|
init();
|
||||||
#ifdef HAVE_BERKELEY
|
#ifdef HAVE_BERKELEY
|
||||||
Dbt key((char *)config.key.c_str(), config.key.length() + 1);
|
char *k = (char *)config.key.c_str();
|
||||||
|
Dbt key(k, strlen(k));
|
||||||
int ret;
|
int ret;
|
||||||
if((ret = db->del(NULL, &key, 0)) != 0) {
|
if((ret = db->del(NULL, &key, 0)) != 0) {
|
||||||
cerr << "Database error" << "(" << strerror(ret) << ")" << endl;
|
cerr << "Database error" << "(" << strerror(ret) << ")" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user