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

ALTER .. ENGINE on temporary sequence may go wrong

Details

    Description

      temporary sequences don't work properly after 'ALTER engine' command, e.g.:

      MariaDB [test]> create temporary sequence s;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> alter table s engine myisam;
      Query OK, 1 row affected (0.00 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> select nextval(s);
      +-----------------+
      | nextval(s)      |
      +-----------------+
      | 140241957546134 |
      +-----------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> \r
      Connection id:    16
      Current database: test
       
      MariaDB [test]> create temporary sequence s;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> alter table s engine innodb;
      Query OK, 1 row affected (0.00 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> select nextval(s);
      +------------+
      | nextval(s) |
      +------------+
      |          0 |
      +------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select nextval(s);
      +-----------------+
      | nextval(s)      |
      +-----------------+
      | 140241957547216 |
      +-----------------+
      1 row in set (0.00 sec)
      

      Attachments

        Issue Links

          Activity

            anikitin Andrii Nikitin (Inactive) created issue -
            anikitin Andrii Nikitin (Inactive) made changes -
            Field Original Value New Value
            serg Sergei Golubchik made changes -
            Component/s Sequences [ 14009 ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Priority Minor [ 4 ] Major [ 3 ]
            monty Michael Widenius made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            Looks like the bug was fixed some time ago (at least I can't repeat it).
            I added the test case just have this case tested properly.

            monty Michael Widenius added a comment - Looks like the bug was fixed some time ago (at least I can't repeat it). I added the test case just have this case tested properly.
            monty Michael Widenius made changes -
            issue.field.resolutiondate 2018-05-07 13:41:46.0 2018-05-07 13:41:46.236
            monty Michael Widenius made changes -
            Fix Version/s 10.3.7 [ 23005 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Cannot Reproduce [ 5 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 81116 ] MariaDB v4 [ 152274 ]

            People

              monty Michael Widenius
              anikitin Andrii Nikitin (Inactive)
              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.