@@ -595,50 +595,6 @@ jobs:
595595 print('patched CreateTrigger to preserve original SQL text')
596596 PY_TRIGGER_SQL
597597
598- # Force temp tables to use MemoryIO under all conditions, to
599- # bypass the disk-temp pager's state-dependent
600- # `short read on page N` bug that breaks
601- # testCreateTemporaryTable + testTemporaryTableHasPriorityOverStandardTable.
602- #
603- # Setting this via runtime PRAGMA temp_store = MEMORY crashes
604- # testReconstructTable in the pager (memory:
605- # project_turso_testreconstructtable_fragile). Instead, patch
606- # `effective_temp_store` so it returns `TempStore::Memory`
607- # unconditionally — a compile-time change that doesn't go
608- # through `set_temp_store` / `bump_prepare_context_generation`,
609- # so testReconstructTable's prepared-statement cache is
610- # untouched.
611- python3 - <<'PY_TEMP_MEMORY'
612- p = 'core/connection.rs'
613- s = open(p).read()
614- old = (
615- " fn effective_temp_store(&self) -> crate::TempStore {\n"
616- " let temp_store = self.get_temp_store();\n"
617- " #[cfg(feature = \"fs\")]\n"
618- " {\n"
619- " temp_store\n"
620- " }\n"
621- " #[cfg(not(feature = \"fs\"))]\n"
622- " {\n"
623- " let _ = temp_store;\n"
624- " crate::TempStore::Memory\n"
625- " }\n"
626- " }\n"
627- )
628- new = (
629- " fn effective_temp_store(&self) -> crate::TempStore {\n"
630- " // Always use MemoryIO for temp tables: avoids a state-dependent\n"
631- " // `short read on page N` bug in the disk-temp pager that breaks\n"
632- " // testCreateTemporaryTable mid-suite under PHPUnit.\n"
633- " let _ = self.get_temp_store();\n"
634- " crate::TempStore::Memory\n"
635- " }\n"
636- )
637- assert old in s, 'effective_temp_store block not found'
638- open(p, 'w').write(s.replace(old, new, 1))
639- print('patched effective_temp_store to always return TempStore::Memory')
640- PY_TEMP_MEMORY
641-
642598 echo '--- Patched stub! macro ---'
643599 sed -n '/macro_rules! stub/,/^}$/p' sqlite3/src/lib.rs
644600
0 commit comments