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

sequence statement does not trigger warning when mixed transaction rolls back

    XMLWordPrintable

Details

    Description

      In case of a rolled back mixed with sequence transaction the effect of the sequence's statement can not be undone. Extend sql_sequence.gtid test's block to see a mismatch
      of the use sequence object state between the trx' start and its end times:

      begin;
      insert into t_1 values(3333);
      select lastval(s_1) as "s_1's transaction start value";
      +s_1's transaction start value
      +2
      insert into t_1 select next value for s_1;
      ...
      rollback;
      select lastval(s_1) as "s_1's actual value after rollback";
      +s_1's actual value after rollback
      +10
      
      

      The correct behavior in the case is expected to display a warning

       rollback;
      +Warnings:
      +Warning        1196    Some non-transactional changed tables couldn't be rolled back
      

      The fixes are part of a broader MDEV-25488.

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Elkin Andrei Elkin
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.