-
Notifications
You must be signed in to change notification settings - Fork 427
Fix load dump with triggers #2151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: given the new approach I think the previous message doesn't make sense anymore. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
source: libsql-server/tests/namespaces/dumps.rs | ||
expression: resp.body_string().await? | ||
snapshot_kind: text | ||
--- | ||
{"error":"The passed dump sql is invalid: attach statements are not allowed in dumps, msg: near \"COMMIT\": syntax error, sql: ATTACH foo/bar.sql\n COMMIT;, offset: 28"} | ||
{"error":"The passed dump sql is invalid: attach statements are not allowed in dumps"} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ source: libsql-server/tests/namespaces/dumps.rs | |
expression: resp.body_string().await? | ||
snapshot_kind: text | ||
--- | ||
{"error":"The passed dump sql is invalid: msg: near \"COMMIT\": syntax error, sql: SELECT abs(-9223372036854775808) \n COMMIT;, offset: 43"} | ||
{"error":"The passed dump sql is invalid: syntax error near 'COMMIT' at line 7, column 11"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: following the previous snapshot message, I ought to introduce a lot of unpleasant changes in the code. I believe the new message is clear enough with reasonable code modifications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm aware of the memory allocation here, but given that we need to provide the object from the heap to
sqlite3_parser
I decided to go with this option. Not sure if it is the best one though.