Skip to content

Commit e3122aa

Browse files
committed
Revert PRAGMA paren-strip patch (causes segfault at testReconstructTable)
The Turso PRAGMA table_info default-emit rewrite compiled cleanly but triggered a process-level segfault ~20s into testReconstructTable in the reconstructor pass. The build-completion of the prior commit (173d9d5) confirmed 571/596 passing, so this rollback restores the stable state while we investigate the PRAGMA patch interaction.
1 parent bfe3f31 commit e3122aa

1 file changed

Lines changed: 0 additions & 41 deletions

File tree

.github/workflows/phpunit-tests-turso.yml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -433,47 +433,6 @@ jobs:
433433
print('patched delete.rs to allow DELETE FROM sqlite_sequence')
434434
PY_DELETE_SEQ
435435
436-
# PRAGMA table_info/table_xinfo reports the default expression by
437-
# serializing the stored AST back to a string, which keeps any outer
438-
# parens the user wrote. Real SQLite strips one level of outer
439-
# parens for balanced `(expr)` forms, so `DEFAULT (CURRENT_TIMESTAMP)`
440-
# round-trips through PRAGMA as `CURRENT_TIMESTAMP`. Match that.
441-
python3 - <<'PY_PRAGMA_DEFAULT'
442-
p = 'core/translate/pragma.rs'
443-
s = open(p).read()
444-
old = (
445-
" Some(expr) => {\n"
446-
" program.emit_string8(expr.to_string(), base_reg + 4);\n"
447-
" }\n"
448-
)
449-
new = (
450-
" Some(expr) => {\n"
451-
" // Match SQLite: strip a single pair of balanced\n"
452-
" // outer parens from the default expression.\n"
453-
" let raw = expr.to_string();\n"
454-
" let trimmed = raw.trim();\n"
455-
" let stripped: String = if trimmed.starts_with('(') && trimmed.ends_with(')') {\n"
456-
" let inner = &trimmed[1..trimmed.len() - 1];\n"
457-
" let mut depth: i32 = 0;\n"
458-
" let mut outer = true;\n"
459-
" for c in inner.chars() {\n"
460-
" if c == '(' { depth += 1; }\n"
461-
" else if c == ')' {\n"
462-
" if depth == 0 { outer = false; break; }\n"
463-
" depth -= 1;\n"
464-
" }\n"
465-
" }\n"
466-
" if outer && depth == 0 { inner.trim().to_string() }\n"
467-
" else { raw.clone() }\n"
468-
" } else { raw.clone() };\n"
469-
" program.emit_string8(stripped, base_reg + 4);\n"
470-
" }\n"
471-
)
472-
assert old in s, 'PRAGMA table_info default-emit block not found'
473-
open(p, 'w').write(s.replace(old, new, 1))
474-
print('patched PRAGMA table_info to strip outer parens from default')
475-
PY_PRAGMA_DEFAULT
476-
477436
echo '--- Patched stub! macro ---'
478437
sed -n '/macro_rules! stub/,/^}$/p' sqlite3/src/lib.rs
479438

0 commit comments

Comments
 (0)