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

ALTER .. ENGINE on temporary sequence may go wrong

    XMLWordPrintable

    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

              People

              Assignee:
              monty Michael Widenius
              Reporter:
              anikitin Andrii Nikitin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: