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

Better handling of setting transaction level #14899

Merged
merged 1 commit into from Sep 19, 2019
Merged

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Sep 18, 2019

FYI @diosmosis maybe you can give it a test if that works for you?

I tried to force it failing with the error you had with a test like this but I couldn't get it failing. Instead of having it configurable I thought it be good to basically detect it automatically.

	public function test_setUncommitted_returnsFalseWhenItFails()
	{
		$this->db->query('SET SESSION binlog_format = \'STATEMENT\';');
		$result = $this->level->setUncommitted();

		// value remains unchanged
		$value = $this->db->fetchOne('SELECT @@TX_ISOLATION');
		$this->assertSame('REPEATABLE-READ', $value);

        $this->assertFalse($result);
	}

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Sep 18, 2019
@tsteur tsteur added this to the 3.12.0 milestone Sep 18, 2019
@diosmosis
Copy link
Member

Working for me.

@diosmosis diosmosis merged commit f91a809 into 3.x-dev Sep 19, 2019
@diosmosis diosmosis deleted the transactionlevel3 branch September 19, 2019 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants