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

Using user-defined variable with ORDER BY bad result set

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 11.1.4, 11.3.2
    • N/A
    • Optimizer
    • None

    Description

      I have a t1 table with records in some same and different 'f2' column values.
      I would request records where the 'f2' column value not equal previous row's 'f2' column value.
      If I use ORDER BY the result set is bad. All record present in the result set.
      If I not use ORDER BY the result set is correct. Same query without ORDER BY. The result set is contains one row. (This is the correct result set.)

      What is the correct SQL query for this request (without LIMIT expression)?

      Attachments

        Activity

          People

            Unassigned Unassigned
            szolex Szolex Kft.
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.