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
Show hint about :auto on CALL {...} IN TRANSACTIONS #1637
Conversation
892530a
to
285ff2a
Compare
54a038b
to
c59333c
Compare
|
||
it('adding :auto enables running periodic commit', () => { | ||
cy.executeCommand(':auto USING PERIODIC COMMIT RETURN "Laverre";') | ||
cy.getFrames().contains('ERROR') |
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.
Could you add a comment explaining why we're looking for an error here?
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.
sure, it definitely looks a bit odd
96e6d22
to
e7e5cfc
Compare
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.
Looks good to me 👍
We do a few regex checks on error messages to see if the error was caused by a missing
:auto
prefix, if so we add a hint to the error message.This PR adds a check for if the error is the new
CALL IN {} TRANSACTIONS
which needs :auto and updates the check forPERIODIC COMMIT
(that has the new error message"A query with 'PERIODIC COMMIT' can only be executed in an implicit transaction but tried to execute in an explicit transaction."
).I also add a few tests to verify the behaviour, updated the
:help auto
to use the new syntax and added a helper method to cypress for faster tests.URL for testing: update_warning.surge.sh
Do note that a 4.4 db is needed.