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

Cross Join between InnoDB and Columnstore tables returns wrong results

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 1.0.5
    • Icebox
    • MariaDB Server
    • None

    Description

      Steps to reproduce :-
      1)Create a table -> table_1
      CREATE TABLE `table_1` (
      `id` int(11) NOT NULL,
      `time_slice_size` int(11) DEFAULT NULL
      ) ENGINE=Columnstore DEFAULT CHARSET=latin1;
      2)Insert data in table_1 :-
      insert into table_1 values(1,60);
      insert into table_1 values(2,60);
      3)Create another table -> table_2
      CREATE TABLE `table_2` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `start_timestamp` timestamp NULL DEFAULT NULL,
      `end_timestamp` timestamp NULL DEFAULT NULL,
      PRIMARY KEY (`id`)
      ) ENGINE=InnoDB AUTO_INCREMENT=9155 DEFAULT CHARSET=latin1;
      4)Insert data into table_2 :-
      insert into table_2 values (1,'2016-10-10 08:00:00','2016-10-10 09:00:00');
      insert into table_2 values (2,'2016-10-10 08:00:00','2016-10-10 09:00:00');

      5)Run the below query :-
      select tb1.time_slice_size,tb2.id tb2_id, tb2.end_timestamp, tb2.start_timestamp FROM table_1 tb1, table_2 tb2 where tb1.id = tb2.id and tb2.id = 1;
      This returns two row it should return one row.

      Same problem is with below query(with IN )

      select tb1.time_slice_size,tb2.id tb2_id, tb2.end_timestamp, tb2.start_timestamp FROM table_1 tb1, table_2 tb2 where tb1.id = tb2.id and tb2.id in (1);

      but the weird thing is that when i add one more id then it returns correct result,see below :-
      select tb1.time_slice_size,tb2.id tb2_id, tb2.end_timestamp, tb2.start_timestamp FROM table_1 tb1, table_2 tb2 where tb1.id = tb2.id and tb2.id in (1,3);

      Please see screen shot for details.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kssonu4u Kumar Saurav Sonu
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.