Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18740

ORDER BY DESC + LIMIT x,1 on same columns' values are wrong

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.2.22
    • N/A
    • N/A
    • None

    Description

      ASC is correct:
      select ID from GAMES order by RateUp АSC limit 0,1
      =>ID=1
      select ID from GAMES order by RateUp АSC limit 1,1
      =>ID=3

      DESC is wrong (#2):
      select ID from GAMES order by RateUp DESC limit 0,1
      =>ID=3 (correct)
      select ID from GAMES order by RateUp DESC limit 1,1
      =>ID=3 (wrong: must be ID=1 but it isn't)

      How to repeat:
      Table with two columns ID and RateUp
      ID=1,RateUp=0
      ID=3,RateUp=0

      Attachments

        Activity

          People

            Unassigned Unassigned
            angel Angel T
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.