Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-862

[GH-563] Lower case "order by" keyword causes wrong LIMIT query on SQL Server

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: Platforms
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of stchr:

      Url: https://github.com/doctrine/dbal/pull/563

      Message:

      SQLServerPlatform::modifyLimitQuery('SELECT * FROM user order by username')

      (lowercase order by)
      returns

      SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY order) AS doctrine_rownum FROM user order by username) AS doctrine_tbl WHERE doctrine_rownum BETWEEN 1 AND 10

      instead of

      SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY username) AS doctrine_rownum FROM user) AS doctrine_tbl WHERE doctrine_rownum BETWEEN 1 AND 10

        Activity

        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-563] was closed:
        https://github.com/doctrine/dbal/pull/563

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-563] was closed: https://github.com/doctrine/dbal/pull/563
        Show
        Steve Müller added a comment - Fixed in commit: https://github.com/doctrine/dbal/commit/d6b91405c2cbee8e02eb16bb50df7a96d88a9315

          People

          • Assignee:
            Steve Müller
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: