diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-04-08 10:53:08 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-04-08 10:53:08 +0300 |
commit | 946f17a9f8b21ffeda1af9b0925ba5c2752e052e (patch) | |
tree | f2c477ccd4ad22f8fa1b70e59969939e49e5784b /lib | |
parent | 321925a18dd87b963bf16745a61751eeb8c2fa49 (diff) | |
download | rpm-946f17a9f8b21ffeda1af9b0925ba5c2752e052e.tar.gz rpm-946f17a9f8b21ffeda1af9b0925ba5c2752e052e.tar.bz2 rpm-946f17a9f8b21ffeda1af9b0925ba5c2752e052e.zip |
Remove unused dbi_txnid member from dbiIndex
- transactions aren't currently used, we'll need txnid handles eventually
but the dbi is unlikely to be the right level to store this, add
where actually needed when the time comes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backend/db3.c | 13 | ||||
-rw-r--r-- | lib/backend/dbi.h | 1 |
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/backend/db3.c b/lib/backend/db3.c index 14cfb44d6..549e4cd90 100644 --- a/lib/backend/db3.c +++ b/lib/backend/db3.c @@ -214,7 +214,7 @@ int dbiCopen(dbiIndex dbi, DBC ** dbcp, unsigned int dbiflags) } else flags = 0; - rc = db->cursor(db, dbi->dbi_txnid, &dbcursor, flags); + rc = db->cursor(db, NULL, &dbcursor, flags); rc = cvtdberr(dbi, "db->cursor", rc, _debug); if (dbcp) @@ -238,7 +238,7 @@ int dbiPut(dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, (void) rpmswEnter(&dbi->dbi_rpmdb->db_putops, (ssize_t) 0); if (dbcursor == NULL) { - rc = db->put(db, dbi->dbi_txnid, key, data, 0); + rc = db->put(db, NULL, key, data, 0); rc = cvtdberr(dbi, "db->put", rc, _debug); } else { rc = dbcursor->c_put(dbcursor, key, data, DB_KEYLAST); @@ -260,7 +260,7 @@ int dbiDel(dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, (void) rpmswEnter(&dbi->dbi_rpmdb->db_delops, 0); if (dbcursor == NULL) { - rc = db->del(db, dbi->dbi_txnid, key, flags); + rc = db->del(db, NULL, key, flags); rc = cvtdberr(dbi, "db->del", rc, _debug); } else { int _printit; @@ -296,7 +296,7 @@ int dbiGet(dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, assert(db != NULL); if (dbcursor == NULL) { /* XXX duplicates require cursors. */ - rc = db->get(db, dbi->dbi_txnid, key, data, 0); + rc = db->get(db, NULL, key, data, 0); /* XXX DB_NOTFOUND can be returned */ _printit = (rc == DB_NOTFOUND ? 0 : _debug); rc = cvtdberr(dbi, "db->get", rc, _printit); @@ -448,7 +448,6 @@ int dbiOpen(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) DB * db = NULL; DB_ENV * dbenv = NULL; - DB_TXN * txnid = NULL; uint32_t oflags; int _printit; @@ -601,7 +600,7 @@ int dbiOpen(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) fullpath = rpmGetPath(dbhome, "/", dbi->dbi_file, NULL); dbpath = fullpath; } - rc = (db->open)(db, txnid, dbpath, NULL, + rc = (db->open)(db, NULL, dbpath, NULL, dbi->dbi_dbtype, oflags, dbi->dbi_perms); if (rc == 0 && dbi->dbi_dbtype == DB_UNKNOWN) { @@ -617,8 +616,6 @@ int dbiOpen(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip) _printit = (rc > 0 ? 0 : _debug); xx = cvtdberr(dbi, "db->open", rc, _printit); - dbi->dbi_txnid = NULL; - /* * Lock a file using fcntl(2). Traditionally this is Packages, * the file used to store metadata of installed header(s), diff --git a/lib/backend/dbi.h b/lib/backend/dbi.h index d186d0bf0..fac2df7b6 100644 --- a/lib/backend/dbi.h +++ b/lib/backend/dbi.h @@ -75,7 +75,6 @@ struct _dbiIndex { dbiIndexType dbi_type; /*! Type of dbi (primary / index) */ DB * dbi_db; /*!< Berkeley DB * handle */ - DB_TXN * dbi_txnid; /*!< Bekerley DB_TXN * transaction id */ }; /** \ingroup dbi |