From 3c7ff133066ab8d9cd8c4f7d441be745d48e09bf Mon Sep 17 00:00:00 2001 From: Tommy Date: Tue, 13 Dec 2022 17:07:29 +0100 Subject: [PATCH] CHG: update changelog, fix spaces to tabs --- CHANGELOG | 2 +- framework/db/schema/mssql/CMssqlCommandBuilder.php | 4 ++-- tests/framework/db/schema/CMssqlTest.php | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 46a16074c..91d03e581 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ Version 1.1.28 under development -------------------------------- -- No changes yet +- Bug #4491 Fixed limit and Offset not working correctly with MSSQL (shnoulle, wtommyw) Version 1.1.27 November 21, 2022 -------------------------------- diff --git a/framework/db/schema/mssql/CMssqlCommandBuilder.php b/framework/db/schema/mssql/CMssqlCommandBuilder.php index c7737daf5..1323916b0 100644 --- a/framework/db/schema/mssql/CMssqlCommandBuilder.php +++ b/framework/db/schema/mssql/CMssqlCommandBuilder.php @@ -250,8 +250,8 @@ class CMssqlCommandBuilder extends CDbCommandBuilder */ protected function newRewriteLimitOffsetSql($sql, $limit, $offset) { - $order = $this->findOrdering($sql); - if (empty($order)) { + $order = $this->findOrdering($sql); + if (empty($order)) { $sql .= " ORDER BY (SELECT NULL)"; } diff --git a/tests/framework/db/schema/CMssqlTest.php b/tests/framework/db/schema/CMssqlTest.php index 5b788e4cb..9cedf0b7d 100644 --- a/tests/framework/db/schema/CMssqlTest.php +++ b/tests/framework/db/schema/CMssqlTest.php @@ -342,7 +342,6 @@ EOD; public function testColumnComments() { - $this->markTestSkipped(); $tables=$this->db->schema->tables; $usersColumns=$tables['users']->columns;