Commit 7b400a08 authored by Olivier Bertrand's avatar Olivier Bertrand

- MRR + Block Indexing

modified:
  storage/connect/array.h
  storage/connect/catalog.h
  storage/connect/colblk.cpp
  storage/connect/colblk.h
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/domdoc.h
  storage/connect/filamap.cpp
  storage/connect/filamap.h
  storage/connect/filamdbf.h
  storage/connect/filamfix.cpp
  storage/connect/filamfix.h
  storage/connect/filamtxt.cpp
  storage/connect/filamtxt.h
  storage/connect/filamvct.cpp
  storage/connect/filamvct.h
  storage/connect/filamzip.cpp
  storage/connect/filamzip.h
  storage/connect/filter.cpp
  storage/connect/filter.h
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/myconn.h
  storage/connect/plgcnx.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/plugutil.c
  storage/connect/preparse.h
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabcol.h
  storage/connect/tabdos.cpp
  storage/connect/tabdos.h
  storage/connect/tabfix.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabfmt.h
  storage/connect/table.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/taboccur.h
  storage/connect/tabodbc.h
  storage/connect/tabsys.h
  storage/connect/tabtbl.h
  storage/connect/tabutil.h
  storage/connect/tabvct.cpp
  storage/connect/tabvct.h
  storage/connect/tabwmi.h
  storage/connect/tabxml.h
  storage/connect/user_connect.cc
  storage/connect/user_connect.h
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xindex.cpp
  storage/connect/xindex.h
  storage/connect/xobject.cpp
  storage/connect/xobject.h
  storage/connect/xtable.h
parents d67ad26b e5729127
...@@ -51,7 +51,7 @@ class DllExport ARRAY : public XOBJECT, public CSORT { // Array descblock ...@@ -51,7 +51,7 @@ class DllExport ARRAY : public XOBJECT, public CSORT { // Array descblock
virtual int Qcompare(int *, int *); virtual int Qcompare(int *, int *);
virtual bool Compare(PXOB) {assert(FALSE); return FALSE;} virtual bool Compare(PXOB) {assert(FALSE); return FALSE;}
virtual bool SetFormat(PGLOBAL, FORMAT&) {assert(FALSE); return FALSE;} virtual bool SetFormat(PGLOBAL, FORMAT&) {assert(FALSE); return FALSE;}
virtual int CheckSpcCol(PTDB, int) {return 0;} //virtual int CheckSpcCol(PTDB, int) {return 0;}
virtual void Print(PGLOBAL g, FILE *f, UINT n); virtual void Print(PGLOBAL g, FILE *f, UINT n);
virtual void Print(PGLOBAL g, char *ps, UINT z); virtual void Print(PGLOBAL g, char *ps, UINT z);
void Empty(void); void Empty(void);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
/* Name: CONNECT.H Version 2.4 */ /* Name: CONNECT.H Version 2.4 */
/* This file contains the some based classes declares. */ /* This file contains the some based classes declares. */
/***********************************************************************/ /***********************************************************************/
//#include "xtable.h" // Base class declares
#include "filamtxt.h" #include "filamtxt.h"
#include "tabdos.h" #include "tabdos.h"
...@@ -52,8 +51,6 @@ PGLOBAL CntExit(PGLOBAL g); ...@@ -52,8 +51,6 @@ PGLOBAL CntExit(PGLOBAL g);
/* These classes purpose is chiefly to access protected items! */ /* These classes purpose is chiefly to access protected items! */
/***********************************************************************/ /***********************************************************************/
class DOXDEF: public DOSDEF { class DOXDEF: public DOSDEF {
//friend class TDBDOX;
//friend int MakeIndex(PGLOBAL, PTDB, PIXDEF);
friend int CntIndexInit(PGLOBAL, PTDB, int); friend int CntIndexInit(PGLOBAL, PTDB, int);
}; // end of class DOXDEF }; // end of class DOXDEF
...@@ -74,10 +71,7 @@ class TDBDOX: public TDBDOS { ...@@ -74,10 +71,7 @@ class TDBDOX: public TDBDOS {
class XKPDEF: public KPARTDEF { class XKPDEF: public KPARTDEF {
friend class TDBDOX; friend class TDBDOX;
friend class ha_connect; friend class ha_connect;
//friend int CntMakeIndex(PGLOBAL, const char *, PIXDEF);
friend int CntIndexInit(PGLOBAL, PTDB, int); friend int CntIndexInit(PGLOBAL, PTDB, int);
public: public:
XKPDEF(const char *name, int n) : KPARTDEF((PSZ)name, n) {} XKPDEF(const char *name, int n) : KPARTDEF((PSZ)name, n) {}
}; // end of class XKPDEF }; // end of class XKPDEF
//RCODE CheckRecord(PGLOBAL g, PTDB tdbp, char *oldbuf, char *newbuf);
...@@ -20,7 +20,6 @@ typedef struct _xblock { /* Loaded XML file block */ ...@@ -20,7 +20,6 @@ typedef struct _xblock { /* Loaded XML file block */
short Type; /* TYPE_FB_XML */ short Type; /* TYPE_FB_XML */
int Retcode; /* Return code from Load */ int Retcode; /* Return code from Load */
MSXML2::IXMLDOMDocumentPtr Docp;/* Document interface pointer */ MSXML2::IXMLDOMDocumentPtr Docp;/* Document interface pointer */
//IXMLDOMNodeListPtr Nlist;
} XBLOCK, *PXBLOCK; } XBLOCK, *PXBLOCK;
/******************************************************************/ /******************************************************************/
...@@ -123,9 +122,6 @@ class DOMATTR : public XMLATTRIBUTE { ...@@ -123,9 +122,6 @@ class DOMATTR : public XMLATTRIBUTE {
friend class DOMDOC; friend class DOMDOC;
friend class DOMNODE; friend class DOMNODE;
public: public:
// Properties
//virtual char *GetText(void);
// Methods // Methods
virtual bool SetText(PGLOBAL g, char *txtp, int len); virtual bool SetText(PGLOBAL g, char *txtp, int len);
......
This diff is collapsed.
This diff is collapsed.
...@@ -43,7 +43,6 @@ class DllExport DBFBASE { ...@@ -43,7 +43,6 @@ class DllExport DBFBASE {
int Nerr; /* Number of bad records */ int Nerr; /* Number of bad records */
int Maxerr; /* Maximum number of bad records */ int Maxerr; /* Maximum number of bad records */
int ReadMode; /* 1: ALL 2: DEL 0: NOT DEL */ int ReadMode; /* 1: ALL 2: DEL 0: NOT DEL */
//PSZ Defpath; /* Default data path */
}; // end of class DBFBASE }; // end of class DBFBASE
/****************************************************************************/ /****************************************************************************/
...@@ -63,22 +62,18 @@ class DllExport DBFFAM : public FIXFAM, public DBFBASE { ...@@ -63,22 +62,18 @@ class DllExport DBFFAM : public FIXFAM, public DBFBASE {
// Methods // Methods
virtual int GetNerr(void) {return Nerr;} virtual int GetNerr(void) {return Nerr;}
virtual int Cardinality(PGLOBAL g); virtual int Cardinality(PGLOBAL g);
//virtual int GetRowID(void); // Temporarily suppressed
virtual bool OpenTableFile(PGLOBAL g); virtual bool OpenTableFile(PGLOBAL g);
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual void ResetBuffer(PGLOBAL g); virtual void ResetBuffer(PGLOBAL g);
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
//virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void CloseTableFile(PGLOBAL g); virtual void CloseTableFile(PGLOBAL g);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
// Members
virtual bool CopyHeader(PGLOBAL g); virtual bool CopyHeader(PGLOBAL g);
//int Records; in TXTFAM // Members
//int Headlen; in TXTFAM
}; // end of class DBFFAM }; // end of class DBFFAM
/****************************************************************************/ /****************************************************************************/
...@@ -100,17 +95,13 @@ class DllExport DBMFAM : public MPXFAM, public DBFBASE { ...@@ -100,17 +95,13 @@ class DllExport DBMFAM : public MPXFAM, public DBFBASE {
// Methods // Methods
virtual int GetNerr(void) {return Nerr;} virtual int GetNerr(void) {return Nerr;}
virtual int Cardinality(PGLOBAL g); virtual int Cardinality(PGLOBAL g);
//virtual int GetRowID(void); // Temporarily suppressed
virtual bool AllocateBuffer(PGLOBAL g); virtual bool AllocateBuffer(PGLOBAL g);
virtual int ReadBuffer(PGLOBAL g); virtual int ReadBuffer(PGLOBAL g);
//virtual int WriteBuffer(PGLOBAL g);
virtual int DeleteRecords(PGLOBAL g, int irc); virtual int DeleteRecords(PGLOBAL g, int irc);
virtual void Rewind(void); virtual void Rewind(void);
protected: protected:
// Members // Members
//int Records; in TXTFAM
//int Headlen; in TXTFAM
}; // end of class DBFFAM }; // end of class DBFFAM
#endif // __FILAMDBF_H #endif // __FILAMDBF_H
...@@ -168,13 +168,10 @@ int FIXFAM::ReadBuffer(PGLOBAL g) ...@@ -168,13 +168,10 @@ int FIXFAM::ReadBuffer(PGLOBAL g)
CurNum = 0; CurNum = 0;
Tdbp->SetLine(To_Buf); Tdbp->SetLine(To_Buf);
#if defined(BLK_INDX)
next: next:
#endif // BLK_INDX
if (++CurBlk >= Block) if (++CurBlk >= Block)
return RC_EF; return RC_EF;
#if defined(BLK_INDX)
/*****************************************************************/ /*****************************************************************/
/* Before reading a new block, check whether block indexing */ /* Before reading a new block, check whether block indexing */
/* can be done, as well as for join as for local filtering. */ /* can be done, as well as for join as for local filtering. */
...@@ -185,7 +182,6 @@ int FIXFAM::ReadBuffer(PGLOBAL g) ...@@ -185,7 +182,6 @@ int FIXFAM::ReadBuffer(PGLOBAL g)
case RC_NF: case RC_NF:
goto next; goto next;
} // endswitch rc } // endswitch rc
#endif // BLK_INDX
} // endif's } // endif's
if (OldBlk == CurBlk) { if (OldBlk == CurBlk) {
...@@ -1043,13 +1039,10 @@ int BGXFAM::ReadBuffer(PGLOBAL g) ...@@ -1043,13 +1039,10 @@ int BGXFAM::ReadBuffer(PGLOBAL g)
CurNum = 0; CurNum = 0;
Tdbp->SetLine(To_Buf); Tdbp->SetLine(To_Buf);
#if defined(BLK_INDX)
next: next:
#endif // BLK_INDX
if (++CurBlk >= Block) if (++CurBlk >= Block)
return RC_EF; return RC_EF;
#if defined(BLK_INDX)
/*****************************************************************/ /*****************************************************************/
/* Before reading a new block, check whether block optimization */ /* Before reading a new block, check whether block optimization */
/* can be done, as well as for join as for local filtering. */ /* can be done, as well as for join as for local filtering. */
...@@ -1060,7 +1053,7 @@ int BGXFAM::ReadBuffer(PGLOBAL g) ...@@ -1060,7 +1053,7 @@ int BGXFAM::ReadBuffer(PGLOBAL g)
case RC_NF: case RC_NF:
goto next; goto next;
} // endswitch rc } // endswitch rc
#endif // BLK_INDX
} // endif's } // endif's
if (OldBlk == CurBlk) { if (OldBlk == CurBlk) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -68,7 +68,7 @@ PPARM MakeParm(PGLOBAL g, PXOB xp) ...@@ -68,7 +68,7 @@ PPARM MakeParm(PGLOBAL g, PXOB xp)
bool PlugEvalLike(PGLOBAL, LPCSTR, LPCSTR, bool); bool PlugEvalLike(PGLOBAL, LPCSTR, LPCSTR, bool);
//bool ReadSubQuery(PGLOBAL, PSUBQ); //bool ReadSubQuery(PGLOBAL, PSUBQ);
//PSUBQ OpenSubQuery(PGLOBAL, PSQL); //PSUBQ OpenSubQuery(PGLOBAL, PSQL);
void PlugCloseDB(PGLOBAL, PSQL); //void PlugCloseDB(PGLOBAL, PSQL);
BYTE OpBmp(PGLOBAL g, OPVAL opc); BYTE OpBmp(PGLOBAL g, OPVAL opc);
PARRAY MakeValueArray(PGLOBAL g, PPARM pp); PARRAY MakeValueArray(PGLOBAL g, PPARM pp);
...@@ -201,6 +201,7 @@ FILTER::FILTER(PFIL fil1) ...@@ -201,6 +201,7 @@ FILTER::FILTER(PFIL fil1)
Test[1] = fil1->Test[1]; Test[1] = fil1->Test[1];
} // end of FILTER copy constructor } // end of FILTER copy constructor
#if 0
/***********************************************************************/ /***********************************************************************/
/* Linearize: Does the linearization of the filter tree: */ /* Linearize: Does the linearization of the filter tree: */
/* Independent filters (not implied in OR/NOT) will be separated */ /* Independent filters (not implied in OR/NOT) will be separated */
...@@ -388,7 +389,6 @@ int FILTER::RefNum(PSQL sqlp) ...@@ -388,7 +389,6 @@ int FILTER::RefNum(PSQL sqlp)
return n; return n;
} // end of RefNum } // end of RefNum
#if 0
/***********************************************************************/ /***********************************************************************/
/* CheckSubQuery: see SUBQUERY::CheckSubQuery for comment. */ /* CheckSubQuery: see SUBQUERY::CheckSubQuery for comment. */
/***********************************************************************/ /***********************************************************************/
...@@ -747,7 +747,6 @@ bool FILTER::CheckHaving(PGLOBAL g, PSQL sqlp) ...@@ -747,7 +747,6 @@ bool FILTER::CheckHaving(PGLOBAL g, PSQL sqlp)
sqlp->SetOk(FALSE); sqlp->SetOk(FALSE);
return FALSE; return FALSE;
} // end of CheckHaving } // end of CheckHaving
#endif // 0
/***********************************************************************/ /***********************************************************************/
/* Used while building a table index. This function split the filter */ /* Used while building a table index. This function split the filter */
...@@ -924,6 +923,7 @@ int FILTER::CheckSpcCol(PTDB tdbp, int n) ...@@ -924,6 +923,7 @@ int FILTER::CheckSpcCol(PTDB tdbp, int n)
return max(n1, n2); return max(n1, n2);
} // end of CheckSpcCol } // end of CheckSpcCol
#endif // 0
/***********************************************************************/ /***********************************************************************/
/* Reset the filter arguments to non evaluated yet. */ /* Reset the filter arguments to non evaluated yet. */
......
...@@ -53,25 +53,25 @@ class DllExport FILTER : public XOBJECT { /* Filter description block */ ...@@ -53,25 +53,25 @@ class DllExport FILTER : public XOBJECT { /* Filter description block */
virtual bool Init(PGLOBAL); virtual bool Init(PGLOBAL);
virtual bool Eval(PGLOBAL); virtual bool Eval(PGLOBAL);
virtual bool SetFormat(PGLOBAL, FORMAT&) {return TRUE;} // NUY virtual bool SetFormat(PGLOBAL, FORMAT&) {return TRUE;} // NUY
virtual int CheckColumn(PGLOBAL g, PSQL sqlp, PXOB &xp, int &ag); //virtual int CheckColumn(PGLOBAL g, PSQL sqlp, PXOB &xp, int &ag);
virtual int RefNum(PSQL); //virtual int RefNum(PSQL);
virtual PXOB SetSelect(PGLOBAL, PSQL, bool) {return NULL;} // NUY //virtual PXOB SetSelect(PGLOBAL, PSQL, bool) {return NULL;} // NUY
//virtual PXOB CheckSubQuery(PGLOBAL, PSQL); //virtual PXOB CheckSubQuery(PGLOBAL, PSQL);
virtual bool CheckLocal(PTDB); //virtual bool CheckLocal(PTDB);
virtual int CheckSpcCol(PTDB tdbp, int n); //virtual int CheckSpcCol(PTDB tdbp, int n);
virtual void Print(PGLOBAL g, FILE *f, UINT n); virtual void Print(PGLOBAL g, FILE *f, UINT n);
virtual void Print(PGLOBAL g, char *ps, UINT z); virtual void Print(PGLOBAL g, char *ps, UINT z);
PFIL Linearize(bool nosep); // PFIL Linearize(bool nosep);
PFIL Link(PGLOBAL g, PFIL fil2); // PFIL Link(PGLOBAL g, PFIL fil2);
PFIL RemoveLastSep(void); // PFIL RemoveLastSep(void);
// PFIL SortJoin(PGLOBAL g); // PFIL SortJoin(PGLOBAL g);
// bool FindJoinFilter(POPJOIN opj, PFIL fprec, bool teq, // bool FindJoinFilter(POPJOIN opj, PFIL fprec, bool teq,
// bool tek, bool tk2, bool tc2, bool tix, bool thx); // bool tek, bool tk2, bool tc2, bool tix, bool thx);
// bool CheckHaving(PGLOBAL g, PSQL sqlp); // bool CheckHaving(PGLOBAL g, PSQL sqlp);
bool Convert(PGLOBAL g, bool having); bool Convert(PGLOBAL g, bool having);
int SplitFilter(PFIL *fp); // int SplitFilter(PFIL *fp);
int SplitFilter(PFIL *fp, PTDB tp, int n); // int SplitFilter(PFIL *fp, PTDB tp, int n);
PFIL LinkFilter(PGLOBAL g, PFIL fp2); // PFIL LinkFilter(PGLOBAL g, PFIL fp2);
// PFIL Copy(PTABS t); // PFIL Copy(PTABS t);
protected: protected:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -63,15 +63,10 @@ class DllItem MYSQLC { ...@@ -63,15 +63,10 @@ class DllItem MYSQLC {
bool Connected(void); bool Connected(void);
// Methods // Methods
// int GetCurPos(void) {return (m_Res) ? N : 0;}
// int GetProgCur(void) {return N;}
int GetResultSize(PGLOBAL g, PSZ sql); int GetResultSize(PGLOBAL g, PSZ sql);
int Open(PGLOBAL g, const char *host, const char *db, int Open(PGLOBAL g, const char *host, const char *db,
const char *user= "root", const char *pwd= "*", const char *user= "root", const char *pwd= "*",
int pt= 0); int pt= 0);
//ulong GetThreadID(void);
//ulong ServerVersion(void);
//const char *ServerInfo(void);
int KillQuery(ulong id); int KillQuery(ulong id);
int ExecSQL(PGLOBAL g, const char *query, int *w = NULL); int ExecSQL(PGLOBAL g, const char *query, int *w = NULL);
int ExecSQLcmd(PGLOBAL g, const char *query, int *w); int ExecSQLcmd(PGLOBAL g, const char *query, int *w);
...@@ -87,7 +82,6 @@ class DllItem MYSQLC { ...@@ -87,7 +82,6 @@ class DllItem MYSQLC {
void Rewind(void); void Rewind(void);
void FreeResult(void); void FreeResult(void);
void Close(void); void Close(void);
//void DiscardResults(void);
protected: protected:
MYSQL_FIELD *GetNextField(void); MYSQL_FIELD *GetNextField(void);
......
This diff is collapsed.
This diff is collapsed.
...@@ -374,18 +374,7 @@ PDBUSER PlgMakeUser(PGLOBAL g) ...@@ -374,18 +374,7 @@ PDBUSER PlgMakeUser(PGLOBAL g)
} // endif dbuserp } // endif dbuserp
memset(dbuserp, 0, sizeof(DBUSERBLK)); memset(dbuserp, 0, sizeof(DBUSERBLK));
//dbuserp->Act2 = g->Activityp;
//#if defined(UNIX)
// dbuserp->LineLen = 160;
//#else
// dbuserp->LineLen = 78;
//#endif
//dbuserp->Maxres = MAXRES;
//dbuserp->Maxlin = MAXLIN;
#if defined(BLK_INDX)
dbuserp->Maxbmp = MAXBMP; dbuserp->Maxbmp = MAXBMP;
#endif // BLK_INDX
//dbuserp->AlgChoice = AMOD_AUTO;
dbuserp->UseTemp = TMP_AUTO; dbuserp->UseTemp = TMP_AUTO;
dbuserp->Check = CHK_ALL; dbuserp->Check = CHK_ALL;
strcpy(dbuserp->Server, "CONNECT"); strcpy(dbuserp->Server, "CONNECT");
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -85,8 +85,6 @@ class DllExport COLUMN: public XOBJECT { // Column Name/Qualifier block. ...@@ -85,8 +85,6 @@ class DllExport COLUMN: public XOBJECT { // Column Name/Qualifier block.
virtual bool Compare(PXOB) {assert(false); return false;} virtual bool Compare(PXOB) {assert(false); return false;}
virtual bool SetFormat(PGLOBAL, FORMAT&); virtual bool SetFormat(PGLOBAL, FORMAT&);
virtual bool Eval(PGLOBAL) {assert(false); return true;} virtual bool Eval(PGLOBAL) {assert(false); return true;}
virtual int CheckSpcCol(PTDB, int) {assert(false); return 2;}
virtual bool CheckSort(PTDB) {assert(false); return false;}
private: private:
// Members // Members
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -68,7 +68,6 @@ class TDBOCCUR : public TDBPRX { ...@@ -68,7 +68,6 @@ class TDBOCCUR : public TDBPRX {
protected: protected:
// Members // Members
//PTDBASE Tdbp; // To the source table or view
LPCSTR Tabname; // Name of source table LPCSTR Tabname; // Name of source table
char *Colist; // Source column list char *Colist; // Source column list
char *Xcolumn; // Occurence column name char *Xcolumn; // Occurence column name
......
...@@ -158,7 +158,6 @@ class ODBCCOL : public COLBLK { ...@@ -158,7 +158,6 @@ class ODBCCOL : public COLBLK {
// PVBLK GetBlkp(void) {return Blkp;} // PVBLK GetBlkp(void) {return Blkp;}
// Methods // Methods
//virtual bool CheckLocal(PTDB tdbp);
virtual bool SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check); virtual bool SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check);
virtual void ReadColumn(PGLOBAL g); virtual void ReadColumn(PGLOBAL g);
virtual void WriteColumn(PGLOBAL g); virtual void WriteColumn(PGLOBAL g);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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