diff options
author | brane <brane@13f79535-47bb-0310-9956-ffa450edef68> | 2002-10-24 06:37:24 +0000 |
---|---|---|
committer | brane <brane@13f79535-47bb-0310-9956-ffa450edef68> | 2002-10-24 06:37:24 +0000 |
commit | 2084049fc0843d781959fd88dcb2ba4a7487337a (patch) | |
tree | 6fe4cebbf24addf83047847461f08f192fe00984 /dbm | |
parent | 0f0ff2aa3db7745c14b0477deafa6681f33a1f2f (diff) | |
download | libapr-util-2084049fc0843d781959fd88dcb2ba4a7487337a.tar.gz |
Remove the DB_AUTO_COMMIT handling for DB4.1. We're creating
standalone databases files (passing a NULL DB_ENV to db_create), and
those don't support transactions. DB_AUTO_COMMIT can only be used if
the database is part of an environment that was created with
DB_INIT_TXN.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@58782 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dbm')
-rw-r--r-- | dbm/apr_dbm_berkeleydb.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/dbm/apr_dbm_berkeleydb.c b/dbm/apr_dbm_berkeleydb.c index 7b13629c..2d7d38a1 100644 --- a/dbm/apr_dbm_berkeleydb.c +++ b/dbm/apr_dbm_berkeleydb.c @@ -199,9 +199,6 @@ static apr_status_t vt_db_open(apr_dbm_t **pdb, const char *pathname, int dberr; #if DB_VER >= 3 -#if DB_VER == 4 - dbmode |= DB_AUTO_COMMIT; -#endif if ((dberr = db_create(&file.bdb, NULL, 0)) == 0) { if ((dberr = (*file.bdb->open)(file.bdb, #if DB_VER == 4 @@ -288,11 +285,6 @@ static apr_status_t vt_db_store(apr_dbm_t *dbm, apr_datum_t key, apr_status_t rv; DBT ckey = { 0 }; DBT cvalue = { 0 }; -#if DB_VER == 4 - int flags = DB_AUTO_COMMIT; -#else - int flags = 0; -#endif ckey.data = key.dptr; ckey.size = key.dsize; @@ -304,7 +296,7 @@ static apr_status_t vt_db_store(apr_dbm_t *dbm, apr_datum_t key, TXN_ARG &ckey, &cvalue, - flags)); + 0)); /* store any error info into DBM, and return a status code. */ return set_error(dbm, rv); @@ -314,11 +306,6 @@ static apr_status_t vt_db_del(apr_dbm_t *dbm, apr_datum_t key) { apr_status_t rv; DBT ckey = { 0 }; -#if DB_VER == 4 - int flags = DB_AUTO_COMMIT; -#else - int flags = 0; -#endif ckey.data = key.dptr; ckey.size = key.dsize; @@ -326,7 +313,7 @@ static apr_status_t vt_db_del(apr_dbm_t *dbm, apr_datum_t key) rv = db2s((*GET_BDB(dbm->file)->del)(GET_BDB(dbm->file), TXN_ARG &ckey, - flags)); + 0)); /* store any error info into DBM, and return a status code. */ return set_error(dbm, rv); |