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

Alter sequence 2nd ps fails while alter sequence 2nd time (no ps) succeeds

Details

    Description

      In the following case, statements 1 and 2 succeed, so is statement 3, but statement 4 fails. It should succeed because 2 succeeds.

      11.4 3fad2b115569864d8c1b7ea90ce92aa895cfef08

      create sequence s;
      /* 1 */ alter sequence s maxvalue 123;
      /* 2 */ alter sequence s maxvalue 123;
      drop sequence s;
       
      create sequence s;
      prepare stmt from 'alter sequence s maxvalue 123';
      /* 3 */ execute stmt;
      /* 4 */ execute stmt;
      deallocate prepare stmt;
      drop sequence s;
      

      Could also reprod at 10.4 9695974e4b212aa4820e0ccfeb164f5444c0d58e.

      The error is

      mysqltest: At line 10: query '/* 4 */ execute stmt' failed: 4085: Sequence 'test.s' has out of range value for options
      

      Attachments

        Issue Links

          Activity

            ycp Yuchen Pei added a comment - - edited

            An initial patch, and it seems to fix MDEV-33012 too Local tests all look good. Waiting for the CI...

            61aa9f81a1f upstream/bb-10.4-mdev-33169 MDEV-33169 Reset sequence used fields after check in alter sequence
            

            ycp Yuchen Pei added a comment - - edited An initial patch, and it seems to fix MDEV-33012 too Local tests all look good. Waiting for the CI... 61aa9f81a1f upstream/bb-10.4-mdev-33169 MDEV-33169 Reset sequence used fields after check in alter sequence
            ycp Yuchen Pei added a comment - - edited

            Hi sanja, ptal thanks:

            bb-10.4-mdev-33169 a7e379d737a3aedbeedf816270527d903bb52b17
            MDEV-33169 Reset sequence used fields after check in alter sequence
             
            The bitmap is temporarily flipped to ~0 for the sake of checking all
            fields. It needs to be restored because it will be reused in second
            and subsequent ps execution.
            

            ycp Yuchen Pei added a comment - - edited Hi sanja , ptal thanks: bb-10.4-mdev-33169 a7e379d737a3aedbeedf816270527d903bb52b17 MDEV-33169 Reset sequence used fields after check in alter sequence   The bitmap is temporarily flipped to ~0 for the sake of checking all fields. It needs to be restored because it will be reused in second and subsequent ps execution.

            Please make your editor avoid using <TAB> symbols and fix the patch (your editor things that tab is 2 spaces, by default it is 8 everywhere). That is why we avoid tabs and we are removing existing tabs if change something in that lines

            sanja Oleksandr Byelkin added a comment - Please make your editor avoid using <TAB> symbols and fix the patch (your editor things that tab is 2 spaces, by default it is 8 everywhere). That is why we avoid tabs and we are removing existing tabs if change something in that lines
            ycp Yuchen Pei added a comment -

            Thanks for the comment. I've fixed the tabs (no idea why my emacs config of using spaces rather than tabs was overriden in this particular file/buffer), ptal thanks

            upstream/bb-10.4-mdev-33169 22e5e69426250a76d5e2c0b54f85bbc3699db021
            MDEV-33169 Reset sequence used fields after check in alter sequence
             
            The bitmap is temporarily flipped to ~0 for the sake of checking all
            fields. It needs to be restored because it will be reused in second
            and subsequent ps execution.
            

            ycp Yuchen Pei added a comment - Thanks for the comment. I've fixed the tabs (no idea why my emacs config of using spaces rather than tabs was overriden in this particular file/buffer), ptal thanks upstream/bb-10.4-mdev-33169 22e5e69426250a76d5e2c0b54f85bbc3699db021 MDEV-33169 Reset sequence used fields after check in alter sequence   The bitmap is temporarily flipped to ~0 for the sake of checking all fields. It needs to be restored because it will be reused in second and subsequent ps execution.

            OK to push

            sanja Oleksandr Byelkin added a comment - OK to push
            ycp Yuchen Pei added a comment -

            Thanks for the review. Pushed ca276a0f3fcb45ff0abc011e334c700e0c5d4315 to 10.4

            ycp Yuchen Pei added a comment - Thanks for the review. Pushed ca276a0f3fcb45ff0abc011e334c700e0c5d4315 to 10.4

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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