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

querytstats + LEFT JOIN + LOWER() in ON condition cause "t/tuplehashjoin.cpp@1095: assertion 'idlsz > 1' failed" error

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.3.1, 6.4.2
    • 22.08.8
    • None

    Description

      To reproduce:

        create table t1 (c1 varchar(200)) engine = columnstore;
        create table t2 (c2 char(20)) engine = columnstore;
         create view v1 as select distinct `t1`.`c1` AS `c1` from `t1` where !(`t1`.`c1` in (select `t2`.`c2` from `t2`));
         SELECT * from t1 a LEFT JOIN v1 n ON LOWER(n.c1) = LOWER(a.c1);
      

      Sep 19 09:31:37 1e3afaf1eaef Calpont[135]: 37.906020 |0|0|0| E 00 CAL0000: /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.6.8/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp@1095: assertion 'idlsz > 1' failed
      

      Error occured only if this all 3 conditions is given.

      • Querystats enabled
      • LEFT JOIN instead INNER JOIN
      • LOWER() function in the ON Condition.

      So if only querystats is disabled, it works.

      If only LEFT JOIN is replaced with INNER JOIN, it works.

      If only LOWER() funcions in the ON Condition will be removed, it works.

      Attachments

        Activity

          Richard Richard Stracke created issue -
          David.Hall David Hall (Inactive) made changes -
          Field Original Value New Value
          Assignee David Hall [ david.hall ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked higher
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked lower
          toddstoffel Todd Stoffel (Inactive) made changes -
          Fix Version/s Icebox [ 22302 ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked lower
          ccalender Chris Calender (Inactive) made changes -
          Fix Version/s 23.02 [ 28209 ]
          Fix Version/s Icebox [ 22302 ]
          alexey.vorovich alexey vorovich (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          alexey.vorovich alexey vorovich (Inactive) made changes -
          Status In Progress [ 3 ] In Testing [ 10301 ]
          alexey.vorovich alexey vorovich (Inactive) made changes -
          Fix Version/s 6.4.6 [ 28452 ]
          Fix Version/s 23.02 [ 28209 ]
          Assignee David Hall [ david.hall ] Denis Khalikov [ JIRAUSER48434 ]
          Description
          To reproduce:

          {code:java}
            create table t1 (c1 varchar(200)) engine = columnstore;
            create table t2 (c2 char(20)) engine = columnstore;
             create view v1 as select distinct `t1`.`c1` AS `c1` from `t1` where !(`t1`.`c1` in (select `t2`.`c2` from `t2`));
             SELECT * from t1 a LEFT JOIN v1 n ON LOWER(n.c1) = LOWER(a.c1);
          {code}


          {code:java}
          Sep 19 09:31:37 1e3afaf1eaef Calpont[135]: 37.906020 |0|0|0| E 00 CAL0000: /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.6.8/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp@1095: assertion 'idlsz > 1' failed
          {code}


          Error occured only if this all 3 conditions is given.
          - Querystats enabled
          - LEFT JOIN instead INNER JOIN
          - LOWER() function in the ON Condition.

          So if only querystats is disabled, it works.

          If only LEFT JOIN is replaced with INNER JOIN, it works.

          If only LOWER() funcions in the ON Condition will be removed, it works.

          To reproduce:

          {code:java}
            create table t1 (c1 varchar(200)) engine = columnstore;
            create table t2 (c2 char(20)) engine = columnstore;
             create view v1 as select distinct `t1`.`c1` AS `c1` from `t1` where !(`t1`.`c1` in (select `t2`.`c2` from `t2`));
             SELECT * from t1 a LEFT JOIN v1 n ON LOWER(n.c1) = LOWER(a.c1);
          {code}


          {code:java}
          Sep 19 09:31:37 1e3afaf1eaef Calpont[135]: 37.906020 |0|0|0| E 00 CAL0000: /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.6.8/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp@1095: assertion 'idlsz > 1' failed
          {code}


          Error occured only if this all 3 conditions is given.
          - Querystats enabled
          - LEFT JOIN instead INNER JOIN
          - LOWER() function in the ON Condition.

          So if only querystats is disabled, it works.

          If only LEFT JOIN is replaced with INNER JOIN, it works.

          If only LOWER() funcions in the ON Condition will be removed, it works.

          alexey.vorovich alexey vorovich (Inactive) made changes -
          Assigned for Testing Daniel Lee [ dleeyh ]

          dleeyh , could you pls confirm

          alexey.vorovich alexey vorovich (Inactive) added a comment - dleeyh , could you pls confirm
          ccalender Chris Calender (Inactive) made changes -
          Fix Version/s 23.02 [ 28209 ]
          Fix Version/s 6.4.6 [ 28452 ]
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked higher
          toddstoffel Todd Stoffel (Inactive) made changes -
          Rank Ranked higher

          Build verified: 23.02 (Drone build #buildNo: 6523)

          MariaDB [mytest]> select calSetTrace(1);
          +----------------+
          | calSetTrace(1) |
          +----------------+
          |              1 |
          +----------------+
          1 row in set (0.000 sec)
           
          MariaDB [mytest]> create table t1 (c1 varchar(200)) engine = columnstore;
          Query OK, 0 rows affected (0.144 sec)
           
          MariaDB [mytest]> create table t2 (c2 char(20)) engine = columnstore;
          Query OK, 0 rows affected (0.127 sec)
           
          MariaDB [mytest]> create view v1 as select distinct `t1`.`c1` AS `c1` from `t1` where !(`t1`.`c1` in (select `t2`.`c2` from `t2`));
          Query OK, 0 rows affected, 1 warning (0.002 sec)
           
          MariaDB [mytest]> SELECT * from t1 a LEFT JOIN v1 n ON LOWER(n.c1) = LOWER(a.c1);
          Empty set, 1 warning (0.098 sec)
           
          MariaDB [mytest]> select calGetStats();
          +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
          | calGetStats()                                                                                                                                                                            |
          +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
          | Query Stats: MaxMemPct-0; NumTempFiles-0; TempFileSpace-0B; ApproxPhyI/O-3; CacheI/O-9; BlocksTouched-6; PartitionBlocksEliminated-0; MsgBytesIn-321B; MsgBytesOut-4KB; Mode-Distributed |
          +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
          1 row in set (0.000 sec)
          

          dleeyh Daniel Lee (Inactive) added a comment - Build verified: 23.02 (Drone build #buildNo: 6523) MariaDB [mytest]> select calSetTrace(1); +----------------+ | calSetTrace(1) | +----------------+ | 1 | +----------------+ 1 row in set (0.000 sec)   MariaDB [mytest]> create table t1 (c1 varchar(200)) engine = columnstore; Query OK, 0 rows affected (0.144 sec)   MariaDB [mytest]> create table t2 (c2 char(20)) engine = columnstore; Query OK, 0 rows affected (0.127 sec)   MariaDB [mytest]> create view v1 as select distinct `t1`.`c1` AS `c1` from `t1` where !(`t1`.`c1` in (select `t2`.`c2` from `t2`)); Query OK, 0 rows affected, 1 warning (0.002 sec)   MariaDB [mytest]> SELECT * from t1 a LEFT JOIN v1 n ON LOWER(n.c1) = LOWER(a.c1); Empty set, 1 warning (0.098 sec)   MariaDB [mytest]> select calGetStats(); +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | calGetStats() | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Query Stats: MaxMemPct-0; NumTempFiles-0; TempFileSpace-0B; ApproxPhyI/O-3; CacheI/O-9; BlocksTouched-6; PartitionBlocksEliminated-0; MsgBytesIn-321B; MsgBytesOut-4KB; Mode-Distributed | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.000 sec)
          dleeyh Daniel Lee (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status In Testing [ 10301 ] Closed [ 6 ]
          alexey.vorovich alexey vorovich (Inactive) made changes -
          Fix Version/s 22.08.8 [ 28550 ]
          Fix Version/s 23.02 [ 28209 ]
          mariadb-jira-automation Jira Automation (IT) made changes -
          Zendesk Related Tickets 134810

          People

            denis0x0D Denis Khalikov (Inactive)
            Richard Richard Stracke
            Daniel Lee Daniel Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.