Bug #1625 Built in sequence support

Submitted: 22 Oct 2003 8:29 Modified: 4 Oct 2005 14:50
Reporter: [ name withheld ] Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Data Types Severity:S4 (Feature request)
Version:4.1, 5.1 OS:Any
Assigned to: CPU Architecture:Any

[22 Oct 2003 8:29] [ name withheld ]
Description:
Sequences like they are supported in Oracle or PostgreSQL would be a nice feature.

Currently, this has to be simulated by a separate user table holding a counter and using select for update and a subsequent update.

I think that it would be trivial to support this feature out of the box in MySql. A minimal function set would be sufficient, which includes currval and nextval, for example.

Best Regards,
Balazs

How to repeat:
n.a.

Suggested fix:
Use an internal table to store the sequence values and properties.
Translate sequence related SQL commands to normal SQL commands operating on this table. Transactions are necessary for this, I think.
[14 Jul 2005 13:23] Dmitry L
Yes, it would be really nice.
Please, add this feature as soon as possible :))))
Thx!
[5 Mar 2009 20:41] Ben Small
This would be awesome. I have had to hack this up a couple of times.
[20 Jul 2009 9:04] Susanne Ebrecht
Bug #44597 is a duplicate of this bug here
[12 Jul 2016 14:07] Nurlan Nurmanov
I would vote for this feature. I am currently working on a ADF Essentials based project, where MySQL is a data back end. This feature would help a lot as we currently doing workaround.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.