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

Inconsistent results for make_set of cast

    XMLWordPrintable

Details

    • Unexpected results
    • Q1/2026 Server Maintenance

    Description

      Run the following two cases, where the same result is expected to return.

      -- case 1
      CREATE TABLE t1 (c1 SMALLINT);
      INSERT INTO t1 VALUES (9067);
      SELECT CAST((MAKE_SET(c1, (CAST(c1 AS BINARY)), (TRIM((CAST((CAST(((CAST(0 AS DOUBLE)) > (CAST(0 AS NCHAR))) AS NCHAR)) AS SIGNED)))), NULL)) AS CHAR) FROM t1; -- { ???,0}
      

      -- case 2
      CREATE TABLE t1 (c1 INT);
      INSERT INTO t1 VALUES (9067);
      SELECT CAST((MAKE_SET(c1, (CAST(c1 AS BINARY)), (TRIM((CAST((CAST(((CAST(0 AS DOUBLE)) > (CAST(0 AS NCHAR))) AS NCHAR)) AS SIGNED)))), NULL)) AS CHAR) FROM t1; -- {0???,0}
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              John Jove John Jove
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h
                  1h

                  Git Integration

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