Skip to content

Commit f9e99dc

Browse files
Fix worker-thread and linkage crashes
Scalar and cast bodies run MEOS on DuckDB TaskScheduler worker threads, which need a per-thread meos_initialize(); a thread-local guard in the scalar exec wrapper and a cast trampoline (RegisterMeosCastFunction) cover every entry point, so timestamp formatting no longer dereferences a NULL session_timezone. Per-type DuckDB callbacks and blob helpers have internal linkage and a single canonical blob round-trip (TemporalToBlob / BlobToTemporal) declared once in temporal/temporal_blob.hpp, so each function-pointer registration binds to its own body. (cherry picked from commit 7b99a0c)
1 parent 45df2ad commit f9e99dc

24 files changed

Lines changed: 352 additions & 1725 deletions

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ set(EXTENSION_SOURCES
5959
src/spatial_ref_sys_csv.inc
6060
src/mobilityduck_extension.cpp
6161
src/temporal/temporal.cpp
62+
src/temporal/temporal_blob.cpp
6263
src/temporal/temporal_functions.cpp
6364
src/temporal/temporal_aggregates.cpp
6465
src/temporal/tbox.cpp

0 commit comments

Comments
 (0)