Commit dd3657f6 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel
Browse files

close[t:4576] Get rid of c_del in the cxx code. Closes #4576.

git-svn-id: file:///svn/toku/tokudb@40375 c7de825b-a66e-492c-adef-691d508d4ae1
parent e45fdcf7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@ default: ../include/db.h
hfiles: tdb.h

clean:
	rm -f *.o make_tdb
	rm -f *.o make_tdb make_db_h_?_? sample_offsets sample_offsets_mysql make_tdb_h
+1 −1
Original line number Diff line number Diff line
@@ -474,7 +474,7 @@ static void print_dbc_struct (void) {
    field_counter=0;
    STRUCT_SETUP(DBC, c_close, "int (*%s) (DBC *)");
    STRUCT_SETUP(DBC, c_count, "int (*%s) (DBC *, db_recno_t *, u_int32_t)");
    STRUCT_SETUP(DBC, c_del,   "int (*%s) (DBC *, u_int32_t)");
    //STRUCT_SETUP(DBC, c_del,   "int (*%s) (DBC *, u_int32_t)");  // c_del was removed.  See #4576.
    STRUCT_SETUP(DBC, c_get,   "int (*%s) (DBC *, DBT *, DBT *, u_int32_t)");
    STRUCT_SETUP(DBC, dbp,     "DB *%s");
    const char *extra[]={
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ int Dbc::get(Dbt* key, Dbt *data, u_int32_t flags) {
    return env->maybe_throw_error(ret);
}

#if 0
// No longer present (see #4576)
int Dbc::del(u_int32_t flags) {
    DBC *dbc = this;
    int ret = dbc->c_del(dbc, flags);
@@ -22,6 +24,7 @@ int Dbc::del(u_int32_t flags) {
    DbEnv *env = (DbEnv*)dbenv_c->api1_internal;
    return env->maybe_throw_error(ret);
}
#endif

int Dbc::count(db_recno_t *count, u_int32_t flags) {
    DBC *dbc = this;
+3 −0
Original line number Diff line number Diff line
@@ -193,10 +193,13 @@ static void test_dbc_exceptions () {
    TC(curs->get(&key, &val, DB_FIRST), 0);
    toku_free(key.get_data());
    toku_free(val.get_data());
#if 0
    // c_del no longer supported. See #4576.
    TC(curs->del(DB_DELETE_ANY), 0);
    TCRET(curs->get(&key, &val, DB_CURRENT), DB_KEYEMPTY);
    TCRET(curs->del(0), DB_KEYEMPTY);
    TCRET(curs->del(DB_DELETE_ANY), 0);
#endif
    curs->close(); // no deleting cursors.
}

+3 −0
Original line number Diff line number Diff line
@@ -209,6 +209,8 @@ void test_zero_count(Db *db, int n) {

    Dbt key; key.set_flags(DB_DBT_REALLOC);
    Dbt val; val.set_flags(DB_DBT_REALLOC);
#if 0
    // c->del no longer supported.  See #4576.
    int i;
    for (i=1; count > 0; i++) {
        r = cursor->del(0); assert(r == 0);
@@ -222,6 +224,7 @@ void test_zero_count(Db *db, int n) {
        if (r != 0) break;
    }
    assert(i == 2);
#endif
    if (key.get_data()) toku_free(key.get_data());
    if (val.get_data()) toku_free(val.get_data());
    r = cursor->close(); assert(r == 0);
Loading