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

MSSQL driver - inconsistent behaviour with TOP

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.9.1
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Affected Branches:
      MOODLE_29_STABLE

      Description

      The get_recordset_sql breaks when supplied with a query like this:

      SELECT TOP 1 * FROM...
      

      But when the code is like this:

      SELECT TOP (1) * FROM...
      

      It ignores the limit/offset arguments for the function.

      It probably should throw a coding error in both cases

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jkb Jakub Kania
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: