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

NOT LIKE is not compatible with MariaDB on explicit NULL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.6.1
    • Fix Version/s: Icebox
    • Component/s: PrimProc
    • Labels:
      None

      Description

      I create a ColumnStore table:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a VARCHAR(4)) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES (NULL),('a');
      

      Now run queries with the LIKE predicate in combination with explicit NULL:

      SELECT a FROM t1 WHERE a NOT LIKE NULL;
      

      +------+
      | a    |
      +------+
      | a    |
      +------+
      

      SELECT a FROM t1 WHERE NULL NOT LIKE a;
      

      +------+
      | a    |
      +------+
      | a    |
      +------+
      

      Looks wrong. The expected result is to return no rows, like other engines do:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a VARCHAR(4)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (NULL),('a');
      

      SELECT a FROM t1 WHERE a NOT LIKE NULL;
      

      Empty set (0.000 sec)
      

      SELECT a FROM t1 WHERE NULL NOT LIKE a;
      

      Empty set (0.001 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration