Ticket #825 (closed defect: fixed)

Opened 7 months ago

Last modified 3 months ago

DBMSSQL::applyLimit() and DISTINCT keyword

Reported by: jan.blaha Owned by: francois
Priority: normal Milestone: 1.5.0
Component: Runtime (PHP5) Version: 1.4.0
Severity: major Keywords: distinct
Cc:

Description (last modified by francois) (diff)

DBMSSQL::applyLimit() method generates incorrect sql query in case of SELECT DISTINCT statement.

Instead of correct:

SELECT DISTINCT TOP n column FROM table

the method generates:

SELECT TOP n DISTINCT column FROM table

which results in an database error.

Attachments

DBMSSQL.php.patch Download (1.6 KB) - added by KRavEN 3 months ago.

Change History

Changed 7 months ago by KRavEN

  • severity changed from normal to major
  • milestone changed from To be scheduled to 1.5

fix should be added to patch in #803

Changed 5 months ago by francois

  • status changed from new to closed
  • resolution set to fixed

(In [1556]) [1.5] Fixed LIMIT in MSSQL (closes #803, #825) (patch from KRavEN)

Changed 5 months ago by KRavEN

  • status changed from closed to reopened
  • resolution fixed deleted

Distinct issue still not resolved. I will look into fixing it.

Changed 5 months ago by francois

any progress on this issue?

Changed 4 months ago by francois

  • milestone changed from 1.5 Beta 1 to 1.5

bump

Changed 4 months ago by francois

bump again. No new on this one?

Changed 3 months ago by KRavEN

Sorry for the delay. The attached patch should resolve the issue. I need to write a test for this still.

Changed 3 months ago by KRavEN

Changed 3 months ago by francois

  • description modified (diff)

You should have write access by now, using the same password as your Trac account. Can you commit the patch and the test to check your credentials?

Changed 3 months ago by KRavEN

  • status changed from reopened to closed
  • resolution set to fixed

(In [1700]) Added check for distinct in the sql statement. Closes #825

Note: See TracTickets for help on using tickets.