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

Wrong min/max after cpimport which causes wrong select results

Details

    • 2020-1, 2020-2

    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

          Created a PR for the regression test. Used the sequence I specified above. Verified the test catches the problem.

          pleblanc Patrick LeBlanc (Inactive) added a comment - Created a PR for the regression test. Used the sequence I specified above. Verified the test catches the problem.

          pleblanc should this be marked as "In Review"?

          LinuxJedi Andrew Hutchings (Inactive) added a comment - pleblanc should this be marked as "In Review"?

          Build verified: 1.4.3-1 source

          server
          commit 9bd5e14f4de1402c6cd4a3f81564887c1213c9e1

          engine
          commit 5efa6a4dc52129be2de49fdfc23e44020401b86b

          Reproduced the issue in 1.2.5-1 and verified fix in 1.4.3-1

          dleeyh Daniel Lee (Inactive) added a comment - Build verified: 1.4.3-1 source server commit 9bd5e14f4de1402c6cd4a3f81564887c1213c9e1 engine commit 5efa6a4dc52129be2de49fdfc23e44020401b86b Reproduced the issue in 1.2.5-1 and verified fix in 1.4.3-1

          Build verified: 1.2.6-1 source

          server
          commit d3294cf9c18663673c62532dddaa11369ba184d0

          engine
          commit 668b23a23c59f6ba4f3aa00b6aa768f5931d59fb

          dleeyh Daniel Lee (Inactive) added a comment - Build verified: 1.2.6-1 source server commit d3294cf9c18663673c62532dddaa11369ba184d0 engine commit 668b23a23c59f6ba4f3aa00b6aa768f5931d59fb

          Build verified: 1.5.0-1 source

          server
          commit 57950ded281731263f6aa358d43c7b9d51f3dbfb

          engine
          commit 46f30be5561f65eec488d61e011b727ca358720b

          dleeyh Daniel Lee (Inactive) added a comment - Build verified: 1.5.0-1 source server commit 57950ded281731263f6aa358d43c7b9d51f3dbfb engine commit 46f30be5561f65eec488d61e011b727ca358720b

          People

            dleeyh Daniel Lee (Inactive)
            Richard Richard Stracke
            Votes:
            2 Vote for this issue
            Watchers:
            6 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.