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

Subquery using the ALL keyword on date columns produces a wrong result

    XMLWordPrintable

Details

    Description

      Subquery using the ALL keyword on date columns produces a wrong result.

      How to reproduce

      CREATE TABLE sq1 (d DATE);
      INSERT INTO sq1 VALUES ('2021-11-17'), ('2021-10-17'),('2022-11-17'), ('2020-10-17');
      SELECT * FROM sq1 WHERE d >= ALL (SELECT * FROM sq1);

      Result

      d
      ------------
      2021-11-17
      2022-11-17

      Expected result

      d
      --------------
      2022-11-17

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              ff Fabio Fioravanti
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.