Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALTER SEQUENCE RESTART WITH does not change the initial value [CORE5133] #5417

Closed
firebird-issue-importer opened this issue Mar 5, 2016 · 9 comments

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented Mar 5, 2016

Submitted by: @sim1984

Is replaced by CORE6386

Test case:

SQL> create sequence s1 start with 100 increment 2;
SQL> show sequences;
Generator S1, current value: 100, initial value: 100, increment: 2
SQL> alter sequence s1 restart with 5 increment 3;
SQL> show sequences;
Generator S1, current value: 5, initial value: 100, increment: 3

The initial value remains unchanged, while it should be reset to 5.

The only case when the initial value should not be changed is the RESTART clause without argument:

alter sequence s1 restart;

Commits: dd3c55e 91c7195 FirebirdSQL/fbt-repository@6a490ac FirebirdSQL/fbt-repository@0c43c5d FirebirdSQL/fbt-repository@20b3f3e

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 8, 2016

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0.0 [ 10740 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 8, 2016

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 8, 2016

Commented by: @asfernandes

Does this ticket subject matches its description? It's confusing for me.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2016

Modified by: @dyemanov

Component: Engine [ 10000 ]

description: SQL> create sequence s1 start with 100 increment 2;
SQL> show sequences;
Generator S1, current value: 100, initial value: 100, increment: 2
SQL> alter sequence s1 restart with 5 increment 3;
SQL> show sequences;
Generator S1, current value: 5, initial value: 100, increment: 3

initial value should not be changed only if the statement

alter sequence s1 restart;

=>

Test case:

SQL> create sequence s1 start with 100 increment 2;
SQL> show sequences;
Generator S1, current value: 100, initial value: 100, increment: 2
SQL> alter sequence s1 restart with 5 increment 3;
SQL> show sequences;
Generator S1, current value: 5, initial value: 100, increment: 3

The initial value remains unchanged, while it should be reset to 5.

The only case when the initial value should not be changed is the RESTART clause without argument:

alter sequence s1 restart;

summary: "Alter sequence restart with" does not change the initial value => ALTER TABLE RESTART WITH does not change the initial value

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2016

Commented by: @dyemanov

It does, more or less. I've improved the description a little.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2016

Modified by: @dyemanov

summary: ALTER TABLE RESTART WITH does not change the initial value => ALTER SEQUENCE RESTART WITH does not change the initial value

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2016

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 9, 2016

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 19, 2020

Modified by: @mrotteveel

Link: This issue is replaced by CORE6386 [ CORE6386 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants