From 9277daa1850ab22d933be080cf9d171617becd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sun, 2 Mar 2025 11:44:10 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=B0=D1=8F=20=D0=BE=D1=87=D0=B8=D1=81=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BA=D1=83=D1=80=D1=81=D0=BE=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D1=82?= =?UTF-8?q?=D0=B8=D0=B8/=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B8=20(backport).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api-cursor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api-cursor.c b/src/api-cursor.c index a10e09ef..f58d37f5 100644 --- a/src/api-cursor.c +++ b/src/api-cursor.c @@ -121,8 +121,8 @@ int mdbx_cursor_unbind(MDBX_cursor *mc) { } mc->next = mc; } + be_poor(mc); mc->signature = cur_signature_ready4dispose; - mc->flags = 0; return MDBX_SUCCESS; } @@ -171,6 +171,7 @@ void mdbx_cursor_close(MDBX_cursor *mc) { /* Cursor closed before nested txn ends */ tASSERT(txn, mc->signature == cur_signature_live); ENSURE(txn->env, check_txn_rw(txn, 0) == MDBX_SUCCESS); + be_poor(mc); mc->signature = cur_signature_wait4eot; } } @@ -218,8 +219,8 @@ int mdbx_txn_release_all_cursors(const MDBX_txn *txn, bool unbind) { txn->cursors[i] = mc->next; mc->next = mc; if (unbind) { + be_poor(mc); mc->signature = cur_signature_ready4dispose; - mc->flags = 0; } else { mc->signature = 0; osal_free(mc);