|
17 | 17 | use Doctrine\DBAL\Driver\ResultStatement;
|
18 | 18 | use Doctrine\DBAL\Exception as DBALException;
|
19 | 19 | use Doctrine\DBAL\Platforms\AbstractPlatform;
|
| 20 | +use Doctrine\DBAL\Platforms\MariaDBPlatform; |
20 | 21 | use Doctrine\DBAL\Platforms\MySQL57Platform;
|
21 | 22 | use Doctrine\DBAL\Platforms\OraclePlatform;
|
22 | 23 | use Doctrine\DBAL\Platforms\SQLServer2012Platform;
|
@@ -394,6 +395,13 @@ public static function providePlatformSql(): iterable
|
394 | 395 | 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY available_at ASC LIMIT 1 FOR UPDATE',
|
395 | 396 | ];
|
396 | 397 |
|
| 398 | + if (class_exists(MariaDBPlatform::class)) { |
| 399 | + yield 'MariaDB' => [ |
| 400 | + new MariaDBPlatform(), |
| 401 | + 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY available_at ASC LIMIT 1 FOR UPDATE', |
| 402 | + ]; |
| 403 | + } |
| 404 | + |
397 | 405 | yield 'SQL Server' => [
|
398 | 406 | new SQLServer2012Platform(),
|
399 | 407 | 'SELECT m.* FROM messenger_messages m WITH (UPDLOCK, ROWLOCK) WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY available_at ASC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY ',
|
@@ -479,6 +487,13 @@ public function provideFindAllSqlGeneratedByPlatform(): iterable
|
479 | 487 | 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) LIMIT 50',
|
480 | 488 | ];
|
481 | 489 |
|
| 490 | + if (class_exists(MariaDBPlatform::class)) { |
| 491 | + yield 'MariaDB' => [ |
| 492 | + new MariaDBPlatform(), |
| 493 | + 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) LIMIT 50', |
| 494 | + ]; |
| 495 | + } |
| 496 | + |
482 | 497 | yield 'SQL Server' => [
|
483 | 498 | new SQLServer2012Platform(),
|
484 | 499 | 'SELECT m.* FROM messenger_messages m WHERE (m.delivered_at is null OR m.delivered_at < ?) AND (m.available_at <= ?) AND (m.queue_name = ?) ORDER BY (SELECT 0) OFFSET 0 ROWS FETCH NEXT 50 ROWS ONLY',
|
|
0 commit comments