summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2014-07-25 11:37:07 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2014-07-25 11:37:07 +0200
commit4d0587c331c64f6e2e496f2a3045e979cfc17000 (patch)
treee4393ca97d243c61b5caa70b0b32ddde19cda053
parentde3ee460da90a1892bd6ff28387e6e8cef5dc1a3 (diff)
downloadmariadb-git-4d0587c331c64f6e2e496f2a3045e979cfc17000.tar.gz
- 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
-rw-r--r--storage/connect/array.cpp6
-rw-r--r--storage/connect/array.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp
index 7f9bef4265d..75aed1503d9 100644
--- a/storage/connect/array.cpp
+++ b/storage/connect/array.cpp
@@ -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.
diff --git a/storage/connect/array.h b/storage/connect/array.h
index dee1b7a846a..01b5b935def 100644
--- a/storage/connect/array.h
+++ b/storage/connect/array.h
@@ -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
/***********************************************************************/