mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: backport - ITS#8424 init cursor in mdb_env_cwalk.
Change-Id: I979b6f492c56d1c61ce233727ff058df48f327d1
This commit is contained in:
parent
e84b420227
commit
856f30b52c
5
mdb.c
5
mdb.c
@ -9187,7 +9187,7 @@ mdb_env_cthr_toggle(mdb_copy *my, int st)
|
|||||||
static int __cold
|
static int __cold
|
||||||
mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags)
|
mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags)
|
||||||
{
|
{
|
||||||
MDB_cursor mc;
|
MDB_cursor mc = {0};
|
||||||
MDB_txn *txn = my->mc_txn;
|
MDB_txn *txn = my->mc_txn;
|
||||||
MDB_node *ni;
|
MDB_node *ni;
|
||||||
MDB_page *mo, *mp, *leaf;
|
MDB_page *mo, *mp, *leaf;
|
||||||
@ -9200,10 +9200,9 @@ mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags)
|
|||||||
return MDB_SUCCESS;
|
return MDB_SUCCESS;
|
||||||
|
|
||||||
mc.mc_snum = 1;
|
mc.mc_snum = 1;
|
||||||
mc.mc_top = 0;
|
|
||||||
mc.mc_txn = txn;
|
mc.mc_txn = txn;
|
||||||
|
|
||||||
rc = mdb_page_get(my->mc_txn, *pg, &mc.mc_pg[0], NULL);
|
rc = mdb_page_get(txn, *pg, &mc.mc_pg[0], NULL);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
rc = mdb_page_search_root(&mc, NULL, MDB_PS_FIRST);
|
rc = mdb_page_search_root(&mc, NULL, MDB_PS_FIRST);
|
||||||
|
Loading…
Reference in New Issue
Block a user