? Success

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
12 Oct 2017

Pull Request for Issue #18313 .

Summary of Changes

Fix JDatabaseDriverSqlsrv::limit() and JDatabaseQuerySqlsrv::processLimit() methods to support query with distinct and limit statements like:

SELECT DISTINCT * FROM t LIMIT n

in mssql should be:

SELECT DISTINCT TOP n * FROM t

Testing Instructions

See issue #18313

Expected result

Sqlsrv syntax is correct.

Actual result

Invalid sqlsrv syntax for query with distinct and limit.

Documentation Changes Required

No

avatar joomla-cms-bot joomla-cms-bot - change - 12 Oct 2017
Category MS SQL Libraries
avatar csthomas csthomas - open - 12 Oct 2017
avatar csthomas csthomas - change - 12 Oct 2017
Status New Pending
avatar csthomas csthomas - change - 12 Oct 2017
The description was changed
avatar csthomas csthomas - edited - 12 Oct 2017
avatar mruivo
mruivo - comment - 15 Oct 2017

Tested this on an mssql instance which now results in the following error:

[S0001][145] ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

avatar alikon
alikon - comment - 15 Oct 2017

@mruivo please mark this pr as successfull tested and open a new issue for the #18315 (comment) you reported

avatar franz-wohlkoenig franz-wohlkoenig - alter_testresult - 15 Oct 2017 - mruivo: Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 15 Oct 2017

@alikon altered Test of @mruivo as successfully.

avatar alikon alikon - test_item - 15 Oct 2017 - Tested successfully
avatar alikon
alikon - comment - 15 Oct 2017

I have tested this item successfully on 0e2eba8


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18315.

avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Oct 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 15 Oct 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 15 Oct 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-10-15 15:51:26
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 15 Oct 2017
avatar mbabker mbabker - merge - 15 Oct 2017
avatar wilsonge
wilsonge - comment - 12 Nov 2017

@csthomas can we get this in the framework repo too please?

avatar csthomas
csthomas - comment - 16 Nov 2017

Is this the appropriate repo https://github.com/joomla-framework/database?

avatar wilsonge
wilsonge - comment - 16 Nov 2017

yup :)

Add a Comment

Login with GitHub to post a comment