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

Update or delete followed by insert to a different table may not work and leaves tablelock

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.5.3
    • Component/s: Connector
    • Labels:
      None

      Description

      In ha_mcs_impl.cpp doUpdateDelete(), it sets ci.tableOid (that's the cal_connection_info struct).
      It never un-sets it. The next command may use this. An Insert most certainly will, causing serious consternation in the following code that may leave a table lock behind.

      drop table if exists T4126_1;
      drop table if exists T4126_2;
       
      create table T4126_1 (idx int, col varchar(20)) engine=columnstore;
      create table T4126_2 (idx int, col varchar(20), col2 varchar(20)) engine=columnstore;
      insert into T4126_1 values (3, 'a');
      select * from T4126_1;
       
      insert into T4126_2 values (1, 'lamp', 'table lamp');  
      select * from T4126_2;
      update T4126_2 set col = "floor lamp" where col = 'lamp';
       
      drop table if exists T4126_1;
      drop table if exists T4126_2;
       
      create table T4126_1 (idx1 int, col1 varchar(20)) engine=columnstore;
      insert into T4126_1 values (3, 'a');                       <<-- Will break here and leave a lock on
      select * from T4126_1;
      drop table if exists sT4126_1;
      

        Attachments

          Activity

            People

            Assignee:
            dleeyh Daniel Lee
            Reporter:
            David.Hall David Hall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration