[MDEV-13007] ALTER .. ENGINE on temporary sequence may go wrong Created: 2017-06-06  Updated: 2018-05-07  Resolved: 2018-05-07

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Sequences
Affects Version/s: 10.3
Fix Version/s: 10.3.7

Type: Bug Priority: Major
Reporter: Andrii Nikitin (Inactive) Assignee: Michael Widenius
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-12930 Testing SEQUENCE object Closed

 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)



 Comments   
Comment by Michael Widenius [ 2018-05-07 ]

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.

Generated at Thu Feb 08 08:02:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.