Skip to content
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

[Specification] Transaction rollback behavior #13

Closed
oscarngncc opened this issue Apr 17, 2020 · 2 comments
Closed

[Specification] Transaction rollback behavior #13

oscarngncc opened this issue Apr 17, 2020 · 2 comments
Labels
1pt bug Something isn't working TA Verified

Comments

@oscarngncc
Copy link

When multiple statement is passed to the transaction and committed, it shall rollback/not make any change if one of the statements causes error.

However, based on the testing, I have chained two statements ( first one being right and last being wrong). Committing results in 200 SC_OK and the first SQL statement is executed.

{ "Transaction": {{transaction1}}, "Book": 50, "Action": "loan" }
{ "Transaction": {{transaction1}}, "Book": 999999, "Action": "return" }

Transaction in the db: (Obviously one with id=999999 is wrong)
image

Commit success (somehow)
image

Database does make valid book (id=50) being loaned
image

Collection Link: https://www.getpostman.com/collections/60fd4e59edd2e444ed04

@Camerash
Copy link
Collaborator

Specification found and bug confirmed.

@comp4111ta
Copy link
Collaborator

comp4111ta commented Apr 17, 2020

TA Verified: Exceptions found by manual code review (1pt)

Camerash added a commit that referenced this issue May 23, 2020
Camerash added a commit that referenced this issue May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1pt bug Something isn't working TA Verified
Projects
None yet
Development

No branches or pull requests

4 participants