Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-41716

In federated server ,Rollback failed to revert update changes in transaction

    XMLWordPrintable

Details

    • Unexpected results

    Description

      Issue:

      ------
      In federated server , Rollback failed to revert update stmt changes inside transaction:

      Testcase:

      ------------------
      truncate s1;
      insert into s1 values (1),(2),(3);
      start transaction;
      UPDATE s1 JOIN s1 AS OUTR2 SET OUTR2.a = 10 where s1.a >0;
      rollback;
      select * from s1;

      Expected:

      MariaDB [m8]> select * from s1;
      +------+
      | a    |
      +------+
      |    1 |
      |    2 |
      |    3 |
      +------+
      3 rows in set (0.001 sec)
      

      Returned:

      MariaDB [m8]> select * from s1;
      +------+
      | a    |
      +------+
      |   10 |
      |   10 |
      |   10 |
      +------+
      3 rows in set (0.003 sec)
      

      Version used:
      -------------
      Branch : main
      commit: f4a85225ea17b2c77c20e761773090a08aa3eceb
      Version : 13.1.0

      How to repeat:

      Slave:

      create database m8;use m8;
      create user u3@localhost; grant all on *.* to u3@localhost;
      create table s1( a int);
      

      Master: Start server with federated engine enabled

      create table s1(a int)  ENGINE="FEDERATED" CONNECTION='mysql://u3@127.0.0.1:3306/m8/s1';
       
      truncate s1;
      insert into s1 values (1),(2),(3);
      start transaction;
      UPDATE s1 JOIN s1 AS OUTR2 SET OUTR2.a = 10 where s1.a >0;
      rollback;
      select * from s1;
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mariadb-pavithrapandith Pavithra Pandith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.