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

invalid null date values for cross engine join query

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.5
    • 1.0.6
    • ExeMgr
    • None
    • 2016-23, 2016-24

    Description

      For the following query pattern and data setup, the results will sometimes get corrupted with 0 date values. The query does not fall into the normal star schema model. In addition the issues only appears to happen with more than 8k rows and likely related to the id value in junk. Repro steps:

      CREATE TABLE `junk` (
        `id` int(11) DEFAULT NULL,
        `dt` date DEFAULT NULL
      ) ENGINE=Columnstore DEFAULT CHARSET=latin1;
       
      CREATE TABLE `junk_inno` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `dt` date DEFAULT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=InnoDB AUTO_INCREMENT=16385 DEFAULT CHARSET=latin1;
       
      insert into junk values (6071, "2016-11-17");
       
      insert into junk_inno values (0, FROM_UNIXTIME(UNIX_TIMESTAMP('2015-01-01 00:00:00') + FLOOR(0 + (RAND() * 63072000))));
       
      --  repeat the following until 8192 rows inserted (resulting in 16k rows):
      insert into junk_inno select 0, FROM_UNIXTIME(UNIX_TIMESTAMP('2015-01-01 00:00:00') + FLOOR(0 + (RAND() * 63072000))) from junk_inno;
       
      pager grep 0000
      MariaDB [dbt3]> select dt from junk_inno where id>(select ifnull(max(id),0) from junk);             16384 rows in set, 1 warning (0.03 sec)
       
      MariaDB [dbt3]> select dt from junk_inno where id>(select ifnull(max(id),0) from junk);
      | 0000-00-00 |
      | 0000-00-00 |
      | 0000-00-00 |
      | 0000-00-00 |
      | 0000-00-00 |
      15766 rows in set, 1 warning (0.03 sec)
      

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              dthompson David Thompson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.