[MCOL-3912] CEJ with autocommit disabled does not give expected result. Created: 2020-03-30  Updated: 2023-10-25  Resolved: 2023-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 1.4.3-5, 1.5.3
Fix Version/s: Icebox

Type: New Feature Priority: Minor
Reporter: Gagan Goel (Inactive) Assignee: Todd Stoffel (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-1103 Implement JOIN pushdown Closed
Epic Link: ColumnStore Performance Improvements

 Description   

When autocommit=0 and an insert is performed on a table, a query with a cross-engine join involving this table does not give expected results. Here are steps to reproduce:

MariaDB [test]> create table c1(a int)engine=columnstore;
Query OK, 0 rows affected (0.389 sec)
 
MariaDB [test]> create table i1(b int);
Query OK, 0 rows affected (0.012 sec)
 
MariaDB [test]> show variables like 'autocommit';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| autocommit    | ON    |
+---------------+-------+
1 row in set (0.001 sec)
 
MariaDB [test]> insert into c1 values (1);
Query OK, 1 row affected (0.167 sec)
 
MariaDB [test]> select * from c1;
+------+
| a    |
+------+
|    1 |
+------+
1 row in set (0.064 sec)
 
MariaDB [test]> set autocommit=0;
Query OK, 0 rows affected (0.000 sec)
 
MariaDB [test]> insert into i1 values (1);
Query OK, 1 row affected (0.001 sec)
 
MariaDB [test]> select * from i1;
+------+
| b    |
+------+
|    1 |
+------+
1 row in set (0.000 sec)
 
MariaDB [test]> select * from c1, i1 where c1.a=i1.b;
Empty set (0.013 sec)
 
MariaDB [test]> set autocommit=1;
Query OK, 0 rows affected (0.002 sec)
 
MariaDB [test]> select * from i1;
+------+
| b    |
+------+
|    1 |
+------+
1 row in set (0.001 sec)
 
MariaDB [test]> select * from c1, i1 where c1.a=i1.b;
+------+------+
| a    | b    |
+------+------+
|    1 |    1 |
+------+------+
1 row in set (0.013 sec)



 Comments   
Comment by Patrick LeBlanc (Inactive) [ 2020-03-31 ]

Looks like we need a way to tell the server that our requests are part of the transaction.

Comment by Todd Stoffel (Inactive) [ 2020-04-01 ]

It might be better to eliminate the cross engine join user in ColumnStore.xml altogether and do this internally like the other engines. This looks more like a new feature request.

Comment by Roman [ 2020-04-07 ]

MCOL-1103 is supposed to handle this case.

Generated at Thu Feb 08 02:46:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.