Bug #1625 Built in sequence support
Submitted: 22 Oct 2003 10:29 Modified: 4 Oct 2005 16:50
Reporter: [ name withheld ]
Status: Verified
Category:Server: Types Severity:S4 (Feature request)
Version:4.1, 5.1 OS:Any
Assigned to: Target Version:
Triage: Triaged: D5 (Feature request)

[22 Oct 2003 10: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 15:23] Dmitry L
Yes, it would be really nice.
Please, add this feature as soon as possible :))))
Thx!
[5 Mar 21:41] Ben Small
This would be awesome. I have had to hack this up a couple of times.
[20 Jul 11:04] Susanne Ebrecht
Bug #44597 is a duplicate of this bug here