From: Pavan Deolasee Date: Wed, 6 Jul 2016 18:14:05 +0000 (+0530) Subject: Use GTM_Sequence type to hold value of a sequence on GTM X-Git-Tag: XL9_5_R1_2~32 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=ecc259c560d7462c6123883f8f7231a0d67b6e27;p=postgres-xl.git Use GTM_Sequence type to hold value of a sequence on GTM We were incorrectly using "int" at couple of places which is not wide enough to store 64-bit sequence values. Per report by Helmi Ahmad --- diff --git a/src/gtm/main/gtm_seq.c b/src/gtm/main/gtm_seq.c index 2fa6bf297a..2b3868ec5e 100644 --- a/src/gtm/main/gtm_seq.c +++ b/src/gtm/main/gtm_seq.c @@ -851,7 +851,7 @@ GTM_SeqGetNext(GTM_SequenceKey seqkey, char *coord_name, if (seqinfo->gs_max_value - seqinfo->gs_increment_by >= seqinfo->gs_value) { - int newval = seqinfo->gs_value + seqinfo->gs_increment_by; + GTM_Sequence newval = seqinfo->gs_value + seqinfo->gs_increment_by; *result = seqinfo->gs_value = newval; } else if (SEQ_IS_CYCLE(seqinfo)) @@ -879,7 +879,7 @@ GTM_SeqGetNext(GTM_SequenceKey seqkey, char *coord_name, if (seqinfo->gs_min_value - seqinfo->gs_increment_by <= seqinfo->gs_value) { - int newval = seqinfo->gs_value + seqinfo->gs_increment_by; + GTM_Sequence newval = seqinfo->gs_value + seqinfo->gs_increment_by; *result = seqinfo->gs_value = newval; } else if (SEQ_IS_CYCLE(seqinfo))