Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Zend db nested transactions #5505

Closed
wants to merge 239 commits into from
Closed

Zend db nested transactions #5505

wants to merge 239 commits into from

Conversation

corentin-larose
Copy link
Contributor

This PR relies on #5001. The goal of this PR is to allow nested db transactions, for instance when tou batch a low level method.

protected $connectionParameters = array();

/**
* @var boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

use

@var bool 

for consistency

@samsonasik
Copy link
Contributor

you should only change the change that related with the PR.

@ralphschindler
Copy link
Member

How well are nested transactions supported across all of our "officially supported" database platforms?

@Freeaqingme
Copy link
Member

Some time ago Mysql didn't support it. From the looks of it it may have changed though since 5.5. I've implemented something similar long time ago focused at Mysql<5.5 that implements the same behavior using savepoints: https://github.com/Freeaqingme/FreakLib/blob/master/library/Freak/Db/Adapter/Pdo/Mysql.php

@Freeaqingme Freeaqingme added Db and removed Db labels Feb 15, 2014
@ralphschindler
Copy link
Member

What about the rest?

@ralphschindler ralphschindler self-assigned this Feb 27, 2014
@weierophinney
Copy link
Member

@ralphschindler Can you mark the milestone please?

@ralphschindler ralphschindler modified the milestones: 2.3.0, 3.0.0 Mar 4, 2014
@marc-mabe
Copy link
Member

@corentin-larose @weierophinney PDO::inTransaction and what if a transation query was invoked directly or something special that closes an open transation like http://dev.mysql.com/doc/refman/5.0/en/implicit-commit.html?

@corentin-larose
Copy link
Contributor Author

Indeed.
Obviously, PHP wouldn't be aware of that. Then nested transaction count would continue to decrement with each commit() call and the last would finally perform a commit even if the transaction has been close for long in MySql.
Have to think of that. @weierophinney, what do you think?

@Freeaqingme
Copy link
Member

@corentin-larose I would try to focus on the first 80% of use cases, rather than trying to cover all 100% of possible use cases. We could of course always add a warning in the docs stating that if you circumvent Zend\Db in one of several ways, things may/will break.

@Ocramius
Copy link
Member

This has been manually merged into develop at bb55566

Thanks!

@Ocramius Ocramius closed this Nov 12, 2014
@Ocramius Ocramius assigned Ocramius and unassigned weierophinney Nov 12, 2014
Ocramius added a commit that referenced this pull request Nov 12, 2014
Ocramius added a commit that referenced this pull request Nov 12, 2014
Ocramius added a commit that referenced this pull request Nov 12, 2014
…structor argument instead of `DbSelect#setSelectCount()`
gianarb pushed a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
…up logic), assuming 4th constructor argument instead of `DbSelect#setSelectCount()`
gianarb pushed a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-paginator that referenced this pull request May 15, 2015
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.