@@ 1257-1273 (lines=17) @@ | ||
1254 | ||
1255 | $logger = $this->_config->getSQLLogger(); |
|
1256 | ||
1257 | if ($this->_transactionNestingLevel == 1) { |
|
1258 | if ($logger) { |
|
1259 | $logger->startQuery('"START TRANSACTION"'); |
|
1260 | } |
|
1261 | $this->_conn->beginTransaction(); |
|
1262 | if ($logger) { |
|
1263 | $logger->stopQuery(); |
|
1264 | } |
|
1265 | } elseif ($this->_nestTransactionsWithSavepoints) { |
|
1266 | if ($logger) { |
|
1267 | $logger->startQuery('"SAVEPOINT"'); |
|
1268 | } |
|
1269 | $this->createSavepoint($this->_getNestedTransactionSavePointName()); |
|
1270 | if ($logger) { |
|
1271 | $logger->stopQuery(); |
|
1272 | } |
|
1273 | } |
|
1274 | } |
|
1275 | ||
1276 | /** |
|
@@ 1297-1313 (lines=17) @@ | ||
1294 | ||
1295 | $logger = $this->_config->getSQLLogger(); |
|
1296 | ||
1297 | if ($this->_transactionNestingLevel == 1) { |
|
1298 | if ($logger) { |
|
1299 | $logger->startQuery('"COMMIT"'); |
|
1300 | } |
|
1301 | $this->_conn->commit(); |
|
1302 | if ($logger) { |
|
1303 | $logger->stopQuery(); |
|
1304 | } |
|
1305 | } elseif ($this->_nestTransactionsWithSavepoints) { |
|
1306 | if ($logger) { |
|
1307 | $logger->startQuery('"RELEASE SAVEPOINT"'); |
|
1308 | } |
|
1309 | $this->releaseSavepoint($this->_getNestedTransactionSavePointName()); |
|
1310 | if ($logger) { |
|
1311 | $logger->stopQuery(); |
|
1312 | } |
|
1313 | } |
|
1314 | ||
1315 | --$this->_transactionNestingLevel; |
|
1316 |