Skip to content

Commit

Permalink
DROP
Browse files Browse the repository at this point in the history
  • Loading branch information
hgraca committed Oct 4, 2023
1 parent acedc4d commit 3f04a41
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ private function detectDatabasePlatform(): AbstractPlatform
*
* @throws Throwable
*/
private function getDatabasePlatformVersion()
public function getDatabasePlatformVersion()
{
// Driver does not support version specific platforms.
if (! $this->_driver instanceof VersionAwarePlatformDriver) {
Expand Down
14 changes: 13 additions & 1 deletion tests/Functional/Query/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
use Doctrine\DBAL\Tests\FunctionalTestCase;
use Doctrine\DBAL\Tests\TestUtil;
use Doctrine\DBAL\Types\Types;
use Exception;
use Throwable;

use function get_class;
use function sprintf;
Expand Down Expand Up @@ -66,7 +68,17 @@ public function testConcurrentConnectionSkipsLockedRows(): void
self::assertFalse($connection1->isTransactionActive(), 'A transaction should not be active on connection 1');
$connection1->beginTransaction();
self::assertTrue($connection1->isTransactionActive(), 'A transaction should be active on connection 1');
$result = $connection1->executeQuery($qb1->getSQL());
try {
$result = $connection1->executeQuery($qb1->getSQL());
} catch (Throwable $t) {
throw new Exception(
'Failed SQL with SKIP LOCKED - platform: ' . get_class($connection1->getDatabasePlatform())
. ' DB version:' . $connection1->getDatabasePlatformVersion(),
0,
$t,
);
}

$resultList = $result->fetchAllAssociative();
self::assertCount(1, $resultList);
self::assertEquals(1, $resultList[0]['id']);
Expand Down

0 comments on commit 3f04a41

Please sign in to comment.