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

Unary negation of LONGTEXT, wrong result under GROUP BY

    XMLWordPrintable

Details

    • Unexpected results
    • Q2/2026 Server Development, Q3/2026 Server Maintenance

    Description

      Run the following statements, -3 is expected.

      CREATE TABLE t1 (c1 LONGTEXT) STATS_PERSISTENT = DEFAULT;
      INSERT INTO t1 VALUES ('03ksy');
      SELECT (MIN((LOWER((-(CAST(c1 AS BINARY))))))) FROM t1 GROUP BY c1; -- {NULL}, expected: {-3}
      

      Attachments

        Activity

          People

            Gosselin Dave Gosselin
            John Jove John Jove
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h 16m Original Estimate - 3h 16m
                3h 16m
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 6.7h
                6.7h

                Git Integration

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