diff --git a/storage/duckdb/README.md b/storage/duckdb/README.md index f72cd9aa0f6..a65283eb501 100644 --- a/storage/duckdb/README.md +++ b/storage/duckdb/README.md @@ -62,7 +62,7 @@ Tables created with `ENGINE=DuckDB` store data in DuckDB's native format. Querie ## Building -The engine is built as part of the MariaDB server tree. It lives under `storage/duckdb/` and uses `ExternalProject_Add` to build DuckDB v1.5.4 from source. +The engine is built as part of the MariaDB server tree. It lives under `storage/duckdb/` and uses `ExternalProject_Add` to build DuckDB v1.5.5 from source. Clone the branch matching your target MariaDB version. The engine is already part of the tree under `storage/duckdb/`: diff --git a/storage/duckdb/cmake/duckdb.cmake b/storage/duckdb/cmake/duckdb.cmake index 1eb9924924d..6b9e5809ffa 100644 --- a/storage/duckdb/cmake/duckdb.cmake +++ b/storage/duckdb/cmake/duckdb.cmake @@ -60,6 +60,14 @@ ADD_SUBMODULE(third_parties/duckdb) # reconciliation). Drop when the submodule is bumped to a release containing # the PR: the apply below will fail loudly on an already-present setval. SET(_DUCKDB_PATCH "${CMAKE_CURRENT_SOURCE_DIR}/patches/duckdb-pr24061-setval.diff") +EXECUTE_PROCESS( + COMMAND git -C "${DUCKDB_SUBMODULE_DIR}" rev-parse HEAD + OUTPUT_VARIABLE _DUCKDB_SOURCE_REVISION + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE _DUCKDB_GIT_RESULT) +IF(NOT _DUCKDB_GIT_RESULT EQUAL 0) + MESSAGE(FATAL_ERROR "Failed to determine the DuckDB submodule revision") +ENDIF() # Upstream sets DUCKDB_EXTENSION_JEMALLOC_LINKED via add_extension_definitions(), # which runs in extension/ but NOT in src/, so allocator.cpp (in duckdb_static) @@ -90,7 +98,7 @@ ExternalProject_Add(duckdb_build SOURCE_DIR "${DUCKDB_SUBMODULE_DIR}" BINARY_DIR "${_DUCKDB_BUILD_DIR}" # Idempotent: skip when the working tree already carries the patch. - PATCH_COMMAND bash -c "git apply --reverse --check '${_DUCKDB_PATCH}' 2>/dev/null || git apply --verbose '${_DUCKDB_PATCH}'" + PATCH_COMMAND bash -c "test \"$(git rev-parse HEAD)\" = '${_DUCKDB_SOURCE_REVISION}' && (git apply --reverse --check '${_DUCKDB_PATCH}' 2>/dev/null || git apply --verbose '${_DUCKDB_PATCH}')" CMAKE_ARGS -DCMAKE_BUILD_TYPE=${_DUCKDB_BUILD_TYPE} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} @@ -107,7 +115,7 @@ ExternalProject_Add(duckdb_build "-DCMAKE_CXX_FLAGS=${_DUCKDB_EXTRA_CXX_FLAGS}" -DENABLE_SANITIZER=${ADDRESS_SANITIZER} -DENABLE_UBSAN=${UB_SANITIZER} - -DOVERRIDE_GIT_DESCRIBE=v1.5.4-0-g0000000000 + -DOVERRIDE_GIT_DESCRIBE=v1.5.5-0-g0000000000 INSTALL_COMMAND "" BUILD_BYPRODUCTS ${_DUCKDB_STATIC_LIBS} USES_TERMINAL_BUILD ON diff --git a/storage/duckdb/docs/architecture.md b/storage/duckdb/docs/architecture.md index b87a027b984..3b5a2709133 100644 --- a/storage/duckdb/docs/architecture.md +++ b/storage/duckdb/docs/architecture.md @@ -326,5 +326,5 @@ storage/duckdb/ │ └── row_helpers.h — byte-level row reading utilities │ ├── cmake/ — DuckDB build integration (ExternalProject_Add) -└── third_parties/duckdb/ — upstream DuckDB submodule (v1.5.4) +└── third_parties/duckdb/ — upstream DuckDB submodule (v1.5.5) ``` diff --git a/storage/duckdb/docs/mariadb-duckdb-incompatibilities.md b/storage/duckdb/docs/mariadb-duckdb-incompatibilities.md index 512488a5b7d..636bc2e90c3 100644 --- a/storage/duckdb/docs/mariadb-duckdb-incompatibilities.md +++ b/storage/duckdb/docs/mariadb-duckdb-incompatibilities.md @@ -1,7 +1,7 @@ # MariaDB - DuckDB Incompatibilities Discovered during porting the DuckDB storage engine plugin to MariaDB 12. -DuckDB upstream version: **v1.5.4** (submodule at `third_parties/duckdb/`). +DuckDB upstream version: **v1.5.5** (submodule at `third_parties/duckdb/`). ---