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

fix: make transaction rejection consistent across dialects #3399

Merged
merged 1 commit into from Aug 17, 2019

Conversation

thetutlage
Copy link
Contributor

@thetutlage thetutlage commented Aug 16, 2019

Making mysql and mysql2 dialects use the same sql check as the base transaction class.

sql.toUpperCase() === 'ROLLBACK' &&
t.doNotRejectOnRollback
) {
if (t.doNotRejectOnRollback && /^ROLLBACK\b/i.test(sql)) {
Copy link
Collaborator

@kibertoad kibertoad Aug 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if sql is nil here? It just resolves to false or throw an error?

Copy link
Contributor Author

@thetutlage thetutlage Aug 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returns false

@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Aug 16, 2019

You can pull latest changes from master to resolve oracle test failures.

@kibertoad kibertoad merged commit 831b9bc into knex:master Aug 17, 2019
2 checks passed
@kibertoad
Copy link
Collaborator

@kibertoad kibertoad commented Aug 17, 2019

Thanks! I'll try to publish new release tonight.

@thetutlage
Copy link
Contributor Author

@thetutlage thetutlage commented Aug 17, 2019

Wow, thanks 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants