nextras / dbal

Database Abstraction Layer – concise secure API to construct queries & fetch data
https://nextras.org/dbal
MIT License
79 stars 28 forks source link

SQL Server INFORMATION_SCHEMA with CS collation #237

Closed jan-bures closed 6 months ago

jan-bures commented 6 months ago

Describe the bug When using DBAL on the SQL Server platform in a database with case-sensitive collation (specifically SQL_Czech_CP1250_CS_AS), the SqlServerPlatform::getTables method throws QueryException with the message "Invalid object name 'information_schema.tables'".

Expected behavior This line should contain FROM [INFORMATION_SCHEMA].[TABLES] (other methods in the class already correctly use the uppercase name wrapped in square brackets).

Versions

hrach commented 6 months ago

https://github.com/nextras/dbal/commit/d04066f0fff52142c22949070f2a81e9e3596a21

Thx for the report. I've just pushed the fix without testing it, so I hope it will work correctly. Plz let me know :)

jan-bures commented 6 months ago

Can confirm that fixed it, thanks for the quick fix!