Commit 4d0587c3 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix an error pointed out by Valgrind due to uninitialised Correlated

  variable. This variable is not to be used by CONNECT.
modified:
  storage/connect/array.cpp
  storage/connect/array.h
parent de3ee460
......@@ -254,7 +254,6 @@ ARRAY::ARRAY(PGLOBAL g, PARRAY par, int k) : CSORT(FALSE)
Value = AllocateValue(g, Type, Len, prec, NULL);
Constant = TRUE;
} // end of ARRAY constructor
#endif // 0
/***********************************************************************/
/* Empty: reset the array for a new use (correlated queries). */
......@@ -267,6 +266,7 @@ void ARRAY::Empty(void)
Nval = Ndif = 0;
Bot = Top = X = Inf = Sup = 0;
} // end of Empty
#endif // 0
/***********************************************************************/
/* Add a string element to an array. */
......@@ -741,7 +741,7 @@ bool ARRAY::Sort(PGLOBAL g)
Nval = Ndif;
} // endif ndif
if (!Correlated) {
//if (!Correlated) {
if (Size > Nval) {
Size = Nval;
Valblk->ReAllocate(g, Size);
......@@ -751,7 +751,7 @@ bool ARRAY::Sort(PGLOBAL g)
PlgDBfree(Index);
PlgDBfree(Offset);
Xsize = -1;
} // endif Correlated
// } // endif Correlated
Bot = -1; // For non optimized search
Top = Ndif; // Find searches the whole array.
......
......@@ -44,7 +44,7 @@ class DllExport ARRAY : public XOBJECT, public CSORT { // Array descblock
int GetSize(void) {return Size;}
// PVAL GetValp(void) {return Valp;}
void SetType(int atype) {Type = atype;}
void SetCorrel(bool b) {Correlated = b;}
// void SetCorrel(bool b) {Correlated = b;}
// Methods
virtual void Reset(void) {Bot = -1;}
......@@ -54,7 +54,7 @@ class DllExport ARRAY : public XOBJECT, public CSORT { // Array descblock
//virtual int CheckSpcCol(PTDB, int) {return 0;}
virtual void Print(PGLOBAL g, FILE *f, uint n);
virtual void Print(PGLOBAL g, char *ps, uint z);
void Empty(void);
// void Empty(void);
void SetPrecision(PGLOBAL g, int p);
bool AddValue(PGLOBAL g, PSZ sp);
bool AddValue(PGLOBAL g, short n);
......@@ -92,7 +92,7 @@ class DllExport ARRAY : public XOBJECT, public CSORT { // Array descblock
int Bot; // Bottom of research index
int Top; // Top of research index
int X, Inf, Sup; // Used for block optimization
bool Correlated; // -----------> Temporary
//bool Correlated; // -----------> Temporary
}; // end of class ARRAY
/***********************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment