Skip to content

Commit 0716920

Browse files
author
JkLondon
committed
new mdbx version 0.39.13
1 parent b3d5445 commit 0716920

22 files changed

+6637
-12452
lines changed

libmdbx/CMakeLists.txt

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
132132
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/preface.h"
133133
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/proto.h"
134134
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/refund.c"
135-
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/rkl.c"
136-
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/rkl.h"
137135
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/sort.h"
138136
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.c"
139137
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.h"
@@ -151,9 +149,6 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
151149
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tree-ops.c"
152150
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.c"
153151
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.h"
154-
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-basal.c"
155-
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-nested.c"
156-
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-ro.c"
157152
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn.c"
158153
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/unaligned.h"
159154
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/utils.c"
@@ -331,6 +326,19 @@ if(NOT APPLE
331326
endif()
332327
endif()
333328

329+
check_function_exists(pow NOT_NEED_LIBM)
330+
if(NOT_NEED_LIBM)
331+
set(LIB_MATH "")
332+
else()
333+
set(CMAKE_REQUIRED_LIBRARIES m)
334+
check_function_exists(pow HAVE_LIBM)
335+
if(HAVE_LIBM)
336+
set(LIB_MATH m)
337+
else()
338+
message(FATAL_ERROR "No libm found for math support")
339+
endif()
340+
endif()
341+
334342
if(SUBPROJECT)
335343
if(NOT DEFINED BUILD_SHARED_LIBS)
336344
option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)" OFF)
@@ -838,8 +846,6 @@ else()
838846
"${MDBX_SOURCE_DIR}/preface.h"
839847
"${MDBX_SOURCE_DIR}/proto.h"
840848
"${MDBX_SOURCE_DIR}/refund.c"
841-
"${MDBX_SOURCE_DIR}/rkl.c"
842-
"${MDBX_SOURCE_DIR}/rkl.h"
843849
"${MDBX_SOURCE_DIR}/sort.h"
844850
"${MDBX_SOURCE_DIR}/spill.c"
845851
"${MDBX_SOURCE_DIR}/spill.h"
@@ -849,9 +855,6 @@ else()
849855
"${MDBX_SOURCE_DIR}/tree-ops.c"
850856
"${MDBX_SOURCE_DIR}/txl.c"
851857
"${MDBX_SOURCE_DIR}/txl.h"
852-
"${MDBX_SOURCE_DIR}/txn-basal.c"
853-
"${MDBX_SOURCE_DIR}/txn-nested.c"
854-
"${MDBX_SOURCE_DIR}/txn-ro.c"
855858
"${MDBX_SOURCE_DIR}/txn.c"
856859
"${MDBX_SOURCE_DIR}/unaligned.h"
857860
"${MDBX_SOURCE_DIR}/utils.c"
@@ -1040,6 +1043,10 @@ if(MDBX_BUILD_TOOLS)
10401043
target_setup_options(mdbx_${TOOL})
10411044
target_link_libraries(mdbx_${TOOL} ${TOOL_MDBX_LIB})
10421045
endforeach()
1046+
if(LIB_MATH)
1047+
target_link_libraries(mdbx_chk ${LIB_MATH})
1048+
target_link_libraries(mdbx_stat ${LIB_MATH})
1049+
endif()
10431050
endif()
10441051

10451052
# ######################################################################################################################

libmdbx/ChangeLog.md

Lines changed: 2129 additions & 1469 deletions
Large diffs are not rendered by default.

libmdbx/GNUmakefile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,11 @@ endef
106106
define uname2ldflags
107107
case "$(UNAME)" in
108108
CYGWIN*|MINGW*|MSYS*|Windows*)
109-
echo '-Wl,--gc-sections,-O1,--as-needed';
109+
echo '-Wl,--gc-sections,-O1';
110110
;;
111111
*)
112112
$(LD) --help 2>/dev/null | grep -q -- --gc-sections && echo '-Wl,--gc-sections,-z,relro,-O1';
113113
$(LD) --help 2>/dev/null | grep -q -- -dead_strip && echo '-Wl,-dead_strip';
114-
$(LD) --help 2>/dev/null | grep -q -- --as-needed && echo '-Wl,--as-needed';
115114
;;
116115
esac
117116
endef
@@ -120,16 +119,16 @@ endef
120119
define uname2libs
121120
case "$(UNAME)" in
122121
CYGWIN*|MINGW*|MSYS*|Windows*)
123-
echo '-lntdll -lwinmm';
122+
echo '-lm -lntdll -lwinmm';
124123
;;
125124
*SunOS*|*Solaris*)
126-
echo '-lkstat -lrt';
125+
echo '-lm -lkstat -lrt';
127126
;;
128127
*Darwin*|OpenBSD*)
129-
echo '';
128+
echo '-lm';
130129
;;
131130
*)
132-
echo '-lrt';
131+
echo '-lm -lrt';
133132
;;
134133
esac
135134
endef
@@ -267,9 +266,9 @@ lib-shared libmdbx.$(SO_SUFFIX): mdbx-dylib.o $(call select_by,MDBX_BUILD_CXX,md
267266
@echo ' LD $@'
268267
$(QUIET)$(call select_by,MDBX_BUILD_CXX,$(CXX) $(CXXFLAGS),$(CC) $(CFLAGS)) $^ -pthread -shared $(LDFLAGS) $(call select_by,MDBX_BUILD_CXX,$(LIB_STDCXXFS)) $(LIBS) -o $@
269268

270-
ninja-assertions: CMAKE_OPT += -DMDBX_FORCE_ASSERTIONS=ON $(MDBX_BUILD_OPTIONS)
269+
ninja-assertions: CMAKE_OPT += -DMDBX_FORCE_ASSERTIONS=ON
271270
ninja-assertions: cmake-build
272-
ninja-debug: CMAKE_OPT += -DCMAKE_BUILD_TYPE=Debug $(MDBX_BUILD_OPTIONS)
271+
ninja-debug: CMAKE_OPT += -DCMAKE_BUILD_TYPE=Debug
273272
ninja-debug: cmake-build
274273
ninja: cmake-build
275274
cmake-build:
@@ -284,7 +283,7 @@ ctest: cmake-build
284283
# Amalgamated source code, i.e. distributed after `make dist`
285284
MAN_SRCDIR := man1/
286285

287-
config-gnumake.h: @buildflags.tag $(WAIT) mdbx.c $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE COPYRIGHT
286+
config-gnumake.h: @buildflags.tag $(WAIT) mdbx.c $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE
288287
@echo ' MAKE $@'
289288
$(QUIET)(echo '#define MDBX_BUILD_TIMESTAMP "$(MDBX_BUILD_TIMESTAMP)"' \
290289
&& echo "#define MDBX_BUILD_FLAGS \"$$(cat @buildflags.tag)\"" \
@@ -294,19 +293,19 @@ config-gnumake.h: @buildflags.tag $(WAIT) mdbx.c $(lastword $(MAKEFILE_LIST)) LI
294293
&& echo '#define MDBX_BUILD_METADATA "$(MDBX_BUILD_METADATA)"' \
295294
) >$@
296295

297-
mdbx-dylib.o: config-gnumake.h mdbx.c mdbx.h $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE COPYRIGHT
296+
mdbx-dylib.o: config-gnumake.h mdbx.c mdbx.h $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE
298297
@echo ' CC $@'
299298
$(QUIET)$(CC) $(CFLAGS) $(MDBX_BUILD_OPTIONS) '-DMDBX_CONFIG_H="config-gnumake.h"' -DLIBMDBX_EXPORTS=1 -c mdbx.c -o $@
300299

301-
mdbx-static.o: config-gnumake.h mdbx.c mdbx.h $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE COPYRIGHT
300+
mdbx-static.o: config-gnumake.h mdbx.c mdbx.h $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE
302301
@echo ' CC $@'
303302
$(QUIET)$(CC) $(CFLAGS) $(MDBX_BUILD_OPTIONS) '-DMDBX_CONFIG_H="config-gnumake.h"' -ULIBMDBX_EXPORTS -c mdbx.c -o $@
304303

305-
mdbx++-dylib.o: config-gnumake.h mdbx.c++ mdbx.h mdbx.h++ $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE COPYRIGHT
304+
mdbx++-dylib.o: config-gnumake.h mdbx.c++ mdbx.h mdbx.h++ $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE
306305
@echo ' CC $@'
307306
$(QUIET)$(CXX) $(CXXFLAGS) $(MDBX_BUILD_OPTIONS) '-DMDBX_CONFIG_H="config-gnumake.h"' -DLIBMDBX_EXPORTS=1 -c mdbx.c++ -o $@
308307

309-
mdbx++-static.o: config-gnumake.h mdbx.c++ mdbx.h mdbx.h++ $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE COPYRIGHT
308+
mdbx++-static.o: config-gnumake.h mdbx.c++ mdbx.h mdbx.h++ $(lastword $(MAKEFILE_LIST)) LICENSE NOTICE
310309
@echo ' CC $@'
311310
$(QUIET)$(CXX) $(CXXFLAGS) $(MDBX_BUILD_OPTIONS) '-DMDBX_CONFIG_H="config-gnumake.h"' -ULIBMDBX_EXPORTS -c mdbx.c++ -o $@
312311

libmdbx/README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,35 @@ Telegram Group archive: [1](https://libmdbx.dqdkfa.ru/tg-archive/messages1.html)
3434

3535
### in English
3636

37-
For ease of use and to eliminate potential limitations in both distribution and obstacles in technology development, _libmdbx_ is distributed as an amalgamated source code starting at the end of 2025. The source code of the tests, as well as the internal documentation, will be available only to the team directly involved in the development. A little later, a new _libmdbx_ development strategy will be published, the essence of which is the continuous movement towards the _MithrilDB_. In this regard, some of the information provided below and in other parts of the documentation may be inaccurate or inapplicable. We will try to resolve all discrepancies as quickly as possible.
37+
The mirror on github is no longer being updated or used. The _libmdbx_ project has been completely relocated to the jurisdiction of the Russian Federation.
38+
Please refer to https://libmdbx.dqdkfa.ru for documentation and https://sourcecraft.dev/dqdkfa/libmdbx for the source code (it is still open and provided with first-class free support).
39+
Regardless of anything else, I would like to thank [Erigon](https://erigon.tech/) once again for the sponsorship.
3840

39-
The _libmdbx_ code will forever remain open and with high-quality free support, as far as the life circumstances of the project participants allow. However, support will be provided only for officially published versions of the code. As an identity criterion, the `git tree hash` must match the signed commit in the _libmdbx_ public repository. For all other cases, paid support will be offered. We will also insist and enforce that all derivative versions comply with the license requirements, including the explicit presence of a notice stating that such derivative modified code originates from _libdmbx_, but is no longer original and supported, and is not subject to any quality guarantees from _libmdbx_.
41+
##### Explanations
42+
43+
In the spring of 2022, without any warnings or explanations, the Github administration deleted my account and all projects. A few months later, without any involvement or notification from me, the projects were restored/opened in the "public read-only archive" status from some kind of incomplete backup. I regard these actions of Github as malicious sabotage, and I consider the Github service itself to have lost any trust forever.
44+
45+
As a result of what has happened, I will never, under any circumstances, post the primary sources (aka origins) of my projects on Github, or rely in any way on the Github infrastructure.
46+
47+
Nonetheless, taking into account that it is more convenient for users of my projects to access them on Github, I did not want to restrict their freedom or create inconvenience, and therefore I posted mirrors on Github.
48+
However, it was noticed that despite the development of _libmdbx_, free support and consultations, many projects and users deviated from the rules of a fair deal and instead of helping and building relationships, they began to adjust links and delete references in violation of the license.
49+
Therefore, in protest against such unworthy actions, on December 10, 2025, I decided to abandon the placement of mirrors on Github.
4050

4151
### на Русском (мой родной язык)
4252

43-
Для удобства использования и устранения потенциальных ограничений как в распространении, так и препятствий в разработке технологий, начиная с конца 2025 года _libmdbx_ распространяется в виде амальгамированного исходного кода. Исходный код тестов, как и внутренняя документация будет доступна только команде непосредственно занимающейся разработкой. Чуть позже будет опубликована новая стратегия развития _libmdbx_, суть которой в непрерывном движении к _MithrilDB_. В связи с этим часть информации изложенной ниже и в других частях документации может быть неточной или неприменимой. Мы постараемся устранить все несоответствия по-быстрее.
53+
Зеркало на github больше не обновляется и не используется. Проект _libmdbx_ полностью перемещен в юрисдикцию Российской Федерации.
54+
Пожалуйста обращайтесь на https://libmdbx.dqdkfa.ru за документацией и на https://sourcecraft.dev/dqdkfa/libmdbx за исходным кодом (он по-прежнему открыт и обеспечен первоклассной бесплатной поддержкой).
55+
Вне зависимости от прочего хочу ещё раз поблагодарить [Erigon](https://erigon.tech/) за спонсорскую помощь.
56+
57+
##### Пояснения
58+
59+
Весной 2022, без каких-либо предупреждений или пояснений, администрация Github удалила мой аккаунт и все проекты. Через несколько месяцев, без какого-либо моего участия или уведомления, проекты были восстановлены/открыты в статусе "public read-only archive" из какой-то неполноценной резервной копии. Эти действия Github я расцениваю как злонамеренный саботаж, а сам сервис Github считаю навсегда утратившим какое-либо доверие.
60+
61+
Вследствие произошедшего, никогда и ни при каких условиях, я не буду размещать на Github первоисточники (aka origins) моих проектов, либо как-либо полагаться на инфраструктуру Github.
4462

45-
Код _libmdbx_ навсегда останется открытым и с качественной бесплатной поддержкой, насколько это позволят жизненные обстоятельства участников проекта. Однако, поддержка будет оказываться только для официально публикуемых версий кода. В качестве критерия идентичности требуется совпадение `git tree hash` с подписанным коммитом в публичном репозитории _libmdbx_. Для всех остальных случаев будет предлагаться платная поддержка. Также мы будем настаивать и добиваться выполнения всеми производными версиями требований лицензии, включая явное присутствие уведомления о том, что такой производный модифицированный код происходит от _libdmbx_, но уже не является оригинальным и поддерживаемым, и на него не распространяются какие-либо гарантии качества _libmdbx_.
63+
Тем не менее, принимая во внимание что пользователям моих проектов удобнее получать к ним доступ именно на Github, я не хотел ограничивать их свободу или создавать неудобство, и поэтому размещал зеркала на Github.
64+
Однако, было замечено, что несмотря на развитие _libmdbx_, бесплатную поддержку и консультации, многие проекты и пользователи отошли от правил честной сделки и вместо помощи и налаживания отношений стали корректировать ссылки и удалять упоминания в нарушение лицензии.
65+
Поэтому в знак протеста таким действиям, 10 декабря 2025 года я решил отказаться от размещения зеркал на Github.
4666

4767
## MithrilDB and Future
4868

libmdbx/VERSION.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "git_describe": "v0.14.1-194-g8df81952", "git_timestamp": "2025-12-23T09:45:51+03:00", "git_tree": "c9423dd1f395de3f5910169a366e2dedc625a729", "git_commit": "8df819528ac4e4fcd67ec4f2986d6cd18089734a", "semver": "0.14.1.194" }
1+
{ "git_describe": "v0.13.10-0-gcc5debac", "git_timestamp": "2025-12-17T16:38:01+03:00", "git_tree": "5f2fb7cf4d63674a38de546c2f5ee5613221b683", "git_commit": "cc5debac5bed76b4a680c5d64feb0f633e9165e1", "semver": "0.13.10" }

libmdbx/cmake/utils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ macro(semver_provide name source_root_directory build_directory_for_json_output
379379
endif()
380380
if(_source_root STREQUAL _git_root AND EXISTS "${_git_root}/VERSION.json")
381381
message(
382-
WARNING
382+
FATAL_ERROR
383383
"Несколько источников информации о версии, допустим только один из: репозиторий git, либо файл VERSION.json"
384384
)
385385
endif()

libmdbx/man1/mdbx_chk.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Copyright 2015-2025 Leonid Yuriev <leo@yuriev.ru>.
22
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
3-
.TH MDBX_CHK 1 "2025-01-14" "MDBX 0.14"
3+
.TH MDBX_CHK 1 "2024-08-29" "MDBX 0.13"
44
.SH NAME
55
mdbx_chk \- MDBX checking tool
66
.SH SYNOPSIS

libmdbx/man1/mdbx_copy.1

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
33
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
44
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
5-
.TH MDBX_COPY 1 "2025-01-14" "MDBX 0.14"
5+
.TH MDBX_COPY 1 "2024-08-29" "MDBX 0.13"
66
.SH NAME
77
mdbx_copy \- MDBX environment copy tool
88
.SH SYNOPSIS
@@ -14,8 +14,6 @@ mdbx_copy \- MDBX environment copy tool
1414
[\c
1515
.BR \-c ]
1616
[\c
17-
.BR \-f ]
18-
[\c
1917
.BR \-d ]
2018
[\c
2119
.BR \-p ]
@@ -51,9 +49,6 @@ or unused pages will be omitted from the copy. This option will
5149
slow down the backup process as it is more CPU-intensive.
5250
Currently it fails if the environment has suffered a page leak.
5351
.TP
54-
.BR \-f
55-
Silently overwrite the target file, if it exists, instead of reaching an error.
56-
.TP
5752
.BR \-d
5853
Alters geometry to enforce the copy to be a dynamic size DB,
5954
which could be growth and shrink by reasonable steps on the fly.

libmdbx/man1/mdbx_drop.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" Copyright 2021-2025 Leonid Yuriev <leo@yuriev.ru>.
22
.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
33
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4-
.TH MDBX_DROP 1 "2025-01-14" "MDBX 0.14"
4+
.TH MDBX_DROP 1 "2024-08-29" "MDBX 0.13"
55
.SH NAME
66
mdbx_drop \- MDBX database delete tool
77
.SH SYNOPSIS

libmdbx/man1/mdbx_dump.1

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
33
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
44
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
5-
.TH MDBX_DUMP 1 "2025-01-14" "MDBX 0.14"
5+
.TH MDBX_DUMP 1 "2024-08-29" "MDBX 0.13"
66
.SH NAME
77
mdbx_dump \- MDBX environment export tool
88
.SH SYNOPSIS
@@ -12,8 +12,6 @@ mdbx_dump \- MDBX environment export tool
1212
[\c
1313
.BR \-q ]
1414
[\c
15-
.BR \-c ]
16-
[\c
1715
.BI \-f \ file\fR]
1816
[\c
1917
.BR \-l ]
@@ -43,9 +41,6 @@ Write the library version number to the standard output, and exit.
4341
.BR \-q
4442
Be quiet.
4543
.TP
46-
.BR \-c
47-
Concise mode without repeating keys in a dump, but incompatible with Berkeley DB and LMDB.
48-
.TP
4944
.BR \-f \ file
5045
Write to the specified file instead of to the standard output.
5146
.TP

0 commit comments

Comments
 (0)