diff options
| author | the lemons <citrons@mondecitronne.com> | 2022-12-05 20:00:26 -0600 |
|---|---|---|
| committer | the lemons <citrons@mondecitronne.com> | 2022-12-05 20:00:26 -0600 |
| commit | 4384b3d0bdeca1fa3df5bb8a7cc13cf043b8c3a6 (patch) | |
| tree | 7c4dbf2fa07708cb400453ec20804fd6ddff6249 /lmdb.c | |
| parent | 187933ca79bfbad8ca06505fcd18dacc8ee66925 (diff) | |
env:txn_begin(): make read-only by default
this is more sensible behavior. read-write transactions are less
performant, so the programmer should have to engage them explicitly.
Diffstat (limited to 'lmdb.c')
| -rw-r--r-- | lmdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -146,7 +146,7 @@ static int txn_begin(lua_State *L, bool nested) { MDB_txn *txn; reterr(mdb_txn_begin( - env, parent, lua_toboolean(L, 2) ? MDB_RDONLY : 0, &txn)); + env, parent, lua_toboolean(L, 2) || nested ? 0 : MDB_RDONLY, &txn)); struct handle *tud = lua_newuserdata(L, sizeof(struct handle)); tud->closed = false; |
