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

Add a warning when the transaction isolation level is not READ_COMMITED #24889

Merged
merged 1 commit into from
May 31, 2016

Conversation

nickvergessen
Copy link
Contributor

@nickvergessen nickvergessen added this to the 9.1-current milestone May 30, 2016
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @DeepDiver1975, @LukasReschke and @jancborchardt to be potential reviewers

/** @var \Doctrine\DBAL\Connection $connection */
$connection = \OC::$server->getDatabaseConnection();
try {
$template->assign('invalidTransactionIsolationLevel', $connection->getTransactionIsolation() !== \Doctrine\DBAL\Connection::TRANSACTION_READ_COMMITTED);
Copy link
Member

Choose a reason for hiding this comment

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

Is this required for all dbms or only mysql?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is required for all that have a transaction isolation level:
Postgres: https://www.postgresql.org/docs/current/static/transaction-iso.html
Oracle: http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_10005.htm#SQLRF01705

Can't find exact docs for sqlite, it seems to have a boolean for "read uncommited" instead.
So I guess I will disable it for sqlite

@DeepDiver1975
Copy link
Member

We should backport this to all stable releases

@nickvergessen nickvergessen force-pushed the add-warning-wrong-transaction-isolation-level branch from f885b60 to 4da5a74 Compare May 30, 2016 10:31
@DeepDiver1975
Copy link
Member

👍

1 similar comment
@rullzer
Copy link
Contributor

rullzer commented May 30, 2016

👍

@PVince81 PVince81 merged commit ba62262 into master May 31, 2016
@PVince81 PVince81 deleted the add-warning-wrong-transaction-isolation-level branch May 31, 2016 08:13
@PVince81
Copy link
Contributor

@nickvergessen please submit the backport PRs, thanks

CC @cmonteroluque @DeepDiver1975

@nickvergessen
Copy link
Contributor Author

9.0: #24915
8.2: #24916
8.1: #24917
8.0: #24918

@ghost
Copy link

ghost commented May 31, 2016

thanks @nickvergessen

@ghost
Copy link

ghost commented Jun 8, 2016

Ref to the doc part: owncloud-archive/documentation#2477

There definitely will be questions about that coming up

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants