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

CLONE - Wrong min/max after cpimport which causes wrong select results

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.2.5
    • 1.2.6
    • cpimport

    Description

      If min/max is set cpimport not delete min/max like another write statement and
      not updates min/max.

      This cause wrong select results , because extent elimination wrongly exclude extents.

      Create 2 Files

      1 File c1.txt with content

      "2019-12"

      1 File c2.txt with content

      "2020-01"

      Execute:

      use test;
      create table c1 (pf char(7)) engine = columnstore;
      

      Now load file c1.

      /usr/local/mariadb/columnstore/bin/cpimport test c1 c1.txt -E \" -C "\\"
      /usr/local/mariadb/columnstore/bin/cpimport test c1 c2.txt -E \" -C "\\"
      

      MariaDB [test]> select * from pixid.c1 where pf = "2020-01";
      Empty set (0.107 sec)
       
      MariaDB [test]> select * from pixid.c1;
      +---------+
      | pf      |
      +---------+
      | 2019-12 |
      | 2020-01 |
      +---------+
      2 rows in set (0.037 sec)
      

      Delete and reimport via cpimport will fix it.

      delete from pixid.c1 where pf = "2020-01";
      

      /usr/local/mariadb/columnstore/bin/cpimport test c1 c2.txt -E \" -C "\\"
      

      MariaDB [(none)]> use test;
      Database changed
      MariaDB [test]> select * from c1 where pf = "2020-01";
      +---------+
      | pf      |
      +---------+
      | 2020-01 |
      +---------+
      1 row in set (0.106 sec)
      

      If you do the same with a select after the delete, the reimport will fail.

      MariaDB [test]> select * from c1 where pf = "2020-01";
      +---------+
      | pf      |
      +---------+
      | 2020-01 |
      +---------+
      1 row in set (0.106 sec)
       
      MariaDB [test]> delete from c1 where pf = "2020-01";
      Query OK, 1 row affected (0.437 sec)
      

      reimport with cpimport file c2.txt as above and:

      MariaDB [(none)]> use test;
      Database changed
      MariaDB [test]>  select * from c1 where pf = "2020-01";
      Empty set (0.079 sec)
       
      MariaDB [test]> select calShowPartitions('c1','pf');
      +--------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | calShowPartitions('c1','pf')                                                                                                                                 |
      +--------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Part#     Min                           Max                           Status
        0.0.2     2019-12                       2019-12                       Enabled |
      +--------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.002 sec)
      

      Attachments

        Activity

          People

            dleeyh Daniel Lee (Inactive)
            pleblanc Patrick LeBlanc (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.