[MCOL-736] transaction gets autocommitted if non columnstore query executed Created: 2017-06-02 Updated: 2017-06-12 Resolved: 2017-06-12 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | 1.0.9 |
| Fix Version/s: | 1.0.10, 1.1.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Thompson (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | community | ||
| Sprint: | 2017-12 |
| Description |
|
It looks like ColumnStore is not respecting a transaction ROLLBACK if, inside the transaction, we issue a SELECT statement. This happens regardless of the table engine (we tested with InnoDB and ColumStore). Test case: CREATE TABLE `countries_innodb` ( INSERT INTO countries_innodb (code) VALUES ('BR'); BEGIN; – Result: two countries. It looks like only the SELECT generates this behavior. If we INSERT or UPDATE multiple times, the transaction is still ROLL'd back fine. Current version: 1.0.9. |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-06-02 ] | |||||||||||
|
This works correctly if the table being inserted is columnstore and you query a columnstore table in the select (i.e. the transaction is wholly within the columnstore world). The innodb / innodb case should really work however and indicates a possible break in our fork. Hybrid cases need to be examined to see if we can support these easily or not. | |||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-06-08 ] | |||||||||||
|
The drop part of the vtable process is triggering an implicit commit. Since this is a temporary table we can add the 'temporary' keyword to the drop and the implicit commit on select will stop. | |||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-06-08 ] | |||||||||||
|
Two pull requests in server and two in regression suite. | |||||||||||
| Comment by Daniel Lee (Inactive) [ 2017-06-12 ] | |||||||||||
|
Builds tested: Github source 1.0.10, 1.1.0 1.1.0 [root@localhost mariadb-columnstore-server]# git show Merge pull request #55 from mariadb-corporation/ [root@localhost mariadb-columnstore-engine]# git show 1.0.10 [root@localhost mariadb-columnstore-server]# git show Merge pull request #54 from mariadb-corporation/ commit 4d5a59d3d104cda2a7715b4e619318e43e964214 Tested innodb, columnstore, and innodb/columnstore combination. MariaDB [mytest]> CREATE TABLE `countries_innodb` ( MariaDB [mytest]> INSERT INTO countries_innodb (code) VALUES ('BR'); MariaDB [mytest]> BEGIN; MariaDB [mytest]> INSERT INTO countries_innodb (code) VALUES ('UK'); MariaDB [mytest]> SELECT 'INSIDE TRANSACTION' AS ''; --------------------
-------------------- MariaDB [mytest]> ROLLBACK; MariaDB [mytest]> SELECT * FROM countries_innodb;
------
------ MariaDB [mytest]> CREATE TABLE `countries_columnstore` ( MariaDB [mytest]> CREATE TABLE `countries_innodb` ( MariaDB [mytest]> INSERT INTO countries_columnstore (code) VALUES ('BR'); MariaDB [mytest]> BEGIN; MariaDB [mytest]> INSERT INTO countries_columnstore (code) VALUES ('UK'); MariaDB [mytest]> select * from countries_innodb;
------
------ MariaDB [mytest]> SELECT 'INSIDE TRANSACTION' AS ''; --------------------
-------------------- MariaDB [mytest]> ROLLBACK; MariaDB [mytest]> SELECT * FROM countries_columnstore;
------
------ |