Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
7c15f14e
Commit
7c15f14e
authored
Feb 29, 2012
by
Francesc Rosàs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stick to coding standards
parent
8a1eac47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
12 deletions
+36
-12
Connection.php
lib/Doctrine/DBAL/Connection.php
+36
-12
No files found.
lib/Doctrine/DBAL/Connection.php
View file @
7c15f14e
...
...
@@ -902,13 +902,21 @@ class Connection implements DriverConnection
$logger
=
$this
->
_config
->
getSQLLogger
();
if
(
$this
->
_transactionNestingLevel
==
1
)
{
if
(
$logger
)
$logger
->
startQuery
(
'"START TRANSACTION"'
);
if
(
$logger
)
{
$logger
->
startQuery
(
'"START TRANSACTION"'
);
}
$this
->
_conn
->
beginTransaction
();
if
(
$logger
)
$logger
->
stopQuery
();
if
(
$logger
)
{
$logger
->
stopQuery
();
}
}
else
if
(
$this
->
_nestTransactionsWithSavepoints
)
{
if
(
$logger
)
$logger
->
startQuery
(
'"SAVEPOINT"'
);
if
(
$logger
)
{
$logger
->
startQuery
(
'"SAVEPOINT"'
);
}
$this
->
createSavepoint
(
$this
->
_getNestedTransactionSavePointName
());
if
(
$logger
)
$logger
->
stopQuery
();
if
(
$logger
)
{
$logger
->
stopQuery
();
}
}
}
...
...
@@ -933,13 +941,21 @@ class Connection implements DriverConnection
$logger
=
$this
->
_config
->
getSQLLogger
();
if
(
$this
->
_transactionNestingLevel
==
1
)
{
if
(
$logger
)
$logger
->
startQuery
(
'"COMMIT"'
);
if
(
$logger
)
{
$logger
->
startQuery
(
'"COMMIT"'
);
}
$this
->
_conn
->
commit
();
if
(
$logger
)
$logger
->
stopQuery
();
if
(
$logger
)
{
$logger
->
stopQuery
();
}
}
else
if
(
$this
->
_nestTransactionsWithSavepoints
)
{
if
(
$logger
)
$logger
->
startQuery
(
'"RELEASE SAVEPOINT"'
);
if
(
$logger
)
{
$logger
->
startQuery
(
'"RELEASE SAVEPOINT"'
);
}
$this
->
releaseSavepoint
(
$this
->
_getNestedTransactionSavePointName
());
if
(
$logger
)
$logger
->
stopQuery
();
if
(
$logger
)
{
$logger
->
stopQuery
();
}
}
--
$this
->
_transactionNestingLevel
;
...
...
@@ -964,16 +980,24 @@ class Connection implements DriverConnection
$logger
=
$this
->
_config
->
getSQLLogger
();
if
(
$this
->
_transactionNestingLevel
==
1
)
{
if
(
$logger
)
$logger
->
startQuery
(
'"ROLLBACK"'
);
if
(
$logger
)
{
$logger
->
startQuery
(
'"ROLLBACK"'
);
}
$this
->
_transactionNestingLevel
=
0
;
$this
->
_conn
->
rollback
();
$this
->
_isRollbackOnly
=
false
;
if
(
$logger
)
$logger
->
stopQuery
();
if
(
$logger
)
{
$logger
->
stopQuery
();
}
}
else
if
(
$this
->
_nestTransactionsWithSavepoints
)
{
if
(
$logger
)
$logger
->
startQuery
(
'"ROLLBACK TO SAVEPOINT"'
);
if
(
$logger
)
{
$logger
->
startQuery
(
'"ROLLBACK TO SAVEPOINT"'
);
}
$this
->
rollbackSavepoint
(
$this
->
_getNestedTransactionSavePointName
());
--
$this
->
_transactionNestingLevel
;
if
(
$logger
)
$logger
->
stopQuery
();
if
(
$logger
)
{
$logger
->
stopQuery
();
}
}
else
{
$this
->
_isRollbackOnly
=
true
;
--
$this
->
_transactionNestingLevel
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment