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

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

    XMLWordPrintable

    Details

      Description

      The problem reported in MDEV-27098 for TIME is repeatable with the UUID data type.

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (d UUID);
      INSERT INTO t1 VALUES ('00000000-0000-0000-0000-111111111111'), ('11111111-0000-0000-0000-000000000000');
      SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
      

      +--------------------------------------+
      | d                                    |
      +--------------------------------------+
      | 00000000-0000-0000-0000-111111111111 |
      | 11111111-0000-0000-0000-000000000000 |
      +--------------------------------------+
      

      The expected result should contain only one with with the maximum value '00000000-0000-0000-0000-111111111111'.

      SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
      

      +--------------------------------------+
      | d                                    |
      +--------------------------------------+
      | 00000000-0000-0000-0000-111111111111 |
      | 11111111-0000-0000-0000-000000000000 |
      +--------------------------------------+
      

      The expected result should contain only one with with the maximum value '11111111-0000-0000-0000-000000000000'.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              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.