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

select with subquery select gives incorrect result

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 6.3.1
    • Icebox
    • None
    • None

    Description

      See test005.sh
      /home/calpont/regression/mysql/queries/working_dml/qa_sub/mts_1.0400.sql

      CREATE TABLE t2 (id int(11)) engine=columnstore;
      INSERT INTO t2 VALUES (1),(2);
      SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
      

      SELECT 1+(select 1) returns 2:

      SELECT 1+(select 1);
      +--------------+
      | 1+(select 1) |
      +--------------+
      |            2 |
      +--------------+
      

      SELECT * FROM t2 WHERE id IN (2);
      +------+
      | id   |
      +------+
      |    2 |
      +------+
      

      Yet when the subselect is select 1 + select 2, it returns more rows than it ought

      SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
      +------+
      | id   |
      +------+
      |    1 |
      |    2 |
      +------+
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            David.Hall David Hall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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