mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 22:44:14 +08:00
mdbx: Merge branch 'devel'.
This commit is contained in:
commit
950e587742
7
Makefile
7
Makefile
@ -67,7 +67,7 @@ install: $(LIBRARIES) $(TOOLS) $(HEADERS)
|
|||||||
&& cp -t $(SANDBOX)$(mandir)/man1 $(MANPAGES)
|
&& cp -t $(SANDBOX)$(mandir)/man1 $(MANPAGES)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(TOOLS )$(TESTS) @* *.[ao] *.[ls]o *~ testdb/* *.gcov
|
rm -rf $(TOOLS) $(TESTS) @* *.[ao] *.[ls]o *~ testdb/* *.gcov
|
||||||
|
|
||||||
tests: $(TESTS)
|
tests: $(TESTS)
|
||||||
|
|
||||||
@ -199,8 +199,9 @@ bench: bench-lmdb.txt bench-mdbx.txt
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ci-rule = ( CC=$$(which $1); if [ -n "$$CC" ]; then \
|
ci-rule = ( CC=$$(which $1); if [ -n "$$CC" ]; then \
|
||||||
CC=$$(readlink -f $$CC); echo -n "probe by $2 ($$CC): " && \
|
echo -n "probe by $2 ($$CC): " && \
|
||||||
$(MAKE) XCFLAGS="-UNDEBUG -DMDB_DEBUG=2" clean >$1.log 2>$1.err && $(MAKE) all check 1>$1.log 2>$1.err && echo "OK" \
|
$(MAKE) clean >$1.log 2>$1.err && \
|
||||||
|
$(MAKE) CC=$$(readlink -f $$CC) XCFLAGS="-UNDEBUG -DMDB_DEBUG=2" all check 1>$1.log 2>$1.err && echo "OK" \
|
||||||
|| ( echo "FAILED"; cat $1.err >&2; exit 1 ); \
|
|| ( echo "FAILED"; cat $1.err >&2; exit 1 ); \
|
||||||
else echo "no $2 ($1) for probe"; fi; )
|
else echo "no $2 ($1) for probe"; fi; )
|
||||||
ci:
|
ci:
|
||||||
|
5
mdb.c
5
mdb.c
@ -1223,7 +1223,7 @@ static txnid_t mdbx_oomkick(MDB_env *env, txnid_t oldest);
|
|||||||
#endif /* MDBX_MODE_ENABLED */
|
#endif /* MDBX_MODE_ENABLED */
|
||||||
|
|
||||||
static void mdb_debug_log(int type, const char *function, int line, const char *fmt, ...)
|
static void mdb_debug_log(int type, const char *function, int line, const char *fmt, ...)
|
||||||
__attribute__((format(gnu_printf, 4, 5)));
|
__attribute__((format(printf, 4, 5)));
|
||||||
|
|
||||||
#if MDB_DEBUG
|
#if MDB_DEBUG
|
||||||
static txnid_t mdb_debug_edge;
|
static txnid_t mdb_debug_edge;
|
||||||
@ -1403,7 +1403,7 @@ mdb_page_list(MDB_page *mp)
|
|||||||
pgno, ((MDB_meta *)PAGEDATA(mp))->mm_txnid);
|
pgno, ((MDB_meta *)PAGEDATA(mp))->mm_txnid);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
mdb_print("Bad page %zu flags 0x%u\n", pgno, mp->mp_flags);
|
mdb_print("Bad page %zu flags 0x%X\n", pgno, mp->mp_flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7303,6 +7303,7 @@ mdb_node_add(MDB_cursor *mc, indx_t indx,
|
|||||||
key ? key->mv_size : 0, key ? DKEY(key) : "null");
|
key ? key->mv_size : 0, key ? DKEY(key) : "null");
|
||||||
|
|
||||||
if (IS_LEAF2(mp)) {
|
if (IS_LEAF2(mp)) {
|
||||||
|
mdb_cassert(mc, key);
|
||||||
/* Move higher keys up one slot. */
|
/* Move higher keys up one slot. */
|
||||||
int ksize = mc->mc_db->md_xsize, dif;
|
int ksize = mc->mc_db->md_xsize, dif;
|
||||||
char *ptr = LEAF2KEY(mp, indx, ksize);
|
char *ptr = LEAF2KEY(mp, indx, ksize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user