Description
- Laravel Version: 6.14.0
- PHP Version: 7.3.14
- Database Driver & Version: Azure SQL
Description:
Pull request #31287 broke MSSQL support for Queues/Workers.
Error generated: Illuminate\Database\QueryException SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. (SQL: select top 1 * from [jobs] FOR UPDATE where [queue] = default and (([reserved_at] is null and [available_at] <= 1580841485) or ([reserved_at] <= 1580841395)) order by [id] asc)
Query generated in Laravel 6.14.0: select * from [jobs] FOR UPDATE where [queue] = ? and (([reserved_at] is null and [available_at] <= ?) or ([reserved_at] <= ?)) order by [id] asc
Query generated in Laravel 6.13.x: select * from [jobs] with(rowlock,updlock,holdlock) where [queue] = ? and (([reserved_at] is null and [available_at] <= ?) or ([reserved_at] <= ?)) order by [id] asc
Steps To Reproduce:
Run php artisan queue:work
while using MSSQL as your database and Laravel 6.14.0.