Conversation
589bf56 to
16b7135
Compare
|
nit for alter.rs lines 2167, 2393, 2399, 2455, 2519, 2557, 2781, 3162, 4145...: replace |
| } | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
There was a problem hiding this comment.
There are two (identical?) TemporaryKeyword enums, one here, one in ast.rs. The could probably be deduplicated.
| @@ -118,7 +118,7 @@ impl fmt::Display for ColumnDef { | |||
| pub struct Table { | |||
There was a problem hiding this comment.
There are two completely identical structs Table, and two completely identical structs Index!
| } | ||
|
|
||
| #[turso_macros::test] | ||
| fn deferred_fk_parent_key_update_keeps_violation_until_commit(db: TempDatabase) { |
There was a problem hiding this comment.
these should be replaced with a sqltest
| // Schema was modified during the savepoint. Try to reparse | ||
| // from the restored database pages. If that fails (e.g. the | ||
| // database was empty at the savepoint), use an empty schema. | ||
| if conn.reparse_schema().is_err() { |
There was a problem hiding this comment.
Does this now need to reparse temp/attached schemas too?
|
There's TODOs about transactions for temp schemas in transaction.rs lines 35 and 47. |
|
Suggestion for a new test (I don't think this is tested): two connections, both with a temp table with the same name and schema, assert that they should be isolated. |
begin_write_operation and begin_read_operation only added MAIN when the corresponding DB was empty, so a temp-table statement that later pulled in MAIN acesss via a trigger never emitted a Transaction opcode for main.
Implement TEMPORARY tables, matching SQLite behavior by treating them as Connection-local, in a separate catalog as an ATTACHED database (e.g.
temp.t)Also adds temporary table usage and generation to the differential fuzzer, which found quite a few bugs. particularly with triggers
The differential fuzzer found several other issues that codex was able to fix
EDIT: simulator seems to have found an issue, fixing