View Issue Details

IDProjectCategoryView StatusLast Update
0007645VCOMPONENT-VKERNELSQL Dumppublic2016-06-29 08:12
Reporteryuriy_velichko Assigned ToIvan Smahin  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version6.5.x 
Fixed in Version6.5.x 
Summary0007645: Dump script for sequence does not restore the current value
DescriptionThe script for sequence in the dump does not contains statement to set current value.
Steps To Reproduce1. Create Sequence, Table and insert data:

CREATE SEQUENCE seq1;

-- CREATE TABLE "table1" ---------------------------------------
CREATE TABLE "table1"(
    "field" LONG,
    "field_1" VARCHAR ( 2044 ) );

-- Create index test_index
CREATE INDEX "test_index" ON "table1"( "field_1" );
-- -------------------------------------------------------------

INSERT INTO "table1" ( "field", "field_1")
VALUES ( NEXTVAL('seq1'), 'test1' );

INSERT INTO "table1" ( "field", "field_1")
VALUES ( NEXTVAL('seq1'), 'test2' );

INSERT INTO "table1" ( "field", "field_1")
VALUES ( NEXTVAL('seq1'), 'test3' );

2. Create Dump and load it:

....
-- Create types
CREATE SEQUENCE seq1 INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775806 START 1;
....

3. Add a new row to the table from dump

INSERT INTO "table1" ( "field", "field_1")
VALUES ( NEXTVAL('seq1'), 'test4' );

value from NEXTVAL('seq1') - will be 1.
If the field is unique it will lead to error. If not - user can even do not know, about unexpected (maybe duplicated) value.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2016-05-06 11:37 yuriy_velichko New Issue
2016-05-06 11:39 yuriy_velichko Summary Dump script for sequence do not restores the current value => Dump script for sequence does not restore the current value
2016-06-29 08:12 Ivan Smahin Status new => resolved
2016-06-29 08:12 Ivan Smahin Fixed in Version => 6.5.x
2016-06-29 08:12 Ivan Smahin Resolution open => fixed
2016-06-29 08:12 Ivan Smahin Assigned To => Ivan Smahin