Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.6
-
None
Description
https://mariadb.com/kb/en/library/create-sequence/
lack information about case of INCREMENT equal to 0.
ORACLE and MSSQL prohibit it according to documentation
DB2 thread the sequence as accidental and so we do (at least according my experience)
CREATE SEQUENCE s INCREMENT 0;
|
SELECT NEXTVAL(s);
|
NEXTVAL(s)
|
1
|
SELECT NEXTVAL(s);
|
NEXTVAL(s)
|
2
|
SELECT NEXTVAL(s);
|
NEXTVAL(s)
|
3
|
Attachments
Issue Links
- relates to
-
MDEV-16035 SEQUENCE with zero increment does not behave as expected
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Summary | SECUENCE with zero increment is not described in mariadb documentation | SEQUENCE with zero increment is not described in mariadb documentation |
Component/s | Sequences [ 14009 ] |
Link |
This issue relates to |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 86797 ] | MariaDB v4 [ 154259 ] |
I checked implementation if increment is 0, it will be taken from global system variable:
if (!(real_increment= increment))
real_increment= global_system_variables.auto_increment_increment;