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

Query with impossible filters against larger tables returns wrong result.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 1.1.7, 1.2, 1.4, 5.4.3
    • 6.1.1
    • None
    • None
    • 2021-8, 2021-9

    Description

      To reproduce:

      set columnstore_select_handler=on;
       
      DROP TABLE IF EXISTS `sictable`;
       
      CREATE TABLE IF NOT EXISTS  `sictable` 
        ( 
           `serialno`    VARCHAR(20)    NOT NULL 
        ) 
          ENGINE=Columnstore
          DEFAULT CHARSET=utf8
        ; 
        
      INSERT INTO `sictable`  (
      with recursive series as (
      select 1 as id union all
      select id +1 as id from series
      where id < 6281)
      select lpad(id,11,'0') from series);
       
      SELECT  `serialno`  
      FROM  `sictable`  
      WHERE  `serialno` = '00000000029'   AND  `serialno` = '00000006256'   ; 
      

      The last select returns 2 rows, but expect would be 0.

      If change the part

      where id < 6281
      

      to

      where id < 6280
      

      The select returns in this case as expected no rows.

      Trace for working version

      Desc Mode Table               TableOID ReferencedColumns PIO LIO PBE Elapsed Rows 
      DSS  PM   sictable2           3120     (serialno)        0   10  -   0.000   1    
      DSS  PM   sictable2           3120     (serialno)        0   10  -   0.000   1    
      BPS  PM   sictable2           3120     (serialno)        8   25  0   0.007   0    
      HJS  PM   sictable2-sictable2 3120     -                 -   -   -   -----   -    
      HJS  PM   sictable2-sictable2 3120     -                 -   -   -   -----   -    
      TNS  UM   -                   -        -                 -   -   -   0.000   0   
      

      For non working >= 6281

      Desc Mode Table     TableOID ReferencedColumns PIO LIO PBE Elapsed Rows 
      BPS  PM   sictable2 3123     (serialno)        19  28  0   0.023   2    
      TNS  UM   -         -        -                 -   -   -   0.000   2 
      

      The issue occured only with columnstore_select_handler = on (vtable accordingly for older versions)

      Attachments

        Activity

          People

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