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

Wrong result of a UNION for INT and INT UNSIGNED

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.1.1
    • Component/s: PrimProc
    • Labels:
      None

      Description

      This problem was found by Gagan Goel 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

              Assignee:
              dleeyh Daniel Lee
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration