Skip to content

Commit 7e880ca

Browse files
committed
Permanently revert PRAGMA paren-strip (confirmed segfault trigger)
Two attempts with different Rust code both crash testReconstructTable with SIGSEGV. The patch itself compiles cleanly, but reconstructor PRAGMA table_info queries hit the modified emit path and the process dies. Likely a Turso-internal interaction we don't understand. Accept the 2 testCreateTableWithDefault* failures and keep the stable 572/596 baseline.
1 parent 1d462a5 commit 7e880ca

1 file changed

Lines changed: 0 additions & 42 deletions

File tree

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

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -433,48 +433,6 @@ jobs:
433433
print('patched delete.rs to allow DELETE FROM sqlite_sequence')
434434
PY_DELETE_SEQ
435435
436-
# PRAGMA table_info serializes default-expr AST back to a string
437-
# and keeps any outer parens. Real SQLite strips one level of
438-
# balanced outer parens; match that.
439-
python3 - <<'PY_PRAGMA_DEFAULT'
440-
p = 'core/translate/pragma.rs'
441-
s = open(p).read()
442-
old = (
443-
" Some(expr) => {\n"
444-
" program.emit_string8(expr.to_string(), base_reg + 4);\n"
445-
" }\n"
446-
)
447-
new = (
448-
" Some(expr) => {\n"
449-
" let raw = expr.to_string();\n"
450-
" let bytes = raw.as_bytes();\n"
451-
" let len = bytes.len();\n"
452-
" let stripped: String = if len >= 2 && bytes[0] == b'(' && bytes[len - 1] == b')' {\n"
453-
" let mut depth: i32 = 0;\n"
454-
" let mut ok = true;\n"
455-
" for i in 1..len - 1 {\n"
456-
" if bytes[i] == b'(' { depth += 1; }\n"
457-
" else if bytes[i] == b')' {\n"
458-
" if depth == 0 { ok = false; break; }\n"
459-
" depth -= 1;\n"
460-
" }\n"
461-
" }\n"
462-
" if ok && depth == 0 {\n"
463-
" raw[1..len - 1].trim().to_string()\n"
464-
" } else {\n"
465-
" raw.clone()\n"
466-
" }\n"
467-
" } else {\n"
468-
" raw.clone()\n"
469-
" };\n"
470-
" program.emit_string8(stripped, base_reg + 4);\n"
471-
" }\n"
472-
)
473-
assert old in s, 'PRAGMA table_info default-emit block not found'
474-
open(p, 'w').write(s.replace(old, new, 1))
475-
print('patched PRAGMA table_info to strip outer parens from default')
476-
PY_PRAGMA_DEFAULT
477-
478436
echo '--- Patched stub! macro ---'
479437
sed -n '/macro_rules! stub/,/^}$/p' sqlite3/src/lib.rs
480438

0 commit comments

Comments
 (0)