Bug in editing a sequence

Busk

Member²
When I change the cache size in a sequence using the PL/SQL editor, the correspondig "view SQL" text shows:
-- Alter sequence
alter sequence S_AUDIT_SEQ
cache 10;

And this is the correct command to do in SQLPLUS

but in fact the editor executes the command:
-- Create sequence
create sequence S_AUDIT_SEQ
minvalue 1
maxvalue 999999999
start with 11516779
increment by 1
cache 10
cycle;

The startvalue here is the sequence value when the editor opened.

The result could be repeating some values if the sequence is queried by other sessions.
:(
 
When you press the "View SQL" button, it shows the exact SQL that will be executed when you apply the changes.

Why do you think the 2nd statement is executed?
 
Because of the observation:

1 nextval gives 110
2 I open an edit sequence box
3 another session executes a number of nextvals so the expected next number is 115
4 I change the cache size as in my first mail and apply.

5 the other session gets a nextval of 111 instead of 115

(plsql v. 7.1.2 Oracle 10.2.0)
 
No, if I copy the statement displayed in developers "View SQL" window to a SQLPLUS session it succeeds with the expected result.
 
I see. We'll check it out. Maybe we should not compare the "start with" property with the current database value, since it can change when others do a nextval.
 
Back
Top