Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25268

MSSQL/SQLSRV problems with TOP statements...

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.0
    • 2.0
    • Database SQL/XMLDB
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE
    • Easy

      Current regexp present in mssql/sqlsrv drivers, used to apply for the TOP keyword when using limits in the query fails to match properly if there are multiple spaces (it matches only one space).

      Going to change it as fas as I got at least one case (in mod/data/view.php), leading to garbled SQL:

      SELECT TOP 10 DISTINCT ==> wrong

      and it should be:

      SELECT DISTINCT TOP 10 ==> correct

      Will add test for it too. Ciao

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.