mp;data, 0, sizeof(data));
    key.data = name;
    key.size = strlen(name);

retry:    /* Begin the transaction. */
    if ((ret = dbenv-&gt;txn_begin(dbenv, NULL, &amp;tid, 0)) != 0) {
        dbenv-&gt;err(dbenv, ret, "DB_ENV-&gt;txn_begin");
        exit (1);
    }

    /* Delete any previously existing item. */
    switch (ret = db-&gt;del(db, tid, &amp;key, 0)) {
    case 0:
    case DB_NOTFOUND:
        break;
    case DB_LOCK_DEADLOCK:
    default:
        /* Retry the operation. */
        if ((t_r