summaryrefslogtreecommitdiff
path: root/storage/connect/xindex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/xindex.cpp')
-rwxr-xr-xstorage/connect/xindex.cpp39
1 files changed, 16 insertions, 23 deletions
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index 601374ef5d7..1adf9f20465 100755
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -60,6 +60,7 @@
/* DB static external variables. */
/***********************************************************************/
extern MBLOCK Nmblk; /* Used to initialize MBLOCK's */
+extern "C" int trace;
/***********************************************************************/
/* Last two parameters are true to enable type checking, and last one */
@@ -267,10 +268,7 @@ int XINDEX::Qcompare(int *i1, int *i2)
if ((k = kcp->Compare(*i1, *i2)))
break;
-#ifdef DEBTRACE
- num_comp++;
-#endif
-
+//num_comp++;
return k;
} // end of Qcompare
@@ -1792,7 +1790,8 @@ int XINDEX::FastFind(int nv)
XINDXS::XINDXS(PTDBDOS tdbp, PIXDEF xdp, PXLOAD pxp, PCOL *cp, PXOB *xp)
: XINDEX(tdbp, xdp, pxp, cp, xp)
{
- Srtd = To_Cols[0]->GetOpt() < 0; // ?????
+//Srtd = To_Cols[0]->GetOpt() < 0; // ?????
+ Srtd = false;
} // end of XINDXS constructor
/***********************************************************************/
@@ -1800,10 +1799,7 @@ XINDXS::XINDXS(PTDBDOS tdbp, PIXDEF xdp, PXLOAD pxp, PCOL *cp, PXOB *xp)
/***********************************************************************/
int XINDXS::Qcompare(int *i1, int *i2)
{
-#ifdef DEBTRACE
- num_comp++;
-#endif
-
+//num_comp++;
return To_KeyCol->Compare(*i1, *i2);
} // end of Qcompare
@@ -2319,11 +2315,9 @@ bool XHUGE::Open(PGLOBAL g, char *filename, int id, MODE mode)
return true;
} // endif Hfile
-#ifdef DEBTRACE
- fprintf(debug,
- " access=%p share=%p creation=%d handle=%p fn=%s\n",
- access, share, creation, Hfile, filename);
-#endif
+ if (trace)
+ htrc(" access=%p share=%p creation=%d handle=%p fn=%s\n",
+ access, share, creation, Hfile, filename);
if (mode == MODE_INSERT) {
/*******************************************************************/
@@ -2766,10 +2760,9 @@ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln)
Prefix = true;
} // endif kln
-#ifdef DEBTRACE
- htrc("KCOL(%p) Init: col=%s n=%d type=%d sm=%d\n",
- this, colp->GetName(), n, colp->GetResultType(), sm);
-#endif
+ if (trace)
+ htrc("KCOL(%p) Init: col=%s n=%d type=%d sm=%d\n",
+ this, colp->GetName(), n, colp->GetResultType(), sm);
// Allocate the Value object used when moving items
Type = colp->GetResultType();
@@ -2797,7 +2790,8 @@ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln)
// Store this information to avoid sorting when already done
if (Asc)
- IsSorted = colp->GetOpt() < 0;
+// IsSorted = colp->GetOpt() < 0;
+ IsSorted = false;
//SetNulls(colp->IsNullable()); for when null columns will be indexable
return false;
@@ -2820,10 +2814,9 @@ BYTE* KXYCOL::MapInit(PGLOBAL g, PCOL colp, int *n, BYTE *m)
Type = colp->GetResultType();
-#ifdef DEBTRACE
- htrc("MapInit(%p): colp=%p type=%d n=%d len=%d m=%p\n",
- this, colp, Type, n[0], len, m);
-#endif
+ if (trace)
+ htrc("MapInit(%p): colp=%p type=%d n=%d len=%d m=%p\n",
+ this, colp, Type, n[0], len, m);
// Allocate the Value object used when moving items
Valp = AllocateValue(g, Type, len, prec, false, NULL);