Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4700

Wrong result of a UNION for INT and INT UNSIGNED

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 6.1.1
    • PrimProc
    • None

    Description

      This problem was found by tntnatbry while working on MCOL-4612 and MCOL-4613.

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT, b INT UNSIGNED) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES (-1,1);
      SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
      

      +------------+
      | a          |
      +------------+
      | 4294967295 |
      |          1 |
      +------------+
      

      Looks wrong. The expected result would be:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT, b INT UNSIGNED) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (-1,1);
      SELECT * FROM (SELECT a FROM t1 UNION SELECT b FROM t1) tu;
      {code:sql}
      +------+
      | a    |
      +------+
      |   -1 |
      |    1 |
      +------+
      

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              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.