projects
/
postgres-xl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9f99b9
)
extendVar should only reset val_used only when newSize is greater than the
author
Pavan Deolasee
<
[email protected]
>
Fri, 1 Apr 2016 06:25:43 +0000
(11:55 +0530)
committer
Pavan Deolasee
<
[email protected]
>
Tue, 18 Oct 2016 10:05:04 +0000
(15:35 +0530)
current value of val_used
contrib/pgxc_ctl/variables.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pgxc_ctl/variables.c
b/contrib/pgxc_ctl/variables.c
index 6d9be1023013d68fa935da82e008bc1bdc7bf0c8..b946dfb2f45f6cf89dbd7c441dd676f6ab0f079d 100644
(file)
--- a/
contrib/pgxc_ctl/variables.c
+++ b/
contrib/pgxc_ctl/variables.c
@@
-422,7
+422,8
@@
int extendVar(char *name, int newSize, char *def_value)
/* Store NULL in the last element to mark the end-of-array */
(target->val)[newSize] = NULL;
- target->val_used = newSize;
+ if (target->val_used < newSize)
+ target->val_used = newSize;
return 0;
}