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

Performing a single insert after a LDI in a transaction does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.3
    • Fix Version/s: 1.5.1, 1.4.4
    • Component/s: Connector
    • Labels:
      None
    • Sprint:
      2020-7

      Description

      Inside a transaction, if we perform a bulk insert (such as LDI) followed by a single insert, we don't see the record inserted by the single insert statement. However, the reverse sequence, i.e. performing a single insert followed by a LDI, inside a transaction works fine.

      Here are steps to reproduce (here, data.txt is file containing 2 records: 231\n123):

      MariaDB [test]> create table c1 (a int)engine=columnstore;
      Query OK, 0 rows affected (0.625 sec)
       
      MariaDB [test]> start transaction;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> load data local infile '/home/gagan_goel_mariadb_com/insert-profiling/data.txt' into table c1;
      Query OK, 2 rows affected (0.241 sec)                
      Records: 2  Deleted: 0  Skipped: 0  Warnings: 0
       
      MariaDB [test]> select * from c1;
      +------+
      | a    |
      +------+
      |  231 |
      |  123 |
      +------+
      2 rows in set (0.065 sec)
       
      MariaDB [test]> insert into c1 values (100);
      Query OK, 1 row affected (0.000 sec)
       
      MariaDB [test]> select * from c1;
      +------+
      | a    |
      +------+
      |  231 |
      |  123 |
      +------+
      2 rows in set (0.030 sec)
       
      MariaDB [test]> rollback;
      Query OK, 0 rows affected (0.070 sec)
       
      MariaDB [test]> select * from c1;
      Empty set (0.044 sec)
       
      MariaDB [test]> start transaction;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [test]> insert into c1 values (100);
      Query OK, 1 row affected (0.077 sec)
       
      MariaDB [test]> select * from c1;
      +------+
      | a    |
      +------+
      |  100 |
      +------+
      1 row in set (0.036 sec)
       
      MariaDB [test]> load data local infile '/home/gagan_goel_mariadb_com/insert-profiling/data.txt' into table c1;
      Query OK, 2 rows affected (0.087 sec)                
      Records: 2  Deleted: 0  Skipped: 0  Warnings: 0
       
      MariaDB [test]> select * from c1;
      +------+
      | a    |
      +------+
      |  100 |
      |  231 |
      |  123 |
      +------+
      3 rows in set (0.013 sec)
       
      MariaDB [test]> rollback;
      Query OK, 0 rows affected (0.035 sec)
       
      MariaDB [test]> select * from c1;
      Empty set (0.012 sec)
      

        Attachments

          Activity

            People

            Assignee:
            dleeyh Daniel Lee
            Reporter:
            tntnatbry Gagan Goel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: