summaryrefslogtreecommitdiff
path: root/storage/connect/array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/array.cpp')
-rw-r--r--storage/connect/array.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp
index 9815fbb6be6..a2f537436c9 100644
--- a/storage/connect/array.cpp
+++ b/storage/connect/array.cpp
@@ -25,6 +25,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <stdint.h> // for uintprt_h
#endif // !WIN32
/***********************************************************************/
@@ -51,11 +52,6 @@
#endif
/***********************************************************************/
-/* Static variables. */
-/***********************************************************************/
-extern "C" int trace;
-
-/***********************************************************************/
/* DB static external variables. */
/***********************************************************************/
extern MBLOCK Nmblk; /* Used to initialize MBLOCK's */
@@ -129,7 +125,7 @@ PARRAY MakeValueArray(PGLOBAL g, PPARM pp)
break;
case TYPE_VOID:
// Integer stored inside pp->Value
- par->AddValue(g, (int)parmp->Value);
+ par->AddValue(g, parmp->Intval);
break;
} // endswitch valtyp
@@ -585,7 +581,7 @@ bool ARRAY::CanBeShort(void)
/***********************************************************************/
int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
{
- int i;
+ int i, prec = 0;
bool b = FALSE;
PMBV ovblk = Valblk;
PVBLK ovblp = Vblp;
@@ -595,6 +591,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
switch (Type) {
case TYPE_DOUBLE:
+ prec = 2;
case TYPE_SHORT:
case TYPE_INT:
case TYPE_DATE:
@@ -607,13 +604,13 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
Size = Nval;
Nval = 0;
- Vblp = Valblk->Allocate(g, Type, Len, 0, Size);
+ Vblp = Valblk->Allocate(g, Type, Len, prec, Size);
if (!Valblk->GetMemp())
// The error message was built by PlgDBalloc
return TYPE_ERROR;
else
- Value = AllocateValue(g, Type, Len, 0, NULL);
+ Value = AllocateValue(g, Type, Len, prec, NULL);
/*********************************************************************/
/* Converting STRING to DATE can be done according to date format. */