apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: apr-util/dbm apr_dbm_berkeleydb.c
Date Thu, 24 Oct 2002 06:37:25 GMT
brane       2002/10/23 23:37:25

  Modified:    dbm      apr_dbm_berkeleydb.c
  Log:
  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.
  
  Revision  Changes    Path
  1.21      +2 -15     apr-util/dbm/apr_dbm_berkeleydb.c
  
  Index: apr_dbm_berkeleydb.c
  ===================================================================
  RCS file: /home/cvs/apr-util/dbm/apr_dbm_berkeleydb.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- apr_dbm_berkeleydb.c	4 Oct 2002 04:25:12 -0000	1.20
  +++ apr_dbm_berkeleydb.c	24 Oct 2002 06:37:24 -0000	1.21
  @@ -199,9 +199,6 @@
           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 @@
       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 @@
                                            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 @@
   {
       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 @@
       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);
  
  
  

Mime
View raw message