From 4d1ce73e33835f9566bf68bce4cbd5bf1538ac3b Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Wed, 5 Aug 2020 21:35:26 -0300 Subject: [PATCH] Postfix for CORE-6084 and CORE-6376: fix initial default value to be 1. --- src/dsql/DdlNodes.epp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dsql/DdlNodes.epp b/src/dsql/DdlNodes.epp index 5020b4604a..2c6a02a29c 100644 --- a/src/dsql/DdlNodes.epp +++ b/src/dsql/DdlNodes.epp @@ -5730,7 +5730,7 @@ void CreateAlterSequenceNode::executeCreate(thread_db* tdbb, DsqlCompilerScratch executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE, DDL_TRIGGER_CREATE_SEQUENCE, name, NULL); - const SINT64 val = value.specified ? value.value : 0; + const SINT64 val = value.orElse(1); SLONG initialStep = 1; if (step.specified) { @@ -6478,7 +6478,7 @@ void RelationNode::defineField(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch CreateAlterSequenceNode::store(tdbb, transaction, fieldDefinition.identitySequence, fb_sysflag_identity_generator, - clause->identityOptions->startValue.orElse(0), + clause->identityOptions->startValue.orElse(1), clause->identityOptions->increment.orElse(1)); }