You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: sqlite_execute runs only the first statement #928
execute_sync in src-tauri/crates/mas-sqlite/src/query.rs passes the whole SQL string to db.prepare / db.execute. rusqlite compiles only the first statement and ignores the rest without an error. So a script run on a SQLite connection does only its first statement and still reports success.
The mock (src/dev/mock/handlers/sqlite.ts) splits on ;, which hides this from the preview and from the frontend tests.
Reproduce
Run CREATE TABLE a(x); CREATE TABLE b(y); on a SQLite connection: only a is created.
Fix
Loop over the statements (use the tail rusqlite's prepare leaves, or Batch) and return one result per statement, as the MySQL executor does, including the statement index on an error. Add tests for a two-statement script and for a failure in the second statement. Make the mock split the same way the backend does.
Activity