mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Get rid of GCC warnings about unused parameters
modified: storage/connect/array.cpp modified: storage/connect/blkfil.cpp modified: storage/connect/block.h modified: storage/connect/catalog.h modified: storage/connect/colblk.cpp modified: storage/connect/colblk.h modified: storage/connect/connect.cc modified: storage/connect/filamap.cpp modified: storage/connect/filamdbf.cpp modified: storage/connect/filamfix.cpp modified: storage/connect/filamtxt.cpp modified: storage/connect/filamtxt.h modified: storage/connect/filamvct.cpp modified: storage/connect/filamzip.cpp modified: storage/connect/filter.h modified: storage/connect/ha_connect.c modified: storage/connect/jsonudf.cpp modified: storage/connect/mycat.h modified: storage/connect/myconn.cpp modified: storage/connect/plgdbutl.cpp modified: storage/connect/reldef.cpp modified: storage/connect/reldef.h modified: storage/connect/tabcol.cpp modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabfmt.h modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/table.cpp modified: storage/connect/tabmul.cpp modified: storage/connect/tabmysql.cpp modified: storage/connect/tabmysql.h modified: storage/connect/taboccur.cpp modified: storage/connect/tabpivot.cpp modified: storage/connect/tabsys.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabtbl.h modified: storage/connect/tabutil.cpp modified: storage/connect/tabutil.h modified: storage/connect/tabvct.cpp modified: storage/connect/tabvir.cpp modified: storage/connect/tabvir.h modified: storage/connect/tabxcl.cpp modified: storage/connect/tabxcl.h modified: storage/connect/tabxml.cpp modified: storage/connect/tabxml.h modified: storage/connect/valblk.cpp modified: storage/connect/valblk.h modified: storage/connect/value.cpp modified: storage/connect/value.h modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h modified: storage/connect/xobject.h modified: storage/connect/xtable.h
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/************* Array C++ Functions Source Code File (.CPP) *************/
|
/************* Array C++ Functions Source Code File (.CPP) *************/
|
||||||
/* Name: ARRAY.CPP Version 2.3 */
|
/* Name: ARRAY.CPP Version 2.3 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the XOBJECT derived class ARRAY functions. */
|
/* This file contains the XOBJECT derived class ARRAY functions. */
|
||||||
/* ARRAY is used for elaborate type of processing, such as sorting */
|
/* ARRAY is used for elaborate type of processing, such as sorting */
|
||||||
@@ -186,7 +186,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec)
|
|||||||
// The error message was built by PlgDBalloc
|
// The error message was built by PlgDBalloc
|
||||||
Type = TYPE_ERROR;
|
Type = TYPE_ERROR;
|
||||||
else if (type != TYPE_PCHAR)
|
else if (type != TYPE_PCHAR)
|
||||||
Value = AllocateValue(g, type, Len, prec, NULL);
|
Value = AllocateValue(g, type, Len, prec);
|
||||||
|
|
||||||
Constant = TRUE;
|
Constant = TRUE;
|
||||||
} // end of ARRAY constructor
|
} // end of ARRAY constructor
|
||||||
@@ -610,7 +610,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
|
|||||||
// The error message was built by PlgDBalloc
|
// The error message was built by PlgDBalloc
|
||||||
return TYPE_ERROR;
|
return TYPE_ERROR;
|
||||||
else
|
else
|
||||||
Value = AllocateValue(g, Type, Len, prec, NULL);
|
Value = AllocateValue(g, Type, Len, prec);
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Converting STRING to DATE can be done according to date format. */
|
/* Converting STRING to DATE can be done according to date format. */
|
||||||
@@ -848,7 +848,7 @@ void *ARRAY::GetSortIndex(PGLOBAL g)
|
|||||||
/* the indication of whether the Find will be always true, always not */
|
/* the indication of whether the Find will be always true, always not */
|
||||||
/* true or other. */
|
/* true or other. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int ARRAY::BlockTest(PGLOBAL g, int opc, int opm,
|
int ARRAY::BlockTest(PGLOBAL, int opc, int opm,
|
||||||
void *minp, void *maxp, bool s)
|
void *minp, void *maxp, bool s)
|
||||||
{
|
{
|
||||||
bool bin, bax, pin, pax, veq, all = (opm == 2);
|
bool bin, bax, pin, pax, veq, all = (opm == 2);
|
||||||
@@ -1038,7 +1038,7 @@ void ARRAY::Print(PGLOBAL g, FILE *f, uint n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make string output of ARRAY contents. */
|
/* Make string output of ARRAY contents. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void ARRAY::Print(PGLOBAL g, char *ps, uint z)
|
void ARRAY::Print(PGLOBAL, char *ps, uint z)
|
||||||
{
|
{
|
||||||
if (z < 16)
|
if (z < 16)
|
||||||
return;
|
return;
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -56,7 +56,7 @@ BLOCKFILTER::BLOCKFILTER(PTDBDOS tdbp, int op)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make file output of BLOCKFILTER contents. */
|
/* Make file output of BLOCKFILTER contents. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void BLOCKFILTER::Print(PGLOBAL g, FILE *f, uint n)
|
void BLOCKFILTER::Print(PGLOBAL, FILE *f, uint n)
|
||||||
{
|
{
|
||||||
char m[64];
|
char m[64];
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ void BLOCKFILTER::Print(PGLOBAL g, FILE *f, uint n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make string output of BLOCKFILTER contents. */
|
/* Make string output of BLOCKFILTER contents. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void BLOCKFILTER::Print(PGLOBAL g, char *ps, uint z)
|
void BLOCKFILTER::Print(PGLOBAL, char *ps, uint z)
|
||||||
{
|
{
|
||||||
strncat(ps, "BlockFilter(s)", z);
|
strncat(ps, "BlockFilter(s)", z);
|
||||||
} // end of Print
|
} // end of Print
|
||||||
@@ -186,7 +186,7 @@ void BLKFILARI::Reset(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Evaluate block filter for arithmetic operators. */
|
/* Evaluate block filter for arithmetic operators. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BLKFILARI::BlockEval(PGLOBAL g)
|
int BLKFILARI::BlockEval(PGLOBAL)
|
||||||
{
|
{
|
||||||
int mincmp, maxcmp, n;
|
int mincmp, maxcmp, n;
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ void BLKFILAR2::MakeValueBitmap(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Evaluate XDB2 block filter for arithmetic operators. */
|
/* Evaluate XDB2 block filter for arithmetic operators. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BLKFILAR2::BlockEval(PGLOBAL g)
|
int BLKFILAR2::BlockEval(PGLOBAL)
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
assert (Colp->IsClustered());
|
assert (Colp->IsClustered());
|
||||||
@@ -428,7 +428,7 @@ void BLKFILMR2::MakeValueBitmap(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Evaluate XDB2 block filter for arithmetic operators. */
|
/* Evaluate XDB2 block filter for arithmetic operators. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BLKFILMR2::BlockEval(PGLOBAL g)
|
int BLKFILMR2::BlockEval(PGLOBAL)
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
assert (Colp->IsClustered());
|
assert (Colp->IsClustered());
|
||||||
@@ -514,7 +514,7 @@ void BLKSPCARI::Reset(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Evaluate block filter for arithmetic operators (ROWID) */
|
/* Evaluate block filter for arithmetic operators (ROWID) */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BLKSPCARI::BlockEval(PGLOBAL g)
|
int BLKSPCARI::BlockEval(PGLOBAL)
|
||||||
{
|
{
|
||||||
int mincmp, maxcmp, n, m;
|
int mincmp, maxcmp, n, m;
|
||||||
|
|
||||||
@@ -605,7 +605,7 @@ BLKFILIN::BLKFILIN(PGLOBAL g, PTDBDOS tdbp, int op, int opm, PXOB *xp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Reset: have the sorted array reset its Bot value to -1 (bottom). */
|
/* Reset: have the sorted array reset its Bot value to -1 (bottom). */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void BLKFILIN::Reset(PGLOBAL g)
|
void BLKFILIN::Reset(PGLOBAL)
|
||||||
{
|
{
|
||||||
Arap->Reset();
|
Arap->Reset();
|
||||||
// MakeValueBitmap(); // Does nothing for class BLKFILIN
|
// MakeValueBitmap(); // Does nothing for class BLKFILIN
|
||||||
@@ -736,7 +736,7 @@ void BLKFILIN2::MakeValueBitmap(void)
|
|||||||
/* ended string in case of string argument. This is because the ARRAY */
|
/* ended string in case of string argument. This is because the ARRAY */
|
||||||
/* can have a different width than the char column. */
|
/* can have a different width than the char column. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BLKFILIN2::BlockEval(PGLOBAL g)
|
int BLKFILIN2::BlockEval(PGLOBAL)
|
||||||
{
|
{
|
||||||
if (N < 0)
|
if (N < 0)
|
||||||
return Result; // Was set in MakeValueBitmap
|
return Result; // Was set in MakeValueBitmap
|
||||||
@@ -909,7 +909,7 @@ int BLKFILIN2::BlockEval(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* BLKSPCIN constructor. */
|
/* BLKSPCIN constructor. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
BLKSPCIN::BLKSPCIN(PGLOBAL g, PTDBDOS tdbp, int op, int opm,
|
BLKSPCIN::BLKSPCIN(PGLOBAL, PTDBDOS tdbp, int op, int opm,
|
||||||
PXOB *xp, int bsize)
|
PXOB *xp, int bsize)
|
||||||
: BLOCKFILTER(tdbp, op)
|
: BLOCKFILTER(tdbp, op)
|
||||||
{
|
{
|
||||||
@@ -930,7 +930,7 @@ BLKSPCIN::BLKSPCIN(PGLOBAL g, PTDBDOS tdbp, int op, int opm,
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Reset: have the sorted array reset its Bot value to -1 (bottom). */
|
/* Reset: have the sorted array reset its Bot value to -1 (bottom). */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void BLKSPCIN::Reset(PGLOBAL g)
|
void BLKSPCIN::Reset(PGLOBAL)
|
||||||
{
|
{
|
||||||
Arap->Reset();
|
Arap->Reset();
|
||||||
} // end of Reset
|
} // end of Reset
|
||||||
|
@@ -50,7 +50,7 @@ class DllExport BLOCK {
|
|||||||
#if !defined(__BORLANDC__)
|
#if !defined(__BORLANDC__)
|
||||||
// Avoid warning C4291 by defining a matching dummy delete operator
|
// Avoid warning C4291 by defining a matching dummy delete operator
|
||||||
void operator delete(void *, PGLOBAL, void *) {}
|
void operator delete(void *, PGLOBAL, void *) {}
|
||||||
void operator delete(void *ptr,size_t size) {}
|
void operator delete(void *, size_t) {}
|
||||||
#endif
|
#endif
|
||||||
virtual ~BLOCK() {}
|
virtual ~BLOCK() {}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*************** Catalog H Declares Source Code File (.H) **************/
|
/*************** Catalog H Declares Source Code File (.H) **************/
|
||||||
/* Name: CATALOG.H Version 3.3 */
|
/* Name: CATALOG.H Version 3.3 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2000-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2000-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the CATALOG PlugDB classes definitions. */
|
/* This file contains the CATALOG PlugDB classes definitions. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -73,33 +73,29 @@ class DllExport CATALOG {
|
|||||||
// Methods
|
// Methods
|
||||||
virtual void Reset(void) {}
|
virtual void Reset(void) {}
|
||||||
//virtual void SetDataPath(PGLOBAL g, const char *path) {}
|
//virtual void SetDataPath(PGLOBAL g, const char *path) {}
|
||||||
virtual bool CheckName(PGLOBAL g, char *name) {return true;}
|
virtual bool CheckName(PGLOBAL, char*) {return true;}
|
||||||
virtual bool ClearName(PGLOBAL g, PSZ name) {return true;}
|
virtual bool ClearName(PGLOBAL, PSZ) {return true;}
|
||||||
virtual PRELDEF MakeOneTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am) {return NULL;}
|
virtual PRELDEF MakeOneTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;}
|
||||||
virtual PRELDEF GetTableDescEx(PGLOBAL g, PTABLE tablep) {return NULL;}
|
virtual PRELDEF GetTableDescEx(PGLOBAL, PTABLE) {return NULL;}
|
||||||
virtual PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name, LPCSTR type,
|
virtual PRELDEF GetTableDesc(PGLOBAL, LPCSTR, LPCSTR,
|
||||||
PRELDEF *prp = NULL) {return NULL;}
|
PRELDEF* = NULL) {return NULL;}
|
||||||
virtual PRELDEF GetFirstTable(PGLOBAL g) {return NULL;}
|
virtual PRELDEF GetFirstTable(PGLOBAL) {return NULL;}
|
||||||
virtual PRELDEF GetNextTable(PGLOBAL g) {return NULL;}
|
virtual PRELDEF GetNextTable(PGLOBAL) {return NULL;}
|
||||||
virtual bool TestCond(PGLOBAL g, const char *name, const char *type)
|
virtual bool TestCond(PGLOBAL, const char*, const char*) {return true;}
|
||||||
{return true;}
|
virtual bool DropTable(PGLOBAL, PSZ, bool) {return true;}
|
||||||
virtual bool DropTable(PGLOBAL g, PSZ name, bool erase) {return true;}
|
virtual PTDB GetTable(PGLOBAL, PTABLE,
|
||||||
virtual PTDB GetTable(PGLOBAL g, PTABLE tablep,
|
MODE = MODE_READ, LPCSTR = NULL) {return NULL;}
|
||||||
MODE mode = MODE_READ, LPCSTR type = NULL)
|
virtual void TableNames(PGLOBAL, char*, int, int[]) {}
|
||||||
{return NULL;}
|
virtual void ColumnNames(PGLOBAL, char*, char*, int, int[]) {}
|
||||||
virtual void TableNames(PGLOBAL g, char *buffer, int maxbuf, int info[]) {}
|
virtual void ColumnDefs(PGLOBAL, char*, char*, int, int[]) {}
|
||||||
virtual void ColumnNames(PGLOBAL g, char *tabname, char *buffer,
|
virtual void *DecodeValues(PGLOBAL, char*, char*, char*,
|
||||||
int maxbuf, int info[]) {}
|
int, int[]) {return NULL;}
|
||||||
virtual void ColumnDefs(PGLOBAL g, char *tabname, char *buffer,
|
virtual int ColumnType(PGLOBAL, char*, char*) {return 0;}
|
||||||
int maxbuf, int info[]) {}
|
virtual void ClearDB(PGLOBAL) {}
|
||||||
virtual void *DecodeValues(PGLOBAL g, char *tabname, char *colname,
|
|
||||||
char *buffer, int maxbuf, int info[]) {return NULL;}
|
|
||||||
virtual int ColumnType(PGLOBAL g, char *tabname, char *colname) {return 0;}
|
|
||||||
virtual void ClearDB(PGLOBAL g) {}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool ClearSection(PGLOBAL g, const char *key, const char *section) {return true;}
|
virtual bool ClearSection(PGLOBAL, const char*, const char*) {return true;}
|
||||||
virtual PRELDEF MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am) {return NULL;}
|
virtual PRELDEF MakeTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;}
|
||||||
|
|
||||||
// Members
|
// Members
|
||||||
char *Cbuf; /* Buffer used for col section */
|
char *Cbuf; /* Buffer used for col section */
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/************* Colblk C++ Functions Source Code File (.CPP) ************/
|
/************* Colblk C++ Functions Source Code File (.CPP) ************/
|
||||||
/* Name: COLBLK.CPP Version 2.1 */
|
/* Name: COLBLK.CPP Version 2.1 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the COLBLK class functions. */
|
/* This file contains the COLBLK class functions. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -111,7 +111,7 @@ bool COLBLK::Compare(PXOB xp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* SetFormat: function used to set SELECT output format. */
|
/* SetFormat: function used to set SELECT output format. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool COLBLK::SetFormat(PGLOBAL g, FORMAT& fmt)
|
bool COLBLK::SetFormat(PGLOBAL, FORMAT& fmt)
|
||||||
{
|
{
|
||||||
fmt = Format;
|
fmt = Format;
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ bool COLBLK::InitValue(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* SetBuffer: prepare a column block for write operation. */
|
/* SetBuffer: prepare a column block for write operation. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool COLBLK::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check)
|
bool COLBLK::SetBuffer(PGLOBAL g, PVAL, bool, bool)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(UNDEFINED_AM), "SetBuffer");
|
sprintf(g->Message, MSG(UNDEFINED_AM), "SetBuffer");
|
||||||
return true;
|
return true;
|
||||||
@@ -214,7 +214,7 @@ void COLBLK::WriteColumn(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make file output of a column descriptor block. */
|
/* Make file output of a column descriptor block. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void COLBLK::Print(PGLOBAL g, FILE *f, uint n)
|
void COLBLK::Print(PGLOBAL, FILE *f, uint n)
|
||||||
{
|
{
|
||||||
char m[64];
|
char m[64];
|
||||||
int i;
|
int i;
|
||||||
@@ -237,7 +237,7 @@ void COLBLK::Print(PGLOBAL g, FILE *f, uint n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make string output of a column descriptor block. */
|
/* Make string output of a column descriptor block. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void COLBLK::Print(PGLOBAL g, char *ps, uint z)
|
void COLBLK::Print(PGLOBAL, char *ps, uint)
|
||||||
{
|
{
|
||||||
sprintf(ps, "R%d.%s", To_Tdb->GetTdb_No(), Name);
|
sprintf(ps, "R%d.%s", To_Tdb->GetTdb_No(), Name);
|
||||||
} // end of Print
|
} // end of Print
|
||||||
@@ -347,7 +347,7 @@ TIDBLK::TIDBLK(PCOLUMN cp) : SPCBLK(cp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ReadColumn: what this routine does is to return the table ID. */
|
/* ReadColumn: what this routine does is to return the table ID. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void TIDBLK::ReadColumn(PGLOBAL g)
|
void TIDBLK::ReadColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
if (Tname == NULL) {
|
if (Tname == NULL) {
|
||||||
Tname = (char*)To_Tdb->GetName();
|
Tname = (char*)To_Tdb->GetName();
|
||||||
@@ -406,7 +406,7 @@ SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ReadColumn: what this routine does is to return the server ID. */
|
/* ReadColumn: what this routine does is to return the server ID. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void SIDBLK::ReadColumn(PGLOBAL g)
|
void SIDBLK::ReadColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
//if (Sname == NULL) {
|
//if (Sname == NULL) {
|
||||||
Sname = (char*)To_Tdb->GetServer();
|
Sname = (char*)To_Tdb->GetServer();
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*************** Colblk H Declares Source Code File (.H) ***************/
|
/*************** Colblk H Declares Source Code File (.H) ***************/
|
||||||
/* Name: COLBLK.H Version 1.7 */
|
/* Name: COLBLK.H Version 1.7 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the COLBLK and derived classes declares. */
|
/* This file contains the COLBLK and derived classes declares. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -23,7 +23,7 @@ class DllExport COLBLK : public XOBJECT {
|
|||||||
// Default constructors used by derived classes
|
// Default constructors used by derived classes
|
||||||
COLBLK(PCOLDEF cdp = NULL, PTDB tdbp = NULL, int i = 0);
|
COLBLK(PCOLDEF cdp = NULL, PTDB tdbp = NULL, int i = 0);
|
||||||
COLBLK(PCOL colp, PTDB tdbp = NULL); // Used in copy process
|
COLBLK(PCOL colp, PTDB tdbp = NULL); // Used in copy process
|
||||||
COLBLK(int n) {} // Used when changing a column class in TDBXML
|
COLBLK(int) {} // Used when changing a column class in TDBXML
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Implementation
|
// Implementation
|
||||||
@@ -69,7 +69,7 @@ class DllExport COLBLK : public XOBJECT {
|
|||||||
virtual bool IsSpecial(void) {return false;}
|
virtual bool IsSpecial(void) {return false;}
|
||||||
virtual bool Eval(PGLOBAL g);
|
virtual bool Eval(PGLOBAL g);
|
||||||
virtual bool SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check);
|
virtual bool SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check);
|
||||||
virtual void SetTo_Val(PVAL valp) {}
|
virtual void SetTo_Val(PVAL) {}
|
||||||
virtual void ReadColumn(PGLOBAL g);
|
virtual void ReadColumn(PGLOBAL g);
|
||||||
virtual void WriteColumn(PGLOBAL g);
|
virtual void WriteColumn(PGLOBAL g);
|
||||||
virtual void Print(PGLOBAL g, FILE *, uint);
|
virtual void Print(PGLOBAL g, FILE *, uint);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) Olivier Bertrand 2004 - 2012
|
/* Copyright (C) Olivier Bertrand 2004 - 2015
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -237,7 +237,7 @@ PTDB CntGetTDB(PGLOBAL g, LPCSTR name, MODE mode, PHC h)
|
|||||||
/* OPENTAB: Open a Table. */
|
/* OPENTAB: Open a Table. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
|
bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
|
||||||
bool del, PHC h)
|
bool del, PHC)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
int i, n, rc;
|
int i, n, rc;
|
||||||
|
@@ -276,7 +276,7 @@ bool MAPFAM::SetPos(PGLOBAL g, int pos)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Record file position in case of UPDATE or DELETE. */
|
/* Record file position in case of UPDATE or DELETE. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool MAPFAM::RecordPos(PGLOBAL g)
|
bool MAPFAM::RecordPos(PGLOBAL)
|
||||||
{
|
{
|
||||||
Fpos = Mempos;
|
Fpos = Mempos;
|
||||||
return false;
|
return false;
|
||||||
@@ -285,7 +285,7 @@ bool MAPFAM::RecordPos(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Initialize Fpos and Mempos for indexed DELETE. */
|
/* Initialize Fpos and Mempos for indexed DELETE. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int MAPFAM::InitDelete(PGLOBAL g, int fpos, int spos)
|
int MAPFAM::InitDelete(PGLOBAL, int fpos, int spos)
|
||||||
{
|
{
|
||||||
Fpos = Memory + (ptrdiff_t)fpos;
|
Fpos = Memory + (ptrdiff_t)fpos;
|
||||||
Mempos = Memory + (ptrdiff_t)spos;
|
Mempos = Memory + (ptrdiff_t)spos;
|
||||||
@@ -371,7 +371,7 @@ int MAPFAM::ReadBuffer(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* WriteBuffer: File write routine for MAP access method. */
|
/* WriteBuffer: File write routine for MAP access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int MAPFAM::WriteBuffer(PGLOBAL g)
|
int MAPFAM::WriteBuffer(PGLOBAL g __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
// Insert mode is no more handled using file mapping
|
// Insert mode is no more handled using file mapping
|
||||||
@@ -495,7 +495,7 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Table file close routine for MAP access method. */
|
/* Table file close routine for MAP access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void MAPFAM::CloseTableFile(PGLOBAL g, bool abort)
|
void MAPFAM::CloseTableFile(PGLOBAL g, bool)
|
||||||
{
|
{
|
||||||
PlugCloseFile(g, To_Fb);
|
PlugCloseFile(g, To_Fb);
|
||||||
To_Fb = NULL; // To get correct file size in Cardinality
|
To_Fb = NULL; // To get correct file size in Cardinality
|
||||||
@@ -551,7 +551,7 @@ int MBKFAM::Cardinality(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Skip one record in file. */
|
/* Skip one record in file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int MBKFAM::SkipRecord(PGLOBAL g, bool header)
|
int MBKFAM::SkipRecord(PGLOBAL, bool)
|
||||||
{
|
{
|
||||||
return RC_OK;
|
return RC_OK;
|
||||||
} // end of SkipRecord
|
} // end of SkipRecord
|
||||||
@@ -685,7 +685,7 @@ bool MPXFAM::SetPos(PGLOBAL g, int pos)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Initialize CurBlk, CurNum, Mempos and Fpos for indexed DELETE. */
|
/* Initialize CurBlk, CurNum, Mempos and Fpos for indexed DELETE. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int MPXFAM::InitDelete(PGLOBAL g, int fpos, int spos)
|
int MPXFAM::InitDelete(PGLOBAL, int fpos, int)
|
||||||
{
|
{
|
||||||
Fpos = Memory + Headlen + (ptrdiff_t)fpos * Lrecl;
|
Fpos = Memory + Headlen + (ptrdiff_t)fpos * Lrecl;
|
||||||
Mempos = Fpos + Lrecl;
|
Mempos = Fpos + Lrecl;
|
||||||
@@ -740,7 +740,7 @@ int MPXFAM::ReadBuffer(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* WriteBuffer: File write routine for MAP access method. */
|
/* WriteBuffer: File write routine for MAP access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int MPXFAM::WriteBuffer(PGLOBAL g)
|
int MPXFAM::WriteBuffer(PGLOBAL g __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
// Insert mode is no more handled using file mapping
|
// Insert mode is no more handled using file mapping
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
/*********** File AM Dbf C++ Program Source Code File (.CPP) ****************/
|
/*********** File AM Dbf C++ Program Source Code File (.CPP) ****************/
|
||||||
/* PROGRAM NAME: FILAMDBF */
|
/* PROGRAM NAME: FILAMDBF */
|
||||||
/* ------------- */
|
/* ------------- */
|
||||||
/* Version 1.7 */
|
/* Version 1.8 */
|
||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -115,6 +115,7 @@ typedef struct _descriptor {
|
|||||||
/* Side effects: */
|
/* Side effects: */
|
||||||
/* Moves file pointer to byte 32; fills buffer at buf with */
|
/* Moves file pointer to byte 32; fills buffer at buf with */
|
||||||
/* first 32 bytes of file. */
|
/* first 32 bytes of file. */
|
||||||
|
/* Converts numeric values to platform byte ordering (LE in file) */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
static int dbfhead(PGLOBAL g, FILE *file, PSZ fn, DBFHEADER *buf)
|
static int dbfhead(PGLOBAL g, FILE *file, PSZ fn, DBFHEADER *buf)
|
||||||
{
|
{
|
||||||
@@ -142,6 +143,11 @@ static int dbfhead(PGLOBAL g, FILE *file, PSZ fn, DBFHEADER *buf)
|
|||||||
} else
|
} else
|
||||||
strcpy(g->Message, MSG(DBASE_FILE));
|
strcpy(g->Message, MSG(DBASE_FILE));
|
||||||
|
|
||||||
|
// Convert numeric fields to have them in platform byte ordering
|
||||||
|
buf->Records = uint4korr(&buf->Records);
|
||||||
|
buf->Headlen = uint2korr(&buf->Headlen);
|
||||||
|
buf->Reclen = uint2korr(&buf->Reclen);
|
||||||
|
|
||||||
// Check last byte(s) of header
|
// Check last byte(s) of header
|
||||||
if (fseek(file, buf->Headlen - dbc, SEEK_SET) != 0) {
|
if (fseek(file, buf->Headlen - dbc, SEEK_SET) != 0) {
|
||||||
sprintf(g->Message, MSG(BAD_HEADER), fn);
|
sprintf(g->Message, MSG(BAD_HEADER), fn);
|
||||||
@@ -565,8 +571,8 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
|
|||||||
header->Filedate[0] = datm->tm_year - 100;
|
header->Filedate[0] = datm->tm_year - 100;
|
||||||
header->Filedate[1] = datm->tm_mon + 1;
|
header->Filedate[1] = datm->tm_mon + 1;
|
||||||
header->Filedate[2] = datm->tm_mday;
|
header->Filedate[2] = datm->tm_mday;
|
||||||
header->Headlen = (ushort)hlen;
|
int2store(&header->Headlen, hlen);
|
||||||
header->Reclen = (ushort)reclen;
|
int2store(&header->Reclen, reclen);
|
||||||
descp = (DESCRIPTOR*)header;
|
descp = (DESCRIPTOR*)header;
|
||||||
|
|
||||||
// Currently only standard Xbase types are supported
|
// Currently only standard Xbase types are supported
|
||||||
@@ -729,7 +735,7 @@ bool DBFFAM::CopyHeader(PGLOBAL g)
|
|||||||
if (Headlen) {
|
if (Headlen) {
|
||||||
void *hdr = PlugSubAlloc(g, NULL, Headlen);
|
void *hdr = PlugSubAlloc(g, NULL, Headlen);
|
||||||
size_t n, hlen = (size_t)Headlen;
|
size_t n, hlen = (size_t)Headlen;
|
||||||
int pos = ftell(Stream);
|
int pos = ftell(Stream);
|
||||||
|
|
||||||
if (fseek(Stream, 0, SEEK_SET))
|
if (fseek(Stream, 0, SEEK_SET))
|
||||||
strcpy(g->Message, "Seek error in CopyHeader");
|
strcpy(g->Message, "Seek error in CopyHeader");
|
||||||
@@ -863,13 +869,14 @@ void DBFFAM::CloseTableFile(PGLOBAL g, bool abort)
|
|||||||
|
|
||||||
if (n > Records) {
|
if (n > Records) {
|
||||||
// Update the number of rows in the file header
|
// Update the number of rows in the file header
|
||||||
char filename[_MAX_PATH];
|
char filename[_MAX_PATH], nRecords[4];
|
||||||
|
|
||||||
|
int4store(&nRecords, n);
|
||||||
PlugSetPath(filename, To_File, Tdbp->GetPath());
|
PlugSetPath(filename, To_File, Tdbp->GetPath());
|
||||||
if ((Stream= global_fopen(g, MSGID_OPEN_MODE_STRERROR, filename, "r+b")))
|
if ((Stream= global_fopen(g, MSGID_OPEN_MODE_STRERROR, filename, "r+b")))
|
||||||
{
|
{
|
||||||
fseek(Stream, 4, SEEK_SET); // Get header.Records position
|
fseek(Stream, 4, SEEK_SET); // Get header.Records position
|
||||||
fwrite(&n, sizeof(int), 1, Stream);
|
fwrite(nRecords, sizeof(nRecords), 1, Stream);
|
||||||
fclose(Stream);
|
fclose(Stream);
|
||||||
Stream= NULL;
|
Stream= NULL;
|
||||||
Records= n; // Update Records value
|
Records= n; // Update Records value
|
||||||
@@ -944,13 +951,13 @@ bool DBMFAM::AllocateBuffer(PGLOBAL g)
|
|||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
DBFHEADER *hp = (DBFHEADER*)Memory;
|
DBFHEADER *hp = (DBFHEADER*)Memory;
|
||||||
|
|
||||||
if (Lrecl != (int)hp->Reclen) {
|
if (Lrecl != (int)uint2korr(&hp->Reclen)) {
|
||||||
sprintf(g->Message, MSG(BAD_LRECL), Lrecl, hp->Reclen);
|
sprintf(g->Message, MSG(BAD_LRECL), Lrecl, uint2korr(&hp->Reclen));
|
||||||
return true;
|
return true;
|
||||||
} // endif Lrecl
|
} // endif Lrecl
|
||||||
|
|
||||||
Records = (int)hp->Records;
|
Records = (int)uint4korr(&hp->Records);
|
||||||
Headlen = (int)hp->Headlen;
|
Headlen = (int)uint2korr(&hp->Headlen);
|
||||||
} // endif Headlen
|
} // endif Headlen
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
@@ -1004,7 +1011,7 @@ int DBMFAM::ReadBuffer(PGLOBAL g)
|
|||||||
/* Data Base delete line routine for DBF access methods. */
|
/* Data Base delete line routine for DBF access methods. */
|
||||||
/* Deleted lines are just flagged in the first buffer character. */
|
/* Deleted lines are just flagged in the first buffer character. */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
int DBMFAM::DeleteRecords(PGLOBAL g, int irc)
|
int DBMFAM::DeleteRecords(PGLOBAL, int irc)
|
||||||
{
|
{
|
||||||
if (irc == RC_OK)
|
if (irc == RC_OK)
|
||||||
*Fpos = '*';
|
*Fpos = '*';
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -102,7 +102,7 @@ bool FIXFAM::SetPos(PGLOBAL g, int pos)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Initialize CurBlk and CurNum for indexed DELETE. */
|
/* Initialize CurBlk and CurNum for indexed DELETE. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int FIXFAM::InitDelete(PGLOBAL g, int fpos, int spos)
|
int FIXFAM::InitDelete(PGLOBAL, int fpos, int)
|
||||||
{
|
{
|
||||||
CurBlk = fpos / Nrec;
|
CurBlk = fpos / Nrec;
|
||||||
CurNum = fpos % Nrec;
|
CurNum = fpos % Nrec;
|
||||||
@@ -690,7 +690,8 @@ bool BGXFAM::BigSeek(PGLOBAL g, HANDLE h, BIGINT pos, int org)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Read from a big file. */
|
/* Read from a big file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BGXFAM::BigRead(PGLOBAL g, HANDLE h, void *inbuf, int req)
|
int BGXFAM::BigRead(PGLOBAL g __attribute__((unused)),
|
||||||
|
HANDLE h, void *inbuf, int req)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@@ -436,7 +436,7 @@ err:
|
|||||||
/* The purpose of this function is to deal with access methods that */
|
/* The purpose of this function is to deal with access methods that */
|
||||||
/* are not coherent regarding the use of SetPos and GetPos. */
|
/* are not coherent regarding the use of SetPos and GetPos. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TXTFAM::InitDelete(PGLOBAL g, int fpos, int spos)
|
int TXTFAM::InitDelete(PGLOBAL g, int, int)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, "InitDelete should not be used by this table type");
|
strcpy(g->Message, "InitDelete should not be used by this table type");
|
||||||
return RC_FX;
|
return RC_FX;
|
||||||
@@ -519,7 +519,7 @@ int DOSFAM::Cardinality(PGLOBAL g)
|
|||||||
/* Use BlockTest to reduce the table estimated size. */
|
/* Use BlockTest to reduce the table estimated size. */
|
||||||
/* Note: This function is not really implemented yet. */
|
/* Note: This function is not really implemented yet. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int DOSFAM::MaxBlkSize(PGLOBAL g, int s)
|
int DOSFAM::MaxBlkSize(PGLOBAL, int s)
|
||||||
{
|
{
|
||||||
return s;
|
return s;
|
||||||
} // end of MaxBlkSize
|
} // end of MaxBlkSize
|
||||||
@@ -1272,7 +1272,7 @@ int BLKFAM::Cardinality(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Use BlockTest to reduce the table estimated size. */
|
/* Use BlockTest to reduce the table estimated size. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BLKFAM::MaxBlkSize(PGLOBAL g, int s)
|
int BLKFAM::MaxBlkSize(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
int rc = RC_OK, savcur = CurBlk;
|
int rc = RC_OK, savcur = CurBlk;
|
||||||
int size;
|
int size;
|
||||||
@@ -1343,7 +1343,7 @@ int BLKFAM::GetNextPos(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* SetPos: Replace the table at the specified position. */
|
/* SetPos: Replace the table at the specified position. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool BLKFAM::SetPos(PGLOBAL g, int pos)
|
bool BLKFAM::SetPos(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, "Blocked variable tables cannot be used indexed");
|
strcpy(g->Message, "Blocked variable tables cannot be used indexed");
|
||||||
return true;
|
return true;
|
||||||
@@ -1353,7 +1353,7 @@ bool BLKFAM::SetPos(PGLOBAL g, int pos)
|
|||||||
/* Record file position in case of UPDATE or DELETE. */
|
/* Record file position in case of UPDATE or DELETE. */
|
||||||
/* Not used yet for blocked tables. */
|
/* Not used yet for blocked tables. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool BLKFAM::RecordPos(PGLOBAL g)
|
bool BLKFAM::RecordPos(PGLOBAL)
|
||||||
{
|
{
|
||||||
Fpos = (CurNum + Nrec * CurBlk); // Computed file index
|
Fpos = (CurNum + Nrec * CurBlk); // Computed file index
|
||||||
return false;
|
return false;
|
||||||
@@ -1362,7 +1362,7 @@ bool BLKFAM::RecordPos(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Skip one record in file. */
|
/* Skip one record in file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int BLKFAM::SkipRecord(PGLOBAL g, bool header)
|
int BLKFAM::SkipRecord(PGLOBAL, bool header)
|
||||||
{
|
{
|
||||||
if (header) {
|
if (header) {
|
||||||
// For Delete
|
// For Delete
|
||||||
|
@@ -57,8 +57,8 @@ class DllExport TXTFAM : public BLOCK {
|
|||||||
virtual int GetFileLength(PGLOBAL g);
|
virtual int GetFileLength(PGLOBAL g);
|
||||||
virtual int Cardinality(PGLOBAL g);
|
virtual int Cardinality(PGLOBAL g);
|
||||||
virtual int MaxBlkSize(PGLOBAL g, int s);
|
virtual int MaxBlkSize(PGLOBAL g, int s);
|
||||||
virtual bool AllocateBuffer(PGLOBAL g) {return false;}
|
virtual bool AllocateBuffer(PGLOBAL) {return false;}
|
||||||
virtual void ResetBuffer(PGLOBAL g) {}
|
virtual void ResetBuffer(PGLOBAL) {}
|
||||||
virtual int GetNerr(void) {return 0;}
|
virtual int GetNerr(void) {return 0;}
|
||||||
virtual int GetRowID(void) = 0;
|
virtual int GetRowID(void) = 0;
|
||||||
virtual bool RecordPos(PGLOBAL g) = 0;
|
virtual bool RecordPos(PGLOBAL g) = 0;
|
||||||
|
@@ -279,7 +279,7 @@ bool VCTFAM::SetBlockInfo(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Use BlockTest to reduce the table estimated size. */
|
/* Use BlockTest to reduce the table estimated size. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int VCTFAM::MaxBlkSize(PGLOBAL g, int s)
|
int VCTFAM::MaxBlkSize(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
int rc = RC_OK, savcur = CurBlk;
|
int rc = RC_OK, savcur = CurBlk;
|
||||||
int size;
|
int size;
|
||||||
@@ -1716,7 +1716,7 @@ int VCMFAM::DeleteRecords(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Move intermediate deleted or updated lines. */
|
/* Move intermediate deleted or updated lines. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VCMFAM::MoveIntermediateLines(PGLOBAL g, bool *b)
|
bool VCMFAM::MoveIntermediateLines(PGLOBAL, bool *)
|
||||||
{
|
{
|
||||||
int i, m, n;
|
int i, m, n;
|
||||||
|
|
||||||
@@ -1765,7 +1765,7 @@ bool VCMFAM::MoveIntermediateLines(PGLOBAL g, bool *b)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base close routine for VMP access method. */
|
/* Data Base close routine for VMP access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void VCMFAM::CloseTableFile(PGLOBAL g, bool abort)
|
void VCMFAM::CloseTableFile(PGLOBAL g, bool)
|
||||||
{
|
{
|
||||||
int wrc = RC_OK;
|
int wrc = RC_OK;
|
||||||
MODE mode = Tdbp->GetMode();
|
MODE mode = Tdbp->GetMode();
|
||||||
@@ -1800,7 +1800,7 @@ void VCMFAM::CloseTableFile(PGLOBAL g, bool abort)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ReadBlock: Read column values from current block. */
|
/* ReadBlock: Read column values from current block. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VCMFAM::ReadBlock(PGLOBAL g, PVCTCOL colp)
|
bool VCMFAM::ReadBlock(PGLOBAL, PVCTCOL colp)
|
||||||
{
|
{
|
||||||
char *mempos;
|
char *mempos;
|
||||||
int i = colp->Index - 1;
|
int i = colp->Index - 1;
|
||||||
@@ -1830,7 +1830,7 @@ bool VCMFAM::ReadBlock(PGLOBAL g, PVCTCOL colp)
|
|||||||
/* the mapped file, except when checking for Update but in this case */
|
/* the mapped file, except when checking for Update but in this case */
|
||||||
/* we do not want to write back the modifications either. */
|
/* we do not want to write back the modifications either. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VCMFAM::WriteBlock(PGLOBAL g, PVCTCOL colp)
|
bool VCMFAM::WriteBlock(PGLOBAL, PVCTCOL colp __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
char *mempos;
|
char *mempos;
|
||||||
@@ -2124,7 +2124,7 @@ bool VECFAM::AllocateBuffer(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Do initial action when inserting. */
|
/* Do initial action when inserting. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VECFAM::InitInsert(PGLOBAL g)
|
bool VECFAM::InitInsert(PGLOBAL)
|
||||||
{
|
{
|
||||||
// We come here in MODE_INSERT only
|
// We come here in MODE_INSERT only
|
||||||
CurBlk = 0;
|
CurBlk = 0;
|
||||||
@@ -2365,7 +2365,7 @@ bool VECFAM::MoveLines(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Move intermediate deleted or updated lines. */
|
/* Move intermediate deleted or updated lines. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VECFAM::MoveIntermediateLines(PGLOBAL g, bool *bn)
|
bool VECFAM::MoveIntermediateLines(PGLOBAL g, bool *)
|
||||||
{
|
{
|
||||||
int i, n;
|
int i, n;
|
||||||
bool b = false;
|
bool b = false;
|
||||||
@@ -3009,7 +3009,7 @@ int VMPFAM::DeleteRecords(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base close routine for VMP access method. */
|
/* Data Base close routine for VMP access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void VMPFAM::CloseTableFile(PGLOBAL g, bool abort)
|
void VMPFAM::CloseTableFile(PGLOBAL g, bool)
|
||||||
{
|
{
|
||||||
if (Tdbp->GetMode() == MODE_DELETE) {
|
if (Tdbp->GetMode() == MODE_DELETE) {
|
||||||
// Set Block and Nrec values for TDBVCT::MakeBlockValues
|
// Set Block and Nrec values for TDBVCT::MakeBlockValues
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -247,7 +247,7 @@ int ZIPFAM::GetNextPos(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* SetPos: Replace the table at the specified position. */
|
/* SetPos: Replace the table at the specified position. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool ZIPFAM::SetPos(PGLOBAL g, int pos)
|
bool ZIPFAM::SetPos(PGLOBAL g, int pos __attribute__((unused)))
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP");
|
sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP");
|
||||||
return true;
|
return true;
|
||||||
@@ -267,7 +267,7 @@ bool ZIPFAM::SetPos(PGLOBAL g, int pos)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Record file position in case of UPDATE or DELETE. */
|
/* Record file position in case of UPDATE or DELETE. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool ZIPFAM::RecordPos(PGLOBAL g)
|
bool ZIPFAM::RecordPos(PGLOBAL)
|
||||||
{
|
{
|
||||||
Zpos = gztell(Zfile);
|
Zpos = gztell(Zfile);
|
||||||
return false;
|
return false;
|
||||||
@@ -376,7 +376,7 @@ int ZIPFAM::WriteBuffer(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base delete line routine for ZDOS access method. (NIY) */
|
/* Data Base delete line routine for ZDOS access method. (NIY) */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int ZIPFAM::DeleteRecords(PGLOBAL g, int irc)
|
int ZIPFAM::DeleteRecords(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, MSG(NO_ZIP_DELETE));
|
strcpy(g->Message, MSG(NO_ZIP_DELETE));
|
||||||
return RC_FX;
|
return RC_FX;
|
||||||
@@ -385,7 +385,7 @@ int ZIPFAM::DeleteRecords(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base close routine for DOS access method. */
|
/* Data Base close routine for DOS access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void ZIPFAM::CloseTableFile(PGLOBAL g, bool abort)
|
void ZIPFAM::CloseTableFile(PGLOBAL, bool)
|
||||||
{
|
{
|
||||||
int rc = gzclose(Zfile);
|
int rc = gzclose(Zfile);
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ ZBKFAM::ZBKFAM(PZBKFAM txfp) : ZIPFAM(txfp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Use BlockTest to reduce the table estimated size. */
|
/* Use BlockTest to reduce the table estimated size. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int ZBKFAM::MaxBlkSize(PGLOBAL g, int s)
|
int ZBKFAM::MaxBlkSize(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
int rc = RC_OK, savcur = CurBlk;
|
int rc = RC_OK, savcur = CurBlk;
|
||||||
int size;
|
int size;
|
||||||
@@ -503,7 +503,7 @@ int ZBKFAM::GetPos(void)
|
|||||||
/* Record file position in case of UPDATE or DELETE. */
|
/* Record file position in case of UPDATE or DELETE. */
|
||||||
/* Not used yet for fixed tables. */
|
/* Not used yet for fixed tables. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool ZBKFAM::RecordPos(PGLOBAL g)
|
bool ZBKFAM::RecordPos(PGLOBAL /*g*/)
|
||||||
{
|
{
|
||||||
//strcpy(g->Message, "RecordPos not implemented for zip blocked tables");
|
//strcpy(g->Message, "RecordPos not implemented for zip blocked tables");
|
||||||
//return true;
|
//return true;
|
||||||
@@ -513,7 +513,7 @@ bool ZBKFAM::RecordPos(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Skip one record in file. */
|
/* Skip one record in file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int ZBKFAM::SkipRecord(PGLOBAL g, bool header)
|
int ZBKFAM::SkipRecord(PGLOBAL /*g*/, bool)
|
||||||
{
|
{
|
||||||
//strcpy(g->Message, "SkipRecord not implemented for zip blocked tables");
|
//strcpy(g->Message, "SkipRecord not implemented for zip blocked tables");
|
||||||
//return RC_FX;
|
//return RC_FX;
|
||||||
@@ -668,7 +668,7 @@ int ZBKFAM::DeleteRecords(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base close routine for ZBK access method. */
|
/* Data Base close routine for ZBK access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void ZBKFAM::CloseTableFile(PGLOBAL g, bool abort)
|
void ZBKFAM::CloseTableFile(PGLOBAL g, bool)
|
||||||
{
|
{
|
||||||
int rc = RC_OK;
|
int rc = RC_OK;
|
||||||
|
|
||||||
@@ -1060,7 +1060,7 @@ int ZLBFAM::GetNextPos(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* SetPos: Replace the table at the specified position. */
|
/* SetPos: Replace the table at the specified position. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool ZLBFAM::SetPos(PGLOBAL g, int pos)
|
bool ZLBFAM::SetPos(PGLOBAL g, int pos __attribute__((unused)))
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP");
|
sprintf(g->Message, MSG(NO_SETPOS_YET), "ZIP");
|
||||||
return true;
|
return true;
|
||||||
@@ -1350,7 +1350,7 @@ bool ZLBFAM::WriteCompressedBuffer(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Table file close routine for DOS access method. */
|
/* Table file close routine for DOS access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void ZLBFAM::CloseTableFile(PGLOBAL g, bool abort)
|
void ZLBFAM::CloseTableFile(PGLOBAL g, bool)
|
||||||
{
|
{
|
||||||
int rc = RC_OK;
|
int rc = RC_OK;
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*************** Filter H Declares Source Code File (.H) ***************/
|
/*************** Filter H Declares Source Code File (.H) ***************/
|
||||||
/* Name: FILTER.H Version 1.2 */
|
/* Name: FILTER.H Version 1.2 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2010-2012 */
|
/* (C) Copyright to the author Olivier BERTRAND 2010-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the FILTER and derived classes declares. */
|
/* This file contains the FILTER and derived classes declares. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -105,7 +105,7 @@ class FILTERX : public FILTER {
|
|||||||
virtual bool Eval(PGLOBAL) = 0; // just to prevent direct FILTERX use
|
virtual bool Eval(PGLOBAL) = 0; // just to prevent direct FILTERX use
|
||||||
|
|
||||||
// Fake operator new used to change a filter into a derived filter
|
// Fake operator new used to change a filter into a derived filter
|
||||||
void * operator new(size_t size, PFIL filp) {return filp;}
|
void * operator new(size_t, PFIL filp) {return filp;}
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
// Avoid warning C4291 by defining a matching dummy delete operator
|
// Avoid warning C4291 by defining a matching dummy delete operator
|
||||||
void operator delete(void *, PFIL) {}
|
void operator delete(void *, PFIL) {}
|
||||||
|
@@ -193,7 +193,7 @@ extern "C" {
|
|||||||
/* Utility functions. */
|
/* Utility functions. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
|
PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
|
||||||
PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info);
|
PQRYRES VirColumns(PGLOBAL g, bool info);
|
||||||
PQRYRES JSONColumns(PGLOBAL g, char *dp, const char *fn, char *objn,
|
PQRYRES JSONColumns(PGLOBAL g, char *dp, const char *fn, char *objn,
|
||||||
int pretty, int lvl, int mxr, bool info);
|
int pretty, int lvl, int mxr, bool info);
|
||||||
PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info);
|
PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info);
|
||||||
@@ -349,7 +349,7 @@ int GetConvSize(void) {return THDVAR(current_thd, conv_size);}
|
|||||||
TYPCONV GetTypeConv(void) {return (TYPCONV)THDVAR(current_thd, type_conv);}
|
TYPCONV GetTypeConv(void) {return (TYPCONV)THDVAR(current_thd, type_conv);}
|
||||||
uint GetJsonGrpSize(void) {return THDVAR(current_thd, json_grp_size);}
|
uint GetJsonGrpSize(void) {return THDVAR(current_thd, json_grp_size);}
|
||||||
uint GetWorkSize(void) {return THDVAR(current_thd, work_size);}
|
uint GetWorkSize(void) {return THDVAR(current_thd, work_size);}
|
||||||
void SetWorkSize(uint n)
|
void SetWorkSize(uint)
|
||||||
{
|
{
|
||||||
// Changing the session variable value seems to be impossible here
|
// Changing the session variable value seems to be impossible here
|
||||||
// and should be done in a check function
|
// and should be done in a check function
|
||||||
@@ -664,7 +664,7 @@ static int connect_init_func(void *p)
|
|||||||
@brief
|
@brief
|
||||||
Plugin clean up
|
Plugin clean up
|
||||||
*/
|
*/
|
||||||
static int connect_done_func(void *p)
|
static int connect_done_func(void *)
|
||||||
{
|
{
|
||||||
int error= 0;
|
int error= 0;
|
||||||
PCONNECT pc, pn;
|
PCONNECT pc, pn;
|
||||||
@@ -822,8 +822,6 @@ ha_connect::~ha_connect(void)
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
static PCONNECT GetUser(THD *thd, PCONNECT xp)
|
static PCONNECT GetUser(THD *thd, PCONNECT xp)
|
||||||
{
|
{
|
||||||
const char *dbn= NULL;
|
|
||||||
|
|
||||||
if (!thd)
|
if (!thd)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -835,7 +833,7 @@ static PCONNECT GetUser(THD *thd, PCONNECT xp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (!xp) {
|
if (!xp) {
|
||||||
xp= new user_connect(thd, dbn);
|
xp= new user_connect(thd);
|
||||||
|
|
||||||
if (xp->user_init()) {
|
if (xp->user_init()) {
|
||||||
delete xp;
|
delete xp;
|
||||||
@@ -908,7 +906,8 @@ const char *ha_connect::index_type(uint inx)
|
|||||||
If all_parts is set, MySQL wants to know the flags for the combined
|
If all_parts is set, MySQL wants to know the flags for the combined
|
||||||
index, up to and including 'part'.
|
index, up to and including 'part'.
|
||||||
*/
|
*/
|
||||||
ulong ha_connect::index_flags(uint inx, uint part, bool all_parts) const
|
//ong ha_connect::index_flags(uint inx, uint part, bool all_parts) const
|
||||||
|
ulong ha_connect::index_flags(uint, uint, bool) const
|
||||||
{
|
{
|
||||||
ulong flags= HA_READ_NEXT | HA_READ_RANGE |
|
ulong flags= HA_READ_NEXT | HA_READ_RANGE |
|
||||||
HA_KEYREAD_ONLY | HA_KEY_SCAN_NOT_ROR;
|
HA_KEYREAD_ONLY | HA_KEY_SCAN_NOT_ROR;
|
||||||
@@ -2008,7 +2007,7 @@ int ha_connect::MakeRecord(char *buf)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Set row values from a MySQL pseudo record. Specific to MySQL. */
|
/* Set row values from a MySQL pseudo record. Specific to MySQL. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int ha_connect::ScanRecord(PGLOBAL g, uchar *buf)
|
int ha_connect::ScanRecord(PGLOBAL g, uchar *)
|
||||||
{
|
{
|
||||||
char attr_buffer[1024];
|
char attr_buffer[1024];
|
||||||
char data_buffer[1024];
|
char data_buffer[1024];
|
||||||
@@ -2150,7 +2149,7 @@ int ha_connect::ScanRecord(PGLOBAL g, uchar *buf)
|
|||||||
/* Check change in index column. Specific to MySQL. */
|
/* Check change in index column. Specific to MySQL. */
|
||||||
/* Should be elaborated to check for real changes. */
|
/* Should be elaborated to check for real changes. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int ha_connect::CheckRecord(PGLOBAL g, const uchar *oldbuf, uchar *newbuf)
|
int ha_connect::CheckRecord(PGLOBAL g, const uchar *, uchar *newbuf)
|
||||||
{
|
{
|
||||||
return ScanRecord(g, newbuf);
|
return ScanRecord(g, newbuf);
|
||||||
} // end of dummy CheckRecord
|
} // end of dummy CheckRecord
|
||||||
@@ -2923,7 +2922,7 @@ bool ha_connect::get_error_message(int error, String* buf)
|
|||||||
&dummy_errors);
|
&dummy_errors);
|
||||||
|
|
||||||
if (trace)
|
if (trace)
|
||||||
htrc("GEM(%u): %s\n", len, g->Message);
|
htrc("GEM(%d): len=%u %s\n", error, len, g->Message);
|
||||||
|
|
||||||
msg[len]= '\0';
|
msg[len]= '\0';
|
||||||
buf->copy(msg, (uint)strlen(msg), system_charset_info);
|
buf->copy(msg, (uint)strlen(msg), system_charset_info);
|
||||||
@@ -3019,7 +3018,7 @@ int ha_connect::open(const char *name, int mode, uint test_if_locked)
|
|||||||
@brief
|
@brief
|
||||||
Make the indexes for this table
|
Make the indexes for this table
|
||||||
*/
|
*/
|
||||||
int ha_connect::optimize(THD* thd, HA_CHECK_OPT* check_opt)
|
int ha_connect::optimize(THD* thd, HA_CHECK_OPT*)
|
||||||
{
|
{
|
||||||
int rc= 0;
|
int rc= 0;
|
||||||
PGLOBAL& g= xp->g;
|
PGLOBAL& g= xp->g;
|
||||||
@@ -3223,7 +3222,7 @@ int ha_connect::update_row(const uchar *old_data, uchar *new_data)
|
|||||||
@see
|
@see
|
||||||
sql_acl.cc, sql_udf.cc, sql_delete.cc, sql_insert.cc and sql_select.cc
|
sql_acl.cc, sql_udf.cc, sql_delete.cc, sql_insert.cc and sql_select.cc
|
||||||
*/
|
*/
|
||||||
int ha_connect::delete_row(const uchar *buf)
|
int ha_connect::delete_row(const uchar *)
|
||||||
{
|
{
|
||||||
int rc= 0;
|
int rc= 0;
|
||||||
DBUG_ENTER("ha_connect::delete_row");
|
DBUG_ENTER("ha_connect::delete_row");
|
||||||
@@ -3503,7 +3502,8 @@ int ha_connect::index_last(uchar *buf)
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* This is called to get more rows having the same index value. */
|
/* This is called to get more rows having the same index value. */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
int ha_connect::index_next_same(uchar *buf, const uchar *key, uint keylen)
|
//t ha_connect::index_next_same(uchar *buf, const uchar *key, uint keylen)
|
||||||
|
int ha_connect::index_next_same(uchar *buf, const uchar *, uint)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
DBUG_ENTER("ha_connect::index_next_same");
|
DBUG_ENTER("ha_connect::index_next_same");
|
||||||
@@ -3693,7 +3693,7 @@ int ha_connect::rnd_next(uchar *buf)
|
|||||||
@see
|
@see
|
||||||
filesort.cc, sql_select.cc, sql_delete.cc and sql_update.cc
|
filesort.cc, sql_select.cc, sql_delete.cc and sql_update.cc
|
||||||
*/
|
*/
|
||||||
void ha_connect::position(const uchar *record)
|
void ha_connect::position(const uchar *)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_connect::position");
|
DBUG_ENTER("ha_connect::position");
|
||||||
//if (((PTDBASE)tdbp)->GetDef()->Indexable())
|
//if (((PTDBASE)tdbp)->GetDef()->Indexable())
|
||||||
@@ -3876,7 +3876,7 @@ int ha_connect::info(uint flag)
|
|||||||
@see
|
@see
|
||||||
ha_innodb.cc
|
ha_innodb.cc
|
||||||
*/
|
*/
|
||||||
int ha_connect::extra(enum ha_extra_function operation)
|
int ha_connect::extra(enum ha_extra_function /*operation*/)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_connect::extra");
|
DBUG_ENTER("ha_connect::extra");
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
@@ -4484,7 +4484,7 @@ int ha_connect::external_lock(THD *thd, int lock_type)
|
|||||||
@see
|
@see
|
||||||
get_lock_data() in lock.cc
|
get_lock_data() in lock.cc
|
||||||
*/
|
*/
|
||||||
THR_LOCK_DATA **ha_connect::store_lock(THD *thd,
|
THR_LOCK_DATA **ha_connect::store_lock(THD *,
|
||||||
THR_LOCK_DATA **to,
|
THR_LOCK_DATA **to,
|
||||||
enum thr_lock_type lock_type)
|
enum thr_lock_type lock_type)
|
||||||
{
|
{
|
||||||
@@ -4901,7 +4901,7 @@ static int init_table_share(THD* thd,
|
|||||||
oom|= sql->append(' ');
|
oom|= sql->append(' ');
|
||||||
oom|= sql->append(opt->name);
|
oom|= sql->append(opt->name);
|
||||||
oom|= sql->append('=');
|
oom|= sql->append('=');
|
||||||
oom|= sql->append(vull ? "ON" : "OFF");
|
oom|= sql->append(vull ? "YES" : "NO");
|
||||||
} // endif vull
|
} // endif vull
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -4955,7 +4955,7 @@ static int init_table_share(THD* thd,
|
|||||||
@note
|
@note
|
||||||
this function is no more called in case of CREATE .. SELECT
|
this function is no more called in case of CREATE .. SELECT
|
||||||
*/
|
*/
|
||||||
static int connect_assisted_discovery(handlerton *hton, THD* thd,
|
static int connect_assisted_discovery(handlerton *, THD* thd,
|
||||||
TABLE_SHARE *table_s,
|
TABLE_SHARE *table_s,
|
||||||
HA_CREATE_INFO *create_info)
|
HA_CREATE_INFO *create_info)
|
||||||
{
|
{
|
||||||
@@ -4967,8 +4967,8 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
|
|||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
char *nsp= NULL, *cls= NULL;
|
char *nsp= NULL, *cls= NULL;
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
int port= 0, hdr= 0, mxr __attribute__((unused))= 0, mxe= 0, rc= 0;
|
int port= 0, hdr= 0, mxr= 0, mxe= 0, rc= 0, lvl= 0;
|
||||||
int cop __attribute__((unused))= 0, pty= 2, lrecl= 0, lvl= 0;
|
int cop __attribute__((unused))= 0, pty= 2, lrecl= 0;
|
||||||
#if defined(ODBC_SUPPORT)
|
#if defined(ODBC_SUPPORT)
|
||||||
POPARM sop = NULL;
|
POPARM sop = NULL;
|
||||||
char *ucnc = NULL;
|
char *ucnc = NULL;
|
||||||
@@ -5337,7 +5337,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
|
|||||||
break;
|
break;
|
||||||
#endif // PIVOT_SUPPORT
|
#endif // PIVOT_SUPPORT
|
||||||
case TAB_VIR:
|
case TAB_VIR:
|
||||||
qrp= VirColumns(g, tab, (char*)db, fnc == FNC_COL);
|
qrp= VirColumns(g, fnc == FNC_COL);
|
||||||
break;
|
break;
|
||||||
case TAB_JSON:
|
case TAB_JSON:
|
||||||
qrp= JSONColumns(g, (char*)db, fn, objn, pty, lrecl, lvl, fnc == FNC_COL);
|
qrp= JSONColumns(g, (char*)db, fn, objn, pty, lrecl, lvl, fnc == FNC_COL);
|
||||||
@@ -6464,8 +6464,7 @@ fin:
|
|||||||
@note: This function is no more called by check_if_supported_inplace_alter
|
@note: This function is no more called by check_if_supported_inplace_alter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool ha_connect::check_if_incompatible_data(HA_CREATE_INFO *info,
|
bool ha_connect::check_if_incompatible_data(HA_CREATE_INFO *, uint)
|
||||||
uint table_changes)
|
|
||||||
{
|
{
|
||||||
DBUG_ENTER("ha_connect::check_if_incompatible_data");
|
DBUG_ENTER("ha_connect::check_if_incompatible_data");
|
||||||
// TO DO: really implement and check it.
|
// TO DO: really implement and check it.
|
||||||
|
@@ -296,7 +296,7 @@ my_bool Json_Value_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
|||||||
} // end of Json_Value_init
|
} // end of Json_Value_init
|
||||||
|
|
||||||
char *Json_Value(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Value(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
PJVAL jvp;
|
PJVAL jvp;
|
||||||
@@ -329,7 +329,7 @@ my_bool Json_Array_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
|||||||
} // end of Json_Array_init
|
} // end of Json_Array_init
|
||||||
|
|
||||||
char *Json_Array(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Array(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
uint i;
|
uint i;
|
||||||
@@ -376,7 +376,7 @@ my_bool Json_Array_Add_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
|||||||
} // end of Json_Array_Add_init
|
} // end of Json_Array_Add_init
|
||||||
|
|
||||||
char *Json_Array_Add(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Array_Add(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
PJVAL jvp;
|
PJVAL jvp;
|
||||||
@@ -429,7 +429,7 @@ my_bool Json_Array_Delete_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
|||||||
} // end of Json_Array_Delete_init
|
} // end of Json_Array_Delete_init
|
||||||
|
|
||||||
char *Json_Array_Delete(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Array_Delete(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
int n;
|
int n;
|
||||||
@@ -482,7 +482,7 @@ my_bool Json_Object_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
|||||||
} // end of Json_Object_init
|
} // end of Json_Object_init
|
||||||
|
|
||||||
char *Json_Object(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Object(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
uint i;
|
uint i;
|
||||||
@@ -520,7 +520,7 @@ my_bool Json_Object_Nonull_init(UDF_INIT *initid, UDF_ARGS *args,
|
|||||||
} // end of Json_Object_Nonull_init
|
} // end of Json_Object_Nonull_init
|
||||||
|
|
||||||
char *Json_Object_Nonull(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Object_Nonull(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
uint i;
|
uint i;
|
||||||
@@ -574,8 +574,7 @@ my_bool Json_Array_Grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
|||||||
return false;
|
return false;
|
||||||
} // end of Json_Array_Grp_init
|
} // end of Json_Array_Grp_init
|
||||||
|
|
||||||
void Json_Array_Grp_add(UDF_INIT *initid, UDF_ARGS *args,
|
void Json_Array_Grp_add(UDF_INIT *initid, UDF_ARGS *args, char*, char*)
|
||||||
char *is_null, char *error)
|
|
||||||
{
|
{
|
||||||
PGLOBAL g = (PGLOBAL)initid->ptr;
|
PGLOBAL g = (PGLOBAL)initid->ptr;
|
||||||
PJAR arp = (PJAR)g->Activityp;
|
PJAR arp = (PJAR)g->Activityp;
|
||||||
@@ -585,8 +584,8 @@ void Json_Array_Grp_add(UDF_INIT *initid, UDF_ARGS *args,
|
|||||||
|
|
||||||
} // end of Json_Array_Grp_add
|
} // end of Json_Array_Grp_add
|
||||||
|
|
||||||
char *Json_Array_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Array_Grp(UDF_INIT *initid, UDF_ARGS *, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
PGLOBAL g = (PGLOBAL)initid->ptr;
|
PGLOBAL g = (PGLOBAL)initid->ptr;
|
||||||
@@ -605,7 +604,7 @@ char *Json_Array_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
return str;
|
return str;
|
||||||
} // end of Json_Array_Grp
|
} // end of Json_Array_Grp
|
||||||
|
|
||||||
void Json_Array_Grp_clear(UDF_INIT *initid, char *is_null, char *error)
|
void Json_Array_Grp_clear(UDF_INIT *initid, char*, char*)
|
||||||
{
|
{
|
||||||
PGLOBAL g = (PGLOBAL)initid->ptr;
|
PGLOBAL g = (PGLOBAL)initid->ptr;
|
||||||
|
|
||||||
@@ -646,8 +645,7 @@ my_bool Json_Object_Grp_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
|
|||||||
return false;
|
return false;
|
||||||
} // end of Json_Object_Grp_init
|
} // end of Json_Object_Grp_init
|
||||||
|
|
||||||
void Json_Object_Grp_add(UDF_INIT *initid, UDF_ARGS *args,
|
void Json_Object_Grp_add(UDF_INIT *initid, UDF_ARGS *args, char*, char*)
|
||||||
char *is_null, char *error)
|
|
||||||
{
|
{
|
||||||
PGLOBAL g = (PGLOBAL)initid->ptr;
|
PGLOBAL g = (PGLOBAL)initid->ptr;
|
||||||
PJOB objp = (PJOB)g->Activityp;
|
PJOB objp = (PJOB)g->Activityp;
|
||||||
@@ -657,8 +655,8 @@ void Json_Object_Grp_add(UDF_INIT *initid, UDF_ARGS *args,
|
|||||||
|
|
||||||
} // end of Json_Object_Grp_add
|
} // end of Json_Object_Grp_add
|
||||||
|
|
||||||
char *Json_Object_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
char *Json_Object_Grp(UDF_INIT *initid, UDF_ARGS *, char *result,
|
||||||
unsigned long *res_length, char *is_null, char *error)
|
unsigned long *res_length, char *, char *)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
PGLOBAL g = (PGLOBAL)initid->ptr;
|
PGLOBAL g = (PGLOBAL)initid->ptr;
|
||||||
@@ -675,7 +673,7 @@ char *Json_Object_Grp(UDF_INIT *initid, UDF_ARGS *args, char *result,
|
|||||||
return str;
|
return str;
|
||||||
} // end of Json_Object_Grp
|
} // end of Json_Object_Grp
|
||||||
|
|
||||||
void Json_Object_Grp_clear(UDF_INIT *initid, char *is_null, char *error)
|
void Json_Object_Grp_clear(UDF_INIT *initid, char*, char*)
|
||||||
{
|
{
|
||||||
PGLOBAL g = (PGLOBAL)initid->ptr;
|
PGLOBAL g = (PGLOBAL)initid->ptr;
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) Olivier Bertrand 2004 - 2014
|
/* Copyright (C) Olivier Bertrand 2004 - 2015
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
/* ------------- */
|
/* ------------- */
|
||||||
/* Version 1.4 */
|
/* Version 1.4 */
|
||||||
/* */
|
/* */
|
||||||
/* Author: Olivier Bertrand 2012 - 2014 */
|
/* Author: Olivier Bertrand 2012 - 2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -478,7 +478,7 @@ void MYCAT::SetPath(PGLOBAL g, LPCSTR *datapath, const char *path)
|
|||||||
/* Look for a table descriptor matching the name and type. */
|
/* Look for a table descriptor matching the name and type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PRELDEF MYCAT::GetTableDesc(PGLOBAL g, LPCSTR name,
|
PRELDEF MYCAT::GetTableDesc(PGLOBAL g, LPCSTR name,
|
||||||
LPCSTR type, PRELDEF *prp)
|
LPCSTR type, PRELDEF *)
|
||||||
{
|
{
|
||||||
if (trace)
|
if (trace)
|
||||||
printf("GetTableDesc: name=%s am=%s\n", name, SVP(type));
|
printf("GetTableDesc: name=%s am=%s\n", name, SVP(type));
|
||||||
@@ -589,7 +589,7 @@ PTDB MYCAT::GetTable(PGLOBAL g, PTABLE tablep, MODE mode, LPCSTR type)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ClearDB: Terminates Database usage. */
|
/* ClearDB: Terminates Database usage. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void MYCAT::ClearDB(PGLOBAL g)
|
void MYCAT::ClearDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
} // end of ClearDB
|
} // end of ClearDB
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) Olivier Bertrand 2004 - 2013
|
/* Copyright (C) Olivier Bertrand 2004 - 2015
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -98,7 +98,7 @@ class MYCAT : public CATALOG {
|
|||||||
void Reset(void);
|
void Reset(void);
|
||||||
//void SetDataPath(PGLOBAL g, const char *path)
|
//void SetDataPath(PGLOBAL g, const char *path)
|
||||||
// {SetPath(g, &DataPath, path);}
|
// {SetPath(g, &DataPath, path);}
|
||||||
bool StoreIndex(PGLOBAL g, PTABDEF defp) {return false;} // Temporary
|
bool StoreIndex(PGLOBAL, PTABDEF) {return false;} // Temporary
|
||||||
PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name,
|
PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name,
|
||||||
LPCSTR type, PRELDEF *prp = NULL);
|
LPCSTR type, PRELDEF *prp = NULL);
|
||||||
PTDB GetTable(PGLOBAL g, PTABLE tablep,
|
PTDB GetTable(PGLOBAL g, PTABLE tablep,
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2007-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2007-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -720,7 +720,7 @@ int MYSQLC::ExecSQL(PGLOBAL g, const char *query, int *w)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Get table size by executing "select count(*) from table_name". */
|
/* Get table size by executing "select count(*) from table_name". */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int MYSQLC::GetTableSize(PGLOBAL g, PSZ query)
|
int MYSQLC::GetTableSize(PGLOBAL g __attribute__((unused)), PSZ query)
|
||||||
{
|
{
|
||||||
if (mysql_real_query(m_DB, query, strlen(query))) {
|
if (mysql_real_query(m_DB, query, strlen(query))) {
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Warnings:
|
Warnings:
|
||||||
Warning 1105 No file name. Table will use t1.xml
|
Warning 1105 No file name. Table will use t1.xml
|
||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
#
|
#
|
||||||
# Testing HTML like XML file
|
# Testing HTML like XML file
|
||||||
@@ -11,9 +11,9 @@ CREATE TABLE beers (
|
|||||||
ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='beers.xml'
|
ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='beers.xml'
|
||||||
TABNAME='table' OPTION_LIST='xmlsup=libxml2,rownode=tr,colnode=td';
|
TABNAME='table' OPTION_LIST='xmlsup=libxml2,rownode=tr,colnode=td';
|
||||||
SELECT * FROM beers;
|
SELECT * FROM beers;
|
||||||
Name Origin Description
|
Name Origin Description
|
||||||
Huntsman Bath, UK Wonderful hop, light alcohol
|
Huntsman Bath, UK Wonderful hop, light alcohol
|
||||||
Tuborg Danmark In small bottles
|
Tuborg Danmark In small bottles
|
||||||
DROP TABLE beers;
|
DROP TABLE beers;
|
||||||
#
|
#
|
||||||
# Testing HTML file
|
# Testing HTML file
|
||||||
@@ -26,7 +26,7 @@ CREATE TABLE coffee (
|
|||||||
ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='coffee.htm'
|
ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='coffee.htm'
|
||||||
TABNAME='TABLE' HEADER=1 OPTION_LIST='xmlsup=libxml2,Coltype=HTML';
|
TABNAME='TABLE' HEADER=1 OPTION_LIST='xmlsup=libxml2,Coltype=HTML';
|
||||||
SELECT * FROM coffee;
|
SELECT * FROM coffee;
|
||||||
Name Cups Type Sugar
|
Name Cups Type Sugar
|
||||||
T. Sexton 10 Espresso No
|
T. Sexton 10 Espresso No
|
||||||
J. Dinnen 5 Decaf Yes
|
J. Dinnen 5 Decaf Yes
|
||||||
DROP TABLE coffee;
|
DROP TABLE coffee;
|
||||||
|
@@ -888,7 +888,7 @@ FILE *PlugReopenFile(PGLOBAL g, PFBLOCK fp, LPCSTR md)
|
|||||||
/* Close file routine: the purpose of this routine is to avoid */
|
/* Close file routine: the purpose of this routine is to avoid */
|
||||||
/* double closing that freeze the system on some Unix platforms. */
|
/* double closing that freeze the system on some Unix platforms. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all)
|
int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
@@ -548,7 +548,7 @@ bool OEMDEF::DeleteTableFile(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Define: initialize the table definition block from XDB file. */
|
/* Define: initialize the table definition block from XDB file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR, int)
|
||||||
{
|
{
|
||||||
Module = GetStringCatInfo(g, "Module", "");
|
Module = GetStringCatInfo(g, "Module", "");
|
||||||
Subtype = GetStringCatInfo(g, "Subtype", Module);
|
Subtype = GetStringCatInfo(g, "Subtype", Module);
|
||||||
@@ -715,7 +715,7 @@ COLDEF::COLDEF(void) : COLCRT()
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Define: initialize a column definition from a COLINFO structure. */
|
/* Define: initialize a column definition from a COLINFO structure. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int COLDEF::Define(PGLOBAL g, void *memp, PCOLINFO cfp, int poff)
|
int COLDEF::Define(PGLOBAL g, void *, PCOLINFO cfp, int poff)
|
||||||
{
|
{
|
||||||
Name = (PSZ)PlugDup(g, cfp->Name);
|
Name = (PSZ)PlugDup(g, cfp->Name);
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*************** RelDef H Declares Source Code File (.H) ***************/
|
/*************** RelDef H Declares Source Code File (.H) ***************/
|
||||||
/* Name: RELDEF.H Version 1.5 */
|
/* Name: RELDEF.H Version 1.5 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the DEF classes definitions. */
|
/* This file contains the DEF classes definitions. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -89,7 +89,7 @@ class DllExport TABDEF : public RELDEF { /* Logical table descriptor */
|
|||||||
bool IsReadOnly(void) {return Read_Only;}
|
bool IsReadOnly(void) {return Read_Only;}
|
||||||
virtual AMT GetDefType(void) {return TYPE_AM_TAB;}
|
virtual AMT GetDefType(void) {return TYPE_AM_TAB;}
|
||||||
virtual PIXDEF GetIndx(void) {return NULL;}
|
virtual PIXDEF GetIndx(void) {return NULL;}
|
||||||
virtual void SetIndx(PIXDEF xp) {}
|
virtual void SetIndx(PIXDEF) {}
|
||||||
virtual bool IsHuge(void) {return false;}
|
virtual bool IsHuge(void) {return false;}
|
||||||
const CHARSET_INFO *data_charset() {return m_data_charset;}
|
const CHARSET_INFO *data_charset() {return m_data_charset;}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/************* TabCol C++ Functions Source Code File (.CPP) ************/
|
/************* TabCol C++ Functions Source Code File (.CPP) ************/
|
||||||
/* Name: TABCOL.CPP Version 2.7 */
|
/* Name: TABCOL.CPP Version 2.7 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2013 */
|
/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the PlugDB++ XTAB, COLUMN and XORDER methods. */
|
/* This file contains the PlugDB++ XTAB, COLUMN and XORDER methods. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -91,7 +91,7 @@ void XTAB::Print(PGLOBAL g, FILE *f, uint n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make string output of XTAB contents. */
|
/* Make string output of XTAB contents. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void XTAB::Print(PGLOBAL g, char *ps, uint z)
|
void XTAB::Print(PGLOBAL, char *ps, uint z)
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
int i, n = (int)z - 1;
|
int i, n = (int)z - 1;
|
||||||
@@ -125,7 +125,7 @@ COLUMN::COLUMN(LPCSTR name) : Name(name)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* COLUMN SetFormat: should never be called. */
|
/* COLUMN SetFormat: should never be called. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool COLUMN::SetFormat(PGLOBAL g, FORMAT& fmt)
|
bool COLUMN::SetFormat(PGLOBAL g, FORMAT&)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, MSG(NO_FORMAT_COL));
|
strcpy(g->Message, MSG(NO_FORMAT_COL));
|
||||||
return true;
|
return true;
|
||||||
@@ -154,7 +154,7 @@ void COLUMN::Print(PGLOBAL g, FILE *f, uint n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make string output of COLUMN contents. */
|
/* Make string output of COLUMN contents. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void COLUMN::Print(PGLOBAL g, char *ps, uint z)
|
void COLUMN::Print(PGLOBAL, char *ps, uint z)
|
||||||
{
|
{
|
||||||
char buf[80];
|
char buf[80];
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -117,7 +117,7 @@ DOSDEF::DOSDEF(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DefineAM: define specific AM block values from XDB file. */
|
/* DefineAM: define specific AM block values from XDB file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool DOSDEF::DefineAM(PGLOBAL g, LPCSTR am, int)
|
||||||
{
|
{
|
||||||
char buf[8];
|
char buf[8];
|
||||||
bool map = (am && (*am == 'M' || *am == 'm'));
|
bool map = (am && (*am == 'M' || *am == 'm'));
|
||||||
@@ -303,7 +303,7 @@ bool DOSDEF::DeleteIndexFile(PGLOBAL g, PIXDEF pxdf)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* InvalidateIndex: mark all indexes as invalid. */
|
/* InvalidateIndex: mark all indexes as invalid. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool DOSDEF::InvalidateIndex(PGLOBAL g)
|
bool DOSDEF::InvalidateIndex(PGLOBAL)
|
||||||
{
|
{
|
||||||
if (To_Indx)
|
if (To_Indx)
|
||||||
for (PIXDEF xp = To_Indx; xp; xp = xp->Next)
|
for (PIXDEF xp = To_Indx; xp; xp = xp->Next)
|
||||||
@@ -1736,15 +1736,16 @@ err:
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make a dynamic index. */
|
/* Make a dynamic index. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBDOS::InitialyzeIndex(PGLOBAL g, PIXDEF xdp, bool sorted)
|
bool TDBDOS::InitialyzeIndex(PGLOBAL g, volatile PIXDEF xdp, bool sorted)
|
||||||
{
|
{
|
||||||
int k, rc;
|
int k, rc;
|
||||||
bool brc, dynamic;
|
volatile bool dynamic;
|
||||||
|
bool brc;
|
||||||
PCOL colp;
|
PCOL colp;
|
||||||
PCOLDEF cdp;
|
PCOLDEF cdp;
|
||||||
PVAL valp;
|
PVAL valp;
|
||||||
PXLOAD pxp;
|
PXLOAD pxp;
|
||||||
PKXBASE kxp;
|
volatile PKXBASE kxp;
|
||||||
PKPDEF kdp;
|
PKPDEF kdp;
|
||||||
|
|
||||||
if (!xdp && !(xdp = To_Xdp)) {
|
if (!xdp && !(xdp = To_Xdp)) {
|
||||||
@@ -1864,7 +1865,7 @@ int TDBDOS::GetProgCur(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* RowNumber: return the ordinal number of the current row. */
|
/* RowNumber: return the ordinal number of the current row. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBDOS::RowNumber(PGLOBAL g, bool b)
|
int TDBDOS::RowNumber(PGLOBAL g, bool)
|
||||||
{
|
{
|
||||||
if (To_Kindex) {
|
if (To_Kindex) {
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
@@ -1944,7 +1945,7 @@ int TDBDOS::Cardinality(PGLOBAL g)
|
|||||||
rec = ((PDOSDEF)To_Def)->Ending;
|
rec = ((PDOSDEF)To_Def)->Ending;
|
||||||
|
|
||||||
if (AvgLen <= 0) // No given average estimate
|
if (AvgLen <= 0) // No given average estimate
|
||||||
rec += EstimatedLength(g);
|
rec += EstimatedLength();
|
||||||
else // An estimate was given for the average record length
|
else // An estimate was given for the average record length
|
||||||
rec += AvgLen;
|
rec += AvgLen;
|
||||||
|
|
||||||
@@ -1988,7 +1989,7 @@ int TDBDOS::GetMaxSize(PGLOBAL g)
|
|||||||
/* Estimate the number of lines in the table (if not known) by */
|
/* Estimate the number of lines in the table (if not known) by */
|
||||||
/* dividing the file length by minimum record length. */
|
/* dividing the file length by minimum record length. */
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
rec = EstimatedLength(g) + ((PDOSDEF)To_Def)->Ending;
|
rec = EstimatedLength() + ((PDOSDEF)To_Def)->Ending;
|
||||||
MaxSize = (len + rec - 1) / rec;
|
MaxSize = (len + rec - 1) / rec;
|
||||||
|
|
||||||
if (trace)
|
if (trace)
|
||||||
@@ -2005,7 +2006,7 @@ int TDBDOS::GetMaxSize(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DOS EstimatedLength. Returns an estimated minimum line length. */
|
/* DOS EstimatedLength. Returns an estimated minimum line length. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBDOS::EstimatedLength(PGLOBAL g)
|
int TDBDOS::EstimatedLength(void)
|
||||||
{
|
{
|
||||||
int dep = 0;
|
int dep = 0;
|
||||||
PCOLDEF cdp = To_Def->GetCols();
|
PCOLDEF cdp = To_Def->GetCols();
|
||||||
@@ -2023,7 +2024,7 @@ int TDBDOS::EstimatedLength(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DOS tables favor the use temporary files for Update. */
|
/* DOS tables favor the use temporary files for Update. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBDOS::IsUsingTemp(PGLOBAL g)
|
bool TDBDOS::IsUsingTemp(PGLOBAL)
|
||||||
{
|
{
|
||||||
USETEMP utp = UseTemp();
|
USETEMP utp = UseTemp();
|
||||||
|
|
||||||
@@ -2183,7 +2184,7 @@ int TDBDOS::ReadDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* PrepareWriting: Prepare the line to write. */
|
/* PrepareWriting: Prepare the line to write. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBDOS::PrepareWriting(PGLOBAL g)
|
bool TDBDOS::PrepareWriting(PGLOBAL)
|
||||||
{
|
{
|
||||||
if (!Ftype && (Mode == MODE_INSERT || Txfp->GetUseTemp())) {
|
if (!Ftype && (Mode == MODE_INSERT || Txfp->GetUseTemp())) {
|
||||||
char *p;
|
char *p;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*************** TabDos H Declares Source Code File (.H) ***************/
|
/*************** TabDos H Declares Source Code File (.H) ***************/
|
||||||
/* Name: TABDOS.H Version 3.3 */
|
/* Name: TABDOS.H Version 3.3 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 1999-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the DOS classes declares. */
|
/* This file contains the DOS classes declares. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -123,11 +123,11 @@ class DllExport TDBDOS : public TDBASE {
|
|||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual AMT GetAmType(void) {return Txfp->GetAmType();}
|
virtual AMT GetAmType(void) {return Txfp->GetAmType();}
|
||||||
virtual PSZ GetFile(PGLOBAL g) {return Txfp->To_File;}
|
virtual PSZ GetFile(PGLOBAL) {return Txfp->To_File;}
|
||||||
virtual void SetFile(PGLOBAL g, PSZ fn) {Txfp->To_File = fn;}
|
virtual void SetFile(PGLOBAL, PSZ fn) {Txfp->To_File = fn;}
|
||||||
virtual void SetAbort(bool b) {Abort = b;}
|
virtual void SetAbort(bool b) {Abort = b;}
|
||||||
virtual RECFM GetFtype(void) {return Ftype;}
|
virtual RECFM GetFtype(void) {return Ftype;}
|
||||||
virtual bool SkipHeader(PGLOBAL g) {return false;}
|
virtual bool SkipHeader(PGLOBAL) {return false;}
|
||||||
virtual void RestoreNrec(void) {Txfp->SetNrec(1);}
|
virtual void RestoreNrec(void) {Txfp->SetNrec(1);}
|
||||||
virtual PTDB Duplicate(PGLOBAL g)
|
virtual PTDB Duplicate(PGLOBAL g)
|
||||||
{return (PTDB)new(g) TDBDOS(g, this);}
|
{return (PTDB)new(g) TDBDOS(g, this);}
|
||||||
@@ -149,7 +149,7 @@ class DllExport TDBDOS : public TDBASE {
|
|||||||
|
|
||||||
// Database routines
|
// Database routines
|
||||||
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
||||||
virtual char *GetOpenMode(PGLOBAL g, char *opmode) {return NULL;}
|
virtual char *GetOpenMode(PGLOBAL, char*) {return NULL;}
|
||||||
virtual int GetFileLength(PGLOBAL g) {return Txfp->GetFileLength(g);}
|
virtual int GetFileLength(PGLOBAL g) {return Txfp->GetFileLength(g);}
|
||||||
virtual int GetProgMax(PGLOBAL g);
|
virtual int GetProgMax(PGLOBAL g);
|
||||||
virtual int GetProgCur(void);
|
virtual int GetProgCur(void);
|
||||||
@@ -168,7 +168,7 @@ class DllExport TDBDOS : public TDBASE {
|
|||||||
virtual int ReadBuffer(PGLOBAL g) {return Txfp->ReadBuffer(g);}
|
virtual int ReadBuffer(PGLOBAL g) {return Txfp->ReadBuffer(g);}
|
||||||
|
|
||||||
// Specific routine
|
// Specific routine
|
||||||
virtual int EstimatedLength(PGLOBAL g);
|
virtual int EstimatedLength(void);
|
||||||
|
|
||||||
// Optimization routines
|
// Optimization routines
|
||||||
virtual int MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add);
|
virtual int MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add);
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -271,7 +271,7 @@ int TDBFIX::RowNumber(PGLOBAL g, bool b)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* FIX tables don't use temporary files except if specified as do it. */
|
/* FIX tables don't use temporary files except if specified as do it. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBFIX::IsUsingTemp(PGLOBAL g)
|
bool TDBFIX::IsUsingTemp(PGLOBAL)
|
||||||
{
|
{
|
||||||
// Not ready yet to handle using a temporary file with mapping
|
// Not ready yet to handle using a temporary file with mapping
|
||||||
// or while deleting from DBF files.
|
// or while deleting from DBF files.
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2001 - 2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2001 - 2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -625,7 +625,7 @@ bool TDBCSV::CheckErr(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* CSV EstimatedLength. Returns an estimated minimum line length. */
|
/* CSV EstimatedLength. Returns an estimated minimum line length. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBCSV::EstimatedLength(PGLOBAL g)
|
int TDBCSV::EstimatedLength(void)
|
||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
PCOLDEF cdp;
|
PCOLDEF cdp;
|
||||||
@@ -1118,7 +1118,7 @@ PCOL TDBFMT::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||||||
/* FMT EstimatedLength. Returns an estimated minimum line length. */
|
/* FMT EstimatedLength. Returns an estimated minimum line length. */
|
||||||
/* The big problem here is how can we astimated that minimum ? */
|
/* The big problem here is how can we astimated that minimum ? */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBFMT::EstimatedLength(PGLOBAL g)
|
int TDBFMT::EstimatedLength(void)
|
||||||
{
|
{
|
||||||
// This is rather stupid !!!
|
// This is rather stupid !!!
|
||||||
return ((PDOSDEF)To_Def)->GetEnding() + (int)((Lrecl / 10) + 1);
|
return ((PDOSDEF)To_Def)->GetEnding() + (int)((Lrecl / 10) + 1);
|
||||||
|
@@ -75,7 +75,7 @@ class TDBCSV : public TDBDOS {
|
|||||||
virtual int ReadBuffer(PGLOBAL g); // Physical file read
|
virtual int ReadBuffer(PGLOBAL g); // Physical file read
|
||||||
|
|
||||||
// Specific routines
|
// Specific routines
|
||||||
virtual int EstimatedLength(PGLOBAL g);
|
virtual int EstimatedLength(void);
|
||||||
virtual bool SkipHeader(PGLOBAL g);
|
virtual bool SkipHeader(PGLOBAL g);
|
||||||
virtual bool CheckErr(void);
|
virtual bool CheckErr(void);
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ class TDBFMT : public TDBCSV {
|
|||||||
virtual int ReadBuffer(PGLOBAL g); // Physical file read
|
virtual int ReadBuffer(PGLOBAL g); // Physical file read
|
||||||
|
|
||||||
// Specific routines
|
// Specific routines
|
||||||
virtual int EstimatedLength(PGLOBAL g);
|
virtual int EstimatedLength(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool PrepareWriting(PGLOBAL g)
|
virtual bool PrepareWriting(PGLOBAL g)
|
||||||
|
@@ -78,11 +78,13 @@ PQRYRES JSONColumns(PGLOBAL g, char *dp, const char *fn, char *objn,
|
|||||||
PJVAL jvp;
|
PJVAL jvp;
|
||||||
PJOB row;
|
PJOB row;
|
||||||
PJDEF tdp;
|
PJDEF tdp;
|
||||||
TDBJSN *tjnp;
|
TDBJSN *tjnp = NULL;
|
||||||
PJTDB tjsp;
|
PJTDB tjsp = NULL;
|
||||||
PQRYRES qrp;
|
PQRYRES qrp;
|
||||||
PCOLRES crp;
|
PCOLRES crp;
|
||||||
|
|
||||||
|
jcol.Name = jcol.Fmt = NULL;
|
||||||
|
|
||||||
if (info) {
|
if (info) {
|
||||||
length[0] = 128;
|
length[0] = 128;
|
||||||
length[7] = 256;
|
length[7] = 256;
|
||||||
@@ -362,7 +364,7 @@ JSONDEF::JSONDEF(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DefineAM: define specific AM block values. */
|
/* DefineAM: define specific AM block values. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff)
|
||||||
{
|
{
|
||||||
Jmode = (JMODE)GetIntCatInfo("Jmode", MODE_OBJECT);
|
Jmode = (JMODE)GetIntCatInfo("Jmode", MODE_OBJECT);
|
||||||
Objname = GetStringCatInfo(g, "Object", NULL);
|
Objname = GetStringCatInfo(g, "Object", NULL);
|
||||||
@@ -506,7 +508,7 @@ PCOL TDBJSN::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PCOL TDBJSN::InsertSpecialColumn(PGLOBAL g, PCOL colp)
|
PCOL TDBJSN::InsertSpecialColumn(PCOL colp)
|
||||||
{
|
{
|
||||||
if (!colp->IsSpecial())
|
if (!colp->IsSpecial())
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1486,7 +1488,7 @@ int TDBJSON::MakeNewDoc(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBJSON::MakeDocument(PGLOBAL g)
|
int TDBJSON::MakeDocument(PGLOBAL g)
|
||||||
{
|
{
|
||||||
char *p, *memory, *objpath, *key;
|
char *p, *memory, *objpath, *key = NULL;
|
||||||
int len, i = 0;
|
int len, i = 0;
|
||||||
MODE mode = Mode;
|
MODE mode = Mode;
|
||||||
PJSON jsp;
|
PJSON jsp;
|
||||||
@@ -1646,7 +1648,7 @@ void TDBJSON::ResetSize(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* TDBJSON is not indexable. */
|
/* TDBJSON is not indexable. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBJSON::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
|
int TDBJSON::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool)
|
||||||
{
|
{
|
||||||
if (pxdf) {
|
if (pxdf) {
|
||||||
strcpy(g->Message, "JSON not indexable when pretty = 2");
|
strcpy(g->Message, "JSON not indexable when pretty = 2");
|
||||||
@@ -1677,7 +1679,7 @@ int TDBJSON::GetRecpos(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Set the position in the table. */
|
/* Set the position in the table. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBJSON::SetRecpos(PGLOBAL g, int recpos)
|
bool TDBJSON::SetRecpos(PGLOBAL, int recpos)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
union {
|
union {
|
||||||
@@ -1739,7 +1741,7 @@ bool TDBJSON::OpenDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ReadDB: Data Base read routine for JSON access method. */
|
/* ReadDB: Data Base read routine for JSON access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBJSON::ReadDB(PGLOBAL g)
|
int TDBJSON::ReadDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@@ -82,7 +82,7 @@ class TDBJSN : public TDBDOS {
|
|||||||
// Methods
|
// Methods
|
||||||
virtual PTDB CopyOne(PTABS t);
|
virtual PTDB CopyOne(PTABS t);
|
||||||
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
||||||
virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL colp);
|
virtual PCOL InsertSpecialColumn(PCOL colp);
|
||||||
virtual int RowNumber(PGLOBAL g, bool b = FALSE)
|
virtual int RowNumber(PGLOBAL g, bool b = FALSE)
|
||||||
{return (b) ? N : Fpos + 1;}
|
{return (b) ? N : Fpos + 1;}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/************** Table C++ Functions Source Code File (.CPP) ************/
|
/************** Table C++ Functions Source Code File (.CPP) ************/
|
||||||
/* Name: TABLE.CPP Version 2.7 */
|
/* Name: TABLE.CPP Version 2.7 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 1999-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the TBX, TDB and OPJOIN classes functions. */
|
/* This file contains the TBX, TDB and OPJOIN classes functions. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -74,7 +74,7 @@ TDB::TDB(PTDB tdbp) : Tdb_No(++Tnum)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* RowNumber: returns the current row ordinal number. */
|
/* RowNumber: returns the current row ordinal number. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDB::RowNumber(PGLOBAL g, bool b)
|
int TDB::RowNumber(PGLOBAL g, bool)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(ROWID_NOT_IMPL), GetAmName(g, GetAmType()));
|
sprintf(g->Message, MSG(ROWID_NOT_IMPL), GetAmName(g, GetAmType()));
|
||||||
return 0;
|
return 0;
|
||||||
@@ -122,7 +122,7 @@ void TDB::Print(PGLOBAL g, FILE *f, uint n)
|
|||||||
|
|
||||||
} // end of Print
|
} // end of Print
|
||||||
|
|
||||||
void TDB::Print(PGLOBAL g, char *ps, uint z)
|
void TDB::Print(PGLOBAL, char *ps, uint)
|
||||||
{
|
{
|
||||||
sprintf(ps, "R%d.%s", Tdb_No, Name);
|
sprintf(ps, "R%d.%s", Tdb_No, Name);
|
||||||
} // end of Print
|
} // end of Print
|
||||||
@@ -263,7 +263,7 @@ PCOL TDBASE::ColDB(PGLOBAL g, PSZ name, int num)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PCOL TDBASE::InsertSpecialColumn(PGLOBAL g, PCOL colp)
|
PCOL TDBASE::InsertSpecialColumn(PCOL colp)
|
||||||
{
|
{
|
||||||
if (!colp->IsSpecial())
|
if (!colp->IsSpecial())
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -327,7 +327,7 @@ PCOL TDBASE::InsertSpcBlk(PGLOBAL g, PCOLDEF cdp)
|
|||||||
return NULL;
|
return NULL;
|
||||||
} // endif's name
|
} // endif's name
|
||||||
|
|
||||||
if (!(colp = InsertSpecialColumn(g, colp))) {
|
if (!(colp = InsertSpecialColumn(colp))) {
|
||||||
sprintf(g->Message, MSG(BAD_SPECIAL_COL), name);
|
sprintf(g->Message, MSG(BAD_SPECIAL_COL), name);
|
||||||
return NULL;
|
return NULL;
|
||||||
} // endif Insert
|
} // endif Insert
|
||||||
@@ -338,7 +338,7 @@ PCOL TDBASE::InsertSpcBlk(PGLOBAL g, PCOLDEF cdp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ResetTableOpt: Wrong for this table type. */
|
/* ResetTableOpt: Wrong for this table type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBASE::ResetTableOpt(PGLOBAL g, bool dop, bool dox)
|
int TDBASE::ResetTableOpt(PGLOBAL g, bool, bool)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, "This table is not indexable");
|
strcpy(g->Message, "This table is not indexable");
|
||||||
return RC_INFO;
|
return RC_INFO;
|
||||||
@@ -365,7 +365,7 @@ void TDBASE::ResetKindex(PGLOBAL g, PKXBASE kxp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* SetRecpos: Replace the table at the specified position. */
|
/* SetRecpos: Replace the table at the specified position. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBASE::SetRecpos(PGLOBAL g, int recpos)
|
bool TDBASE::SetRecpos(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, MSG(SETRECPOS_NIY));
|
strcpy(g->Message, MSG(SETRECPOS_NIY));
|
||||||
return true;
|
return true;
|
||||||
@@ -386,7 +386,7 @@ void TDBASE::PrintAM(FILE *f, char *m)
|
|||||||
/* Two questions here: exact meaning of U_J_INT ? */
|
/* Two questions here: exact meaning of U_J_INT ? */
|
||||||
/* Why is the eventual reference to To_Key_Col not marked U_J_EXT ? */
|
/* Why is the eventual reference to To_Key_Col not marked U_J_EXT ? */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void TDBASE::MarkDB(PGLOBAL g, PTDB tdb2)
|
void TDBASE::MarkDB(PGLOBAL, PTDB tdb2)
|
||||||
{
|
{
|
||||||
if (trace)
|
if (trace)
|
||||||
htrc("DOS MarkDB: tdbp=%p tdb2=%p\n", this, tdb2);
|
htrc("DOS MarkDB: tdbp=%p tdb2=%p\n", this, tdb2);
|
||||||
@@ -453,7 +453,7 @@ bool TDBCAT::Initialize(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* CAT: Get the number of properties. */
|
/* CAT: Get the number of properties. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBCAT::GetMaxSize(PGLOBAL g)
|
int TDBCAT::GetMaxSize(PGLOBAL g __attribute__((unused)))
|
||||||
{
|
{
|
||||||
if (MaxSize < 0) {
|
if (MaxSize < 0) {
|
||||||
// if (Initialize(g))
|
// if (Initialize(g))
|
||||||
@@ -528,7 +528,7 @@ bool TDBCAT::InitCol(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* SetRecpos: Replace the table at the specified position. */
|
/* SetRecpos: Replace the table at the specified position. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBCAT::SetRecpos(PGLOBAL g, int recpos)
|
bool TDBCAT::SetRecpos(PGLOBAL, int recpos)
|
||||||
{
|
{
|
||||||
N = recpos - 1;
|
N = recpos - 1;
|
||||||
return false;
|
return false;
|
||||||
@@ -537,7 +537,7 @@ bool TDBCAT::SetRecpos(PGLOBAL g, int recpos)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base read routine for CAT access method. */
|
/* Data Base read routine for CAT access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBCAT::ReadDB(PGLOBAL g)
|
int TDBCAT::ReadDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
return (++N < Qrp->Nblin) ? RC_OK : RC_EF;
|
return (++N < Qrp->Nblin) ? RC_OK : RC_EF;
|
||||||
} // end of ReadDB
|
} // end of ReadDB
|
||||||
@@ -554,7 +554,7 @@ int TDBCAT::WriteDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base delete line routine for CAT access methods. */
|
/* Data Base delete line routine for CAT access methods. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBCAT::DeleteDB(PGLOBAL g, int irc)
|
int TDBCAT::DeleteDB(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, "Delete not enabled for CAT tables");
|
strcpy(g->Message, "Delete not enabled for CAT tables");
|
||||||
return RC_FX;
|
return RC_FX;
|
||||||
@@ -563,7 +563,7 @@ int TDBCAT::DeleteDB(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base close routine for WMI access method. */
|
/* Data Base close routine for WMI access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void TDBCAT::CloseDB(PGLOBAL g)
|
void TDBCAT::CloseDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
// Nothing to do
|
// Nothing to do
|
||||||
} // end of CloseDB
|
} // end of CloseDB
|
||||||
@@ -584,7 +584,7 @@ CATCOL::CATCOL(PCOLDEF cdp, PTDB tdbp, int n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Read the next Data Source elements. */
|
/* Read the next Data Source elements. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void CATCOL::ReadColumn(PGLOBAL g)
|
void CATCOL::ReadColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
// Get the value of the Name or Description property
|
// Get the value of the Name or Description property
|
||||||
if (Crp->Kdata)
|
if (Crp->Kdata)
|
||||||
|
@@ -561,7 +561,7 @@ int TDBMUL::WriteDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base delete line routine for MUL access method. */
|
/* Data Base delete line routine for MUL access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBMUL::DeleteDB(PGLOBAL g, int irc)
|
int TDBMUL::DeleteDB(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
// When implementing DELETE_MODE InitFileNames must be updated to
|
// When implementing DELETE_MODE InitFileNames must be updated to
|
||||||
// eliminate CRLF under Windows if the file is read in binary.
|
// eliminate CRLF under Windows if the file is read in binary.
|
||||||
@@ -586,7 +586,7 @@ void TDBMUL::CloseDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DefineAM: define specific AM block values from XDB file. */
|
/* DefineAM: define specific AM block values from XDB file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool DIRDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool DIRDEF::DefineAM(PGLOBAL g, LPCSTR, int)
|
||||||
{
|
{
|
||||||
Desc = Fn = GetStringCatInfo(g, "Filename", NULL);
|
Desc = Fn = GetStringCatInfo(g, "Filename", NULL);
|
||||||
Incl = (GetIntCatInfo("Subdir", 0) != 0);
|
Incl = (GetIntCatInfo("Subdir", 0) != 0);
|
||||||
@@ -597,7 +597,7 @@ bool DIRDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new Table Description Block. */
|
/* GetTable: makes a new Table Description Block. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB DIRDEF::GetTable(PGLOBAL g, MODE m)
|
PTDB DIRDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
if (Huge)
|
if (Huge)
|
||||||
@@ -865,7 +865,7 @@ int TDBDIR::WriteDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base delete line routine for DIR access method. */
|
/* Data Base delete line routine for DIR access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBDIR::DeleteDB(PGLOBAL g, int irc)
|
int TDBDIR::DeleteDB(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, MSG(TABDIR_READONLY));
|
strcpy(g->Message, MSG(TABDIR_READONLY));
|
||||||
return RC_FX; // NIY
|
return RC_FX; // NIY
|
||||||
@@ -874,7 +874,7 @@ int TDBDIR::DeleteDB(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base close routine for MUL access method. */
|
/* Data Base close routine for MUL access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void TDBDIR::CloseDB(PGLOBAL g)
|
void TDBDIR::CloseDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
// Close the search handle.
|
// Close the search handle.
|
||||||
@@ -895,7 +895,7 @@ void TDBDIR::CloseDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DIRCOL public constructor. */
|
/* DIRCOL public constructor. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
DIRCOL::DIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am)
|
DIRCOL::DIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ)
|
||||||
: COLBLK(cdp, tdbp, i)
|
: COLBLK(cdp, tdbp, i)
|
||||||
{
|
{
|
||||||
if (cprec) {
|
if (cprec) {
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* AUTHOR: */
|
/* AUTHOR: */
|
||||||
/* ------- */
|
/* ------- */
|
||||||
/* Olivier BERTRAND 2007-2014 */
|
/* Olivier BERTRAND 2007-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -307,7 +307,7 @@ bool MYSQLDEF::ParseURL(PGLOBAL g, char *url, bool b)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DefineAM: define specific AM block values from XCV file. */
|
/* DefineAM: define specific AM block values from XCV file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int)
|
||||||
{
|
{
|
||||||
char *url;
|
char *url;
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new TDB of the proper type. */
|
/* GetTable: makes a new TDB of the proper type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB MYSQLDEF::GetTable(PGLOBAL g, MODE m)
|
PTDB MYSQLDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
if (Xsrc)
|
if (Xsrc)
|
||||||
return new(g) TDBMYEXC(this);
|
return new(g) TDBMYEXC(this);
|
||||||
@@ -438,7 +438,7 @@ TDBMYSQL::TDBMYSQL(PMYDEF tdp) : TDBASE(tdp)
|
|||||||
Nparm = 0;
|
Nparm = 0;
|
||||||
} // end of TDBMYSQL constructor
|
} // end of TDBMYSQL constructor
|
||||||
|
|
||||||
TDBMYSQL::TDBMYSQL(PGLOBAL g, PTDBMY tdbp) : TDBASE(tdbp)
|
TDBMYSQL::TDBMYSQL(PTDBMY tdbp) : TDBASE(tdbp)
|
||||||
{
|
{
|
||||||
Host = tdbp->Host;
|
Host = tdbp->Host;
|
||||||
Database = tdbp->Database;
|
Database = tdbp->Database;
|
||||||
@@ -468,7 +468,7 @@ PTDB TDBMYSQL::CopyOne(PTABS t)
|
|||||||
PCOL cp1, cp2;
|
PCOL cp1, cp2;
|
||||||
PGLOBAL g = t->G;
|
PGLOBAL g = t->G;
|
||||||
|
|
||||||
tp = new(g) TDBMYSQL(g, this);
|
tp = new(g) TDBMYSQL(this);
|
||||||
|
|
||||||
for (cp1 = Columns; cp1; cp1 = cp1->GetNext()) {
|
for (cp1 = Columns; cp1; cp1 = cp1->GetNext()) {
|
||||||
cp2 = new(g) MYSQLCOL((PMYCOL)cp1, tp);
|
cp2 = new(g) MYSQLCOL((PMYCOL)cp1, tp);
|
||||||
@@ -816,7 +816,7 @@ int TDBMYSQL::GetMaxSize(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* This a fake routine as ROWID does not exist in MySQL. */
|
/* This a fake routine as ROWID does not exist in MySQL. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBMYSQL::RowNumber(PGLOBAL g, bool b)
|
int TDBMYSQL::RowNumber(PGLOBAL, bool)
|
||||||
{
|
{
|
||||||
return N + 1;
|
return N + 1;
|
||||||
} // end of RowNumber
|
} // end of RowNumber
|
||||||
@@ -832,7 +832,7 @@ int TDBMYSQL::GetProgMax(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* MySQL Bind Parameter function. */
|
/* MySQL Bind Parameter function. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBMYSQL::BindColumns(PGLOBAL g)
|
int TDBMYSQL::BindColumns(PGLOBAL g __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#if defined(MYSQL_PREPARED_STATEMENTS)
|
#if defined(MYSQL_PREPARED_STATEMENTS)
|
||||||
if (Prep) {
|
if (Prep) {
|
||||||
@@ -1425,7 +1425,7 @@ void MYSQLCOL::ReadColumn(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* WriteColumn: make sure the bind buffer is updated. */
|
/* WriteColumn: make sure the bind buffer is updated. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void MYSQLCOL::WriteColumn(PGLOBAL g)
|
void MYSQLCOL::WriteColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Do convert the column value if necessary. */
|
/* Do convert the column value if necessary. */
|
||||||
@@ -1463,7 +1463,7 @@ TDBMYEXC::TDBMYEXC(PMYDEF tdp) : TDBMYSQL(tdp)
|
|||||||
Nerr = 0;
|
Nerr = 0;
|
||||||
} // end of TDBMYEXC constructor
|
} // end of TDBMYEXC constructor
|
||||||
|
|
||||||
TDBMYEXC::TDBMYEXC(PGLOBAL g, PTDBMYX tdbp) : TDBMYSQL(g, tdbp)
|
TDBMYEXC::TDBMYEXC(PTDBMYX tdbp) : TDBMYSQL(tdbp)
|
||||||
{
|
{
|
||||||
Cmdlist = tdbp->Cmdlist;
|
Cmdlist = tdbp->Cmdlist;
|
||||||
Cmdcol = tdbp->Cmdcol;
|
Cmdcol = tdbp->Cmdcol;
|
||||||
@@ -1481,7 +1481,7 @@ PTDB TDBMYEXC::CopyOne(PTABS t)
|
|||||||
PCOL cp1, cp2;
|
PCOL cp1, cp2;
|
||||||
PGLOBAL g = t->G;
|
PGLOBAL g = t->G;
|
||||||
|
|
||||||
tp = new(g) TDBMYEXC(g, this);
|
tp = new(g) TDBMYEXC(this);
|
||||||
|
|
||||||
for (cp1 = Columns; cp1; cp1 = cp1->GetNext()) {
|
for (cp1 = Columns; cp1; cp1 = cp1->GetNext()) {
|
||||||
cp2 = new(g) MYXCOL((PMYXCOL)cp1, tp);
|
cp2 = new(g) MYXCOL((PMYXCOL)cp1, tp);
|
||||||
@@ -1534,7 +1534,7 @@ PCMD TDBMYEXC::MakeCMD(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* EXC GetMaxSize: returns the maximum number of rows in the table. */
|
/* EXC GetMaxSize: returns the maximum number of rows in the table. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBMYEXC::GetMaxSize(PGLOBAL g)
|
int TDBMYEXC::GetMaxSize(PGLOBAL)
|
||||||
{
|
{
|
||||||
if (MaxSize < 0) {
|
if (MaxSize < 0) {
|
||||||
MaxSize = 10; // a guess
|
MaxSize = 10; // a guess
|
||||||
@@ -1711,7 +1711,7 @@ void MYXCOL::ReadColumn(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* WriteColumn: should never be called. */
|
/* WriteColumn: should never be called. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void MYXCOL::WriteColumn(PGLOBAL g)
|
void MYXCOL::WriteColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
assert(false);
|
assert(false);
|
||||||
} // end of WriteColumn
|
} // end of WriteColumn
|
||||||
|
@@ -73,11 +73,11 @@ class TDBMYSQL : public TDBASE {
|
|||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
TDBMYSQL(PMYDEF tdp);
|
TDBMYSQL(PMYDEF tdp);
|
||||||
TDBMYSQL(PGLOBAL g, PTDBMY tdbp);
|
TDBMYSQL(PTDBMY tdbp);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual AMT GetAmType(void) {return TYPE_AM_MYSQL;}
|
virtual AMT GetAmType(void) {return TYPE_AM_MYSQL;}
|
||||||
virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYSQL(g, this);}
|
virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYSQL(this);}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual PTDB CopyOne(PTABS t);
|
virtual PTDB CopyOne(PTABS t);
|
||||||
@@ -180,11 +180,11 @@ class TDBMYEXC : public TDBMYSQL {
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
TDBMYEXC(PMYDEF tdp);
|
TDBMYEXC(PMYDEF tdp);
|
||||||
TDBMYEXC(PGLOBAL g, PTDBMYX tdbp);
|
TDBMYEXC(PTDBMYX tdbp);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual AMT GetAmType(void) {return TYPE_AM_MYX;}
|
virtual AMT GetAmType(void) {return TYPE_AM_MYX;}
|
||||||
virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYEXC(g, this);}
|
virtual PTDB Duplicate(PGLOBAL g) {return (PTDB)new(g) TDBMYEXC(this);}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual PTDB CopyOne(PTABS t);
|
virtual PTDB CopyOne(PTABS t);
|
||||||
|
@@ -266,7 +266,7 @@ bool OCCURDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new TDB of the proper type. */
|
/* GetTable: makes a new TDB of the proper type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB OCCURDEF::GetTable(PGLOBAL g, MODE m)
|
PTDB OCCURDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
if (Catfunc != FNC_COL)
|
if (Catfunc != FNC_COL)
|
||||||
return new(g) TDBOCCUR(this);
|
return new(g) TDBOCCUR(this);
|
||||||
@@ -432,7 +432,7 @@ int TDBOCCUR::GetMaxSize(PGLOBAL g)
|
|||||||
/* In this sample, ROWID will be the (virtual) row number, */
|
/* In this sample, ROWID will be the (virtual) row number, */
|
||||||
/* while ROWNUM will be the occurence rank in the multiple column. */
|
/* while ROWNUM will be the occurence rank in the multiple column. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBOCCUR::RowNumber(PGLOBAL g, bool b)
|
int TDBOCCUR::RowNumber(PGLOBAL, bool b)
|
||||||
{
|
{
|
||||||
return (b) ? M : N;
|
return (b) ? M : N;
|
||||||
} // end of RowNumber
|
} // end of RowNumber
|
||||||
@@ -567,7 +567,7 @@ void OCCURCOL::ReadColumn(PGLOBAL g)
|
|||||||
/* ReadColumn: what this routine does is to access the Mth columns of */
|
/* ReadColumn: what this routine does is to access the Mth columns of */
|
||||||
/* list, extract its name and set to it the rank column value. */
|
/* list, extract its name and set to it the rank column value. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void RANKCOL::ReadColumn(PGLOBAL g)
|
void RANKCOL::ReadColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
PTDBOCCUR tdbp = (PTDBOCCUR)To_Tdb;
|
PTDBOCCUR tdbp = (PTDBOCCUR)To_Tdb;
|
||||||
PCOL *col = tdbp->Col;
|
PCOL *col = tdbp->Col;
|
||||||
|
@@ -376,7 +376,7 @@ bool PIVOTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new TDB of the proper type. */
|
/* GetTable: makes a new TDB of the proper type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB PIVOTDEF::GetTable(PGLOBAL g, MODE m)
|
PTDB PIVOTDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
return new(g) TDBPIVOT(this);
|
return new(g) TDBPIVOT(this);
|
||||||
} // end of GetTable
|
} // end of GetTable
|
||||||
@@ -634,7 +634,7 @@ bool TDBPIVOT::MakeViewColumns(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* PIVOT GetMaxSize: returns the maximum number of rows in the table. */
|
/* PIVOT GetMaxSize: returns the maximum number of rows in the table. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBPIVOT::GetMaxSize(PGLOBAL g)
|
int TDBPIVOT::GetMaxSize(PGLOBAL g __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
if (MaxSize < 0)
|
if (MaxSize < 0)
|
||||||
@@ -649,7 +649,7 @@ int TDBPIVOT::GetMaxSize(PGLOBAL g)
|
|||||||
/* In this sample, ROWID will be the (virtual) row number, */
|
/* In this sample, ROWID will be the (virtual) row number, */
|
||||||
/* while ROWNUM will be the occurence rank in the multiple column. */
|
/* while ROWNUM will be the occurence rank in the multiple column. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBPIVOT::RowNumber(PGLOBAL g, bool b)
|
int TDBPIVOT::RowNumber(PGLOBAL, bool b)
|
||||||
{
|
{
|
||||||
return (b) ? M : N;
|
return (b) ? M : N;
|
||||||
} // end of RowNumber
|
} // end of RowNumber
|
||||||
@@ -806,7 +806,7 @@ int TDBPIVOT::WriteDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base delete line routine for PIVOT access methods. */
|
/* Data Base delete line routine for PIVOT access methods. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBPIVOT::DeleteDB(PGLOBAL g, int irc)
|
int TDBPIVOT::DeleteDB(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(NO_TABLE_DEL), "PIVOT");
|
sprintf(g->Message, MSG(NO_TABLE_DEL), "PIVOT");
|
||||||
return RC_FX;
|
return RC_FX;
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
/* ------------- */
|
/* ------------- */
|
||||||
/* Version 2.3 */
|
/* Version 2.3 */
|
||||||
/* */
|
/* */
|
||||||
/* Author Olivier BERTRAND 2004-2014 */
|
/* Author Olivier BERTRAND 2004-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This program are the INI/CFG tables classes. */
|
/* This program are the INI/CFG tables classes. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -70,7 +70,7 @@ INIDEF::INIDEF(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DefineAM: define specific AM block values from XDB file. */
|
/* DefineAM: define specific AM block values from XDB file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool INIDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool INIDEF::DefineAM(PGLOBAL g, LPCSTR, int)
|
||||||
{
|
{
|
||||||
char buf[8];
|
char buf[8];
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ bool INIDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new TDB of the proper type. */
|
/* GetTable: makes a new TDB of the proper type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB INIDEF::GetTable(PGLOBAL g, MODE m)
|
PTDB INIDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
PTDBASE tdbp;
|
PTDBASE tdbp;
|
||||||
|
|
||||||
@@ -277,49 +277,27 @@ bool TDBINI::OpenDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base read routine for INI access method. */
|
/* Data Base read routine for INI access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBINI::ReadDB(PGLOBAL g)
|
int TDBINI::ReadDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Now start the pseudo reading process. */
|
/* Now start the pseudo reading process. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
#if 0 // INI tables are not indexable
|
if (!Section)
|
||||||
if (To_Kindex) {
|
Section = Seclist;
|
||||||
/*******************************************************************/
|
else
|
||||||
/* Reading is by an index table. */
|
Section += (strlen(Section) + 1);
|
||||||
/*******************************************************************/
|
|
||||||
int recpos = To_Kindex->Fetch(g);
|
|
||||||
|
|
||||||
switch (recpos) {
|
if (trace > 1)
|
||||||
case -1: // End of file reached
|
htrc("INI ReadDB: section=%s N=%d\n", Section, N);
|
||||||
return RC_EF;
|
|
||||||
case -2: // No match for join
|
|
||||||
return RC_NF;
|
|
||||||
case -3: // Same record as last non null one
|
|
||||||
return RC_OK;
|
|
||||||
default:
|
|
||||||
Section = (char*)recpos; // No good on 64 bit machines
|
|
||||||
} // endswitch recpos
|
|
||||||
|
|
||||||
} else {
|
|
||||||
#endif // 0
|
|
||||||
if (!Section)
|
|
||||||
Section = Seclist;
|
|
||||||
else
|
|
||||||
Section += (strlen(Section) + 1);
|
|
||||||
|
|
||||||
if (trace > 1)
|
|
||||||
htrc("INI ReadDB: section=%s N=%d\n", Section, N);
|
|
||||||
|
|
||||||
N++;
|
|
||||||
//} // endif To_Kindex
|
|
||||||
|
|
||||||
|
N++;
|
||||||
return (*Section) ? RC_OK : RC_EF;
|
return (*Section) ? RC_OK : RC_EF;
|
||||||
} // end of ReadDB
|
} // end of ReadDB
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* WriteDB: Data Base write routine for INI access methods. */
|
/* WriteDB: Data Base write routine for INI access methods. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBINI::WriteDB(PGLOBAL g)
|
int TDBINI::WriteDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
// This is to check that section name was given when inserting
|
// This is to check that section name was given when inserting
|
||||||
if (Mode == MODE_INSERT)
|
if (Mode == MODE_INSERT)
|
||||||
@@ -365,7 +343,7 @@ int TDBINI::DeleteDB(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base close routine for INI access methods. */
|
/* Data Base close routine for INI access methods. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void TDBINI::CloseDB(PGLOBAL g)
|
void TDBINI::CloseDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
#if !defined(WIN32)
|
#if !defined(WIN32)
|
||||||
PROFILE_Close(Ifile);
|
PROFILE_Close(Ifile);
|
||||||
@@ -377,7 +355,7 @@ void TDBINI::CloseDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* INICOL public constructor. */
|
/* INICOL public constructor. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
INICOL::INICOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am)
|
INICOL::INICOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ)
|
||||||
: COLBLK(cdp, tdbp, i)
|
: COLBLK(cdp, tdbp, i)
|
||||||
{
|
{
|
||||||
if (cprec) {
|
if (cprec) {
|
||||||
@@ -471,7 +449,7 @@ bool INICOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check)
|
|||||||
/* from the corresponding section, extract from it the key value */
|
/* from the corresponding section, extract from it the key value */
|
||||||
/* corresponding to this column name and convert it to buffer type. */
|
/* corresponding to this column name and convert it to buffer type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void INICOL::ReadColumn(PGLOBAL g)
|
void INICOL::ReadColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
PTDBINI tdbp = (PTDBINI)To_Tdb;
|
PTDBINI tdbp = (PTDBINI)To_Tdb;
|
||||||
|
|
||||||
@@ -747,7 +725,7 @@ int TDBXIN::ReadDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* WriteDB: Data Base write routine for XIN access methods. */
|
/* WriteDB: Data Base write routine for XIN access methods. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBXIN::WriteDB(PGLOBAL g)
|
int TDBXIN::WriteDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
// To check that section and key names were given when inserting
|
// To check that section and key names were given when inserting
|
||||||
if (Mode == MODE_INSERT) {
|
if (Mode == MODE_INSERT) {
|
||||||
@@ -809,7 +787,7 @@ XINCOL::XINCOL(XINCOL *col1, PTDB tdbp) : INICOL(col1, tdbp)
|
|||||||
/* from the corresponding section, extract from it the key value */
|
/* from the corresponding section, extract from it the key value */
|
||||||
/* corresponding to this column name and convert it to buffer type. */
|
/* corresponding to this column name and convert it to buffer type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void XINCOL::ReadColumn(PGLOBAL g)
|
void XINCOL::ReadColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
PTDBXIN tdbp = (PTDBXIN)To_Tdb;
|
PTDBXIN tdbp = (PTDBXIN)To_Tdb;
|
||||||
|
|
||||||
|
@@ -101,7 +101,7 @@ TBLDEF::TBLDEF(void)
|
|||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
/* DefineAM: define specific AM block values from XDB file. */
|
/* DefineAM: define specific AM block values from XDB file. */
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR, int)
|
||||||
{
|
{
|
||||||
char *tablist, *dbname, *def = NULL;
|
char *tablist, *dbname, *def = NULL;
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ bool TBLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new Table Description Block. */
|
/* GetTable: makes a new Table Description Block. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB TBLDEF::GetTable(PGLOBAL g, MODE m)
|
PTDB TBLDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
if (Catfunc == FNC_COL)
|
if (Catfunc == FNC_COL)
|
||||||
return new(g) TDBTBC(this);
|
return new(g) TDBTBC(this);
|
||||||
@@ -202,7 +202,7 @@ PCOL TDBTBL::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PCOL TDBTBL::InsertSpecialColumn(PGLOBAL g, PCOL scp)
|
PCOL TDBTBL::InsertSpecialColumn(PCOL scp)
|
||||||
{
|
{
|
||||||
PCOL colp;
|
PCOL colp;
|
||||||
|
|
||||||
@@ -548,7 +548,7 @@ int TDBTBL::ReadDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ReadColumn: */
|
/* ReadColumn: */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void TBTBLK::ReadColumn(PGLOBAL g)
|
void TBTBLK::ReadColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
if (trace)
|
if (trace)
|
||||||
htrc("TBT ReadColumn: name=%s\n", Name);
|
htrc("TBT ReadColumn: name=%s\n", Name);
|
||||||
|
@@ -81,7 +81,7 @@ class DllExport TDBTBL : public TDBPRX {
|
|||||||
virtual int Cardinality(PGLOBAL g);
|
virtual int Cardinality(PGLOBAL g);
|
||||||
virtual int GetMaxSize(PGLOBAL g);
|
virtual int GetMaxSize(PGLOBAL g);
|
||||||
virtual int RowNumber(PGLOBAL g, bool b = FALSE);
|
virtual int RowNumber(PGLOBAL g, bool b = FALSE);
|
||||||
virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL scp);
|
virtual PCOL InsertSpecialColumn(PCOL scp);
|
||||||
virtual bool OpenDB(PGLOBAL g);
|
virtual bool OpenDB(PGLOBAL g);
|
||||||
virtual int ReadDB(PGLOBAL g);
|
virtual int ReadDB(PGLOBAL g);
|
||||||
|
|
||||||
|
@@ -292,7 +292,7 @@ PRXDEF::PRXDEF(void)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DefineAM: define specific AM block values from XCOL file. */
|
/* DefineAM: define specific AM block values from XCOL file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool PRXDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool PRXDEF::DefineAM(PGLOBAL g, LPCSTR, int)
|
||||||
{
|
{
|
||||||
char *pn, *db, *tab, *def = NULL;
|
char *pn, *db, *tab, *def = NULL;
|
||||||
|
|
||||||
@@ -322,7 +322,7 @@ bool PRXDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new TDB of the proper type. */
|
/* GetTable: makes a new TDB of the proper type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB PRXDEF::GetTable(PGLOBAL g, MODE mode)
|
PTDB PRXDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
if (Catfunc == FNC_COL)
|
if (Catfunc == FNC_COL)
|
||||||
return new(g) TDBTBC(this);
|
return new(g) TDBTBC(this);
|
||||||
@@ -341,7 +341,7 @@ TDBPRX::TDBPRX(PPRXDEF tdp) : TDBASE(tdp)
|
|||||||
Tdbp = NULL; // The object table
|
Tdbp = NULL; // The object table
|
||||||
} // end of TDBPRX constructor
|
} // end of TDBPRX constructor
|
||||||
|
|
||||||
TDBPRX::TDBPRX(PGLOBAL g, PTDBPRX tdbp) : TDBASE(tdbp)
|
TDBPRX::TDBPRX(PTDBPRX tdbp) : TDBASE(tdbp)
|
||||||
{
|
{
|
||||||
Tdbp = tdbp->Tdbp;
|
Tdbp = tdbp->Tdbp;
|
||||||
} // end of TDBPRX copy constructor
|
} // end of TDBPRX copy constructor
|
||||||
@@ -353,7 +353,7 @@ PTDB TDBPRX::CopyOne(PTABS t)
|
|||||||
PPRXCOL cp1, cp2;
|
PPRXCOL cp1, cp2;
|
||||||
PGLOBAL g = t->G;
|
PGLOBAL g = t->G;
|
||||||
|
|
||||||
tp = new(g) TDBPRX(g, this);
|
tp = new(g) TDBPRX(this);
|
||||||
|
|
||||||
for (cp1 = (PPRXCOL)Columns; cp1; cp1 = (PPRXCOL)cp1->GetNext()) {
|
for (cp1 = (PPRXCOL)Columns; cp1; cp1 = (PPRXCOL)cp1->GetNext()) {
|
||||||
cp2 = new(g) PRXCOL(cp1, tp); // Make a copy
|
cp2 = new(g) PRXCOL(cp1, tp); // Make a copy
|
||||||
|
@@ -59,12 +59,12 @@ class DllExport TDBPRX : public TDBASE {
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
TDBPRX(PPRXDEF tdp);
|
TDBPRX(PPRXDEF tdp);
|
||||||
TDBPRX(PGLOBAL g, PTDBPRX tdbp);
|
TDBPRX(PTDBPRX tdbp);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual AMT GetAmType(void) {return TYPE_AM_PRX;}
|
virtual AMT GetAmType(void) {return TYPE_AM_PRX;}
|
||||||
virtual PTDB Duplicate(PGLOBAL g)
|
virtual PTDB Duplicate(PGLOBAL g)
|
||||||
{return (PTDB)new(g) TDBPRX(g, this);}
|
{return (PTDB)new(g) TDBPRX(this);}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual PTDB CopyOne(PTABS t);
|
virtual PTDB CopyOne(PTABS t);
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT: */
|
/* COPYRIGHT: */
|
||||||
/* ---------- */
|
/* ---------- */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 1999-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 1999-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* WHAT THIS PROGRAM DOES: */
|
/* WHAT THIS PROGRAM DOES: */
|
||||||
/* ----------------------- */
|
/* ----------------------- */
|
||||||
@@ -94,7 +94,7 @@ PVBLK AllocValBlock(PGLOBAL, void *, int, int, int, int,
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DefineAM: define specific AM block values from XDB file. */
|
/* DefineAM: define specific AM block values from XDB file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VCTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool VCTDEF::DefineAM(PGLOBAL g, LPCSTR, int poff)
|
||||||
{
|
{
|
||||||
DOSDEF::DefineAM(g, "BIN", poff);
|
DOSDEF::DefineAM(g, "BIN", poff);
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ PCOL TDBVCT::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* VEC tables are not ready yet to use temporary files. */
|
/* VEC tables are not ready yet to use temporary files. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TDBVCT::IsUsingTemp(PGLOBAL g)
|
bool TDBVCT::IsUsingTemp(PGLOBAL)
|
||||||
{
|
{
|
||||||
// For developpers
|
// For developpers
|
||||||
return (UseTemp() == TMP_TEST);
|
return (UseTemp() == TMP_TEST);
|
||||||
@@ -570,7 +570,7 @@ void VCTCOL::ReadColumn(PGLOBAL g)
|
|||||||
/* On each change of block the buffer is written back to file and */
|
/* On each change of block the buffer is written back to file and */
|
||||||
/* in mode Insert the buffer is filled with the block to update. */
|
/* in mode Insert the buffer is filled with the block to update. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void VCTCOL::WriteColumn(PGLOBAL g)
|
void VCTCOL::WriteColumn(PGLOBAL)
|
||||||
{
|
{
|
||||||
PTXF txfp = ((PTDBVCT)To_Tdb)->Txfp;;
|
PTXF txfp = ((PTDBVCT)To_Tdb)->Txfp;;
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Return the unique column definition to MariaDB. */
|
/* Return the unique column definition to MariaDB. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info)
|
PQRYRES VirColumns(PGLOBAL g, bool info)
|
||||||
{
|
{
|
||||||
int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING,
|
int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING,
|
||||||
TYPE_INT, TYPE_STRING, TYPE_STRING};
|
TYPE_INT, TYPE_STRING, TYPE_STRING};
|
||||||
@@ -95,7 +95,7 @@ PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new Table Description Block. */
|
/* GetTable: makes a new Table Description Block. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB VIRDEF::GetTable(PGLOBAL g, MODE m)
|
PTDB VIRDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
// Column blocks will be allocated only when needed.
|
// Column blocks will be allocated only when needed.
|
||||||
if (Catfunc == FNC_COL)
|
if (Catfunc == FNC_COL)
|
||||||
@@ -241,7 +241,7 @@ bool TDBVIR::OpenDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base read routine for the VIR access method. */
|
/* Data Base read routine for the VIR access method. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBVIR::ReadDB(PGLOBAL g)
|
int TDBVIR::ReadDB(PGLOBAL)
|
||||||
{
|
{
|
||||||
return (++N >= Size) ? RC_EF : RC_OK;
|
return (++N >= Size) ? RC_EF : RC_OK;
|
||||||
} // end of ReadDB
|
} // end of ReadDB
|
||||||
@@ -258,7 +258,7 @@ int TDBVIR::WriteDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Data Base delete line routine for the VIR access methods. */
|
/* Data Base delete line routine for the VIR access methods. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBVIR::DeleteDB(PGLOBAL g, int irc)
|
int TDBVIR::DeleteDB(PGLOBAL g, int)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(VIR_NO_DELETE), To_Def->GetType());
|
sprintf(g->Message, MSG(VIR_NO_DELETE), To_Def->GetType());
|
||||||
return RC_FX;
|
return RC_FX;
|
||||||
@@ -269,7 +269,7 @@ int TDBVIR::DeleteDB(PGLOBAL g, int irc)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* VIRCOL public constructor. */
|
/* VIRCOL public constructor. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
VIRCOL::VIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am)
|
VIRCOL::VIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ)
|
||||||
: COLBLK(cdp, tdbp, i)
|
: COLBLK(cdp, tdbp, i)
|
||||||
{
|
{
|
||||||
if (cprec) {
|
if (cprec) {
|
||||||
@@ -299,7 +299,7 @@ void VIRCOL::ReadColumn(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PQRYRES TDBVICL::GetResult(PGLOBAL g)
|
PQRYRES TDBVICL::GetResult(PGLOBAL g)
|
||||||
{
|
{
|
||||||
return VirColumns(g, NULL, NULL, false);
|
return VirColumns(g, false);
|
||||||
} // end of GetResult
|
} // end of GetResult
|
||||||
|
|
||||||
/* ------------------------- End of Virtual -------------------------- */
|
/* ------------------------- End of Virtual -------------------------- */
|
||||||
|
@@ -11,7 +11,7 @@ typedef class TDBVIR *PTDBVIR;
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Return the unique column definition to MariaDB. */
|
/* Return the unique column definition to MariaDB. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info);
|
PQRYRES VirColumns(PGLOBAL g, bool info);
|
||||||
|
|
||||||
/* --------------------------- VIR classes --------------------------- */
|
/* --------------------------- VIR classes --------------------------- */
|
||||||
|
|
||||||
|
@@ -83,7 +83,7 @@ bool XCLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetTable: makes a new TDB of the proper type. */
|
/* GetTable: makes a new TDB of the proper type. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PTDB XCLDEF::GetTable(PGLOBAL g, MODE mode)
|
PTDB XCLDEF::GetTable(PGLOBAL g, MODE)
|
||||||
{
|
{
|
||||||
if (Catfunc == FNC_COL)
|
if (Catfunc == FNC_COL)
|
||||||
return new(g) TDBTBC(this);
|
return new(g) TDBTBC(this);
|
||||||
@@ -117,7 +117,7 @@ PCOL TDBXCL::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||||||
PCOL colp;
|
PCOL colp;
|
||||||
|
|
||||||
if (!stricmp(cdp->GetName(), Xcolumn)) {
|
if (!stricmp(cdp->GetName(), Xcolumn)) {
|
||||||
Xcolp = new(g) XCLCOL(g, cdp, this, cprec, n);
|
Xcolp = new(g) XCLCOL(cdp, this, cprec, n);
|
||||||
colp = Xcolp;
|
colp = Xcolp;
|
||||||
} else
|
} else
|
||||||
colp = new(g) PRXCOL(cdp, this, cprec, n);
|
colp = new(g) PRXCOL(cdp, this, cprec, n);
|
||||||
@@ -144,7 +144,7 @@ int TDBXCL::GetMaxSize(PGLOBAL g)
|
|||||||
/* For this table type, ROWID is the (virtual) row number, */
|
/* For this table type, ROWID is the (virtual) row number, */
|
||||||
/* while ROWNUM is be the occurence rank in the multiple column. */
|
/* while ROWNUM is be the occurence rank in the multiple column. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int TDBXCL::RowNumber(PGLOBAL g, bool b)
|
int TDBXCL::RowNumber(PGLOBAL, bool b)
|
||||||
{
|
{
|
||||||
return (b) ? M : N;
|
return (b) ? M : N;
|
||||||
} // end of RowNumber
|
} // end of RowNumber
|
||||||
@@ -232,7 +232,7 @@ int TDBXCL::ReadDB(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* XCLCOL public constructor. */
|
/* XCLCOL public constructor. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
XCLCOL::XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i)
|
XCLCOL::XCLCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i)
|
||||||
: PRXCOL(cdp, tdbp, cprec, i, "XCL")
|
: PRXCOL(cdp, tdbp, cprec, i, "XCL")
|
||||||
{
|
{
|
||||||
// Set additional XXL access method information for column.
|
// Set additional XXL access method information for column.
|
||||||
|
@@ -85,7 +85,7 @@ class XCLCOL : public PRXCOL {
|
|||||||
friend class TDBXCL;
|
friend class TDBXCL;
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i);
|
XCLCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
using PRXCOL::Init;
|
using PRXCOL::Init;
|
||||||
|
@@ -118,7 +118,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info)
|
|||||||
FLD_LENGTH, FLD_SCALE, FLD_NULL, FLD_FORMAT};
|
FLD_LENGTH, FLD_SCALE, FLD_NULL, FLD_FORMAT};
|
||||||
static unsigned int length[] = {0, 6, 8, 10, 10, 6, 6, 0};
|
static unsigned int length[] = {0, 6, 8, 10, 10, 6, 6, 0};
|
||||||
char *op, colname[65], fmt[129], buf[512];
|
char *op, colname[65], fmt[129], buf[512];
|
||||||
int i, j, lvl, rc, n = 0;
|
int i, j, lvl, n = 0;
|
||||||
int ncol = sizeof(buftyp) / sizeof(int);
|
int ncol = sizeof(buftyp) / sizeof(int);
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
PXCL xcol, xcp, fxcp = NULL, pxcp = NULL;
|
PXCL xcol, xcp, fxcp = NULL, pxcp = NULL;
|
||||||
@@ -164,7 +164,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info)
|
|||||||
txmp = new(g) TDBXML(tdp);
|
txmp = new(g) TDBXML(tdp);
|
||||||
|
|
||||||
if (txmp->Initialize(g))
|
if (txmp->Initialize(g))
|
||||||
return NULL;
|
goto err;
|
||||||
|
|
||||||
xcol = new(g) XMCOL;
|
xcol = new(g) XMCOL;
|
||||||
colname[64] = 0;
|
colname[64] = 0;
|
||||||
@@ -224,8 +224,16 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info)
|
|||||||
if (vp->atp) {
|
if (vp->atp) {
|
||||||
strncpy(colname, vp->atp->GetName(g), sizeof(colname));
|
strncpy(colname, vp->atp->GetName(g), sizeof(colname));
|
||||||
strncat(xcol->Name, colname, 64);
|
strncat(xcol->Name, colname, 64);
|
||||||
rc = vp->atp->GetText(g, buf, sizeof(buf));
|
|
||||||
strncat(fmt, "@", sizeof(fmt));
|
switch (vp->atp->GetText(g, buf, sizeof(buf))) {
|
||||||
|
case RC_INFO:
|
||||||
|
PushWarning(g, txmp);
|
||||||
|
case RC_OK:
|
||||||
|
strncat(fmt, "@", sizeof(fmt));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
goto err;
|
||||||
|
} // enswitch rc
|
||||||
|
|
||||||
if (j)
|
if (j)
|
||||||
strncat(fmt, colname, sizeof(fmt));
|
strncat(fmt, colname, sizeof(fmt));
|
||||||
@@ -273,7 +281,15 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info)
|
|||||||
} else
|
} else
|
||||||
ok = true;
|
ok = true;
|
||||||
|
|
||||||
rc = node->GetContent(g, buf, sizeof(buf));
|
switch (node->GetContent(g, buf, sizeof(buf))) {
|
||||||
|
case RC_INFO:
|
||||||
|
PushWarning(g, txmp);
|
||||||
|
case RC_OK:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
goto err;
|
||||||
|
} // enswitch rc
|
||||||
|
|
||||||
} // endif atp;
|
} // endif atp;
|
||||||
|
|
||||||
xcol->Len = strlen(buf);
|
xcol->Len = strlen(buf);
|
||||||
@@ -313,10 +329,6 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info)
|
|||||||
|
|
||||||
pxcp = xcp;
|
pxcp = xcp;
|
||||||
|
|
||||||
// for (j = lvl - 1; j >= 0; j--)
|
|
||||||
// if (jrp[j] && (jrp[j] = jrp[j]->GetNext()))
|
|
||||||
// goto more;
|
|
||||||
|
|
||||||
if (vp->atp)
|
if (vp->atp)
|
||||||
vp->atp = vp->atp->GetNext(g);
|
vp->atp = vp->atp->GetNext(g);
|
||||||
|
|
||||||
@@ -421,8 +433,6 @@ XMLDEF::XMLDEF(void)
|
|||||||
bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
||||||
{
|
{
|
||||||
char *defrow, *defcol, buf[10];
|
char *defrow, *defcol, buf[10];
|
||||||
//void *memp = Cat->GetDescp();
|
|
||||||
//PSZ dbfile = Cat->GetDescFile();
|
|
||||||
|
|
||||||
Fn = GetStringCatInfo(g, "Filename", NULL);
|
Fn = GetStringCatInfo(g, "Filename", NULL);
|
||||||
Encoding = GetStringCatInfo(g, "Encoding", "UTF-8");
|
Encoding = GetStringCatInfo(g, "Encoding", "UTF-8");
|
||||||
@@ -479,12 +489,6 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
Header = GetIntCatInfo("Header", 0);
|
Header = GetIntCatInfo("Header", 0);
|
||||||
GetCharCatInfo("Xmlsup", "*", buf, sizeof(buf));
|
GetCharCatInfo("Xmlsup", "*", buf, sizeof(buf));
|
||||||
|
|
||||||
//if (*buf == '*') // Try the old (deprecated) option
|
|
||||||
// GetCharCatInfo("Method", "*", buf, sizeof(buf));
|
|
||||||
|
|
||||||
//if (*buf == '*') // Is there a default for the database?
|
|
||||||
// GetCharCatInfo("Defxml", XMLSUP, buf, sizeof(buf));
|
|
||||||
|
|
||||||
// Note that if no support is specified, the default is MS-DOM
|
// Note that if no support is specified, the default is MS-DOM
|
||||||
// on Windows and libxml2 otherwise
|
// on Windows and libxml2 otherwise
|
||||||
if (*buf == '*')
|
if (*buf == '*')
|
||||||
@@ -499,7 +503,6 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||||||
// Get eventual table node attribute
|
// Get eventual table node attribute
|
||||||
Attrib = GetStringCatInfo(g, "Attribute", "");
|
Attrib = GetStringCatInfo(g, "Attribute", "");
|
||||||
Hdattr = GetStringCatInfo(g, "HeadAttr", "");
|
Hdattr = GetStringCatInfo(g, "HeadAttr", "");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} // end of DefineAM
|
} // end of DefineAM
|
||||||
|
|
||||||
@@ -519,30 +522,6 @@ PTDB XMLDEF::GetTable(PGLOBAL g, MODE m)
|
|||||||
return tdbp;
|
return tdbp;
|
||||||
} // end of GetTable
|
} // end of GetTable
|
||||||
|
|
||||||
#if 0
|
|
||||||
/***********************************************************************/
|
|
||||||
/* DeleteTableFile: Delete XML table files using platform API. */
|
|
||||||
/***********************************************************************/
|
|
||||||
bool XMLDEF::DeleteTableFile(PGLOBAL g)
|
|
||||||
{
|
|
||||||
char filename[_MAX_PATH];
|
|
||||||
bool rc;
|
|
||||||
|
|
||||||
// Delete the XML table file if not protected
|
|
||||||
if (!IsReadOnly()) {
|
|
||||||
PlugSetPath(filename, Fn, GetPath());
|
|
||||||
#if defined(WIN32)
|
|
||||||
rc = !DeleteFile(filename);
|
|
||||||
#else // UNIX
|
|
||||||
rc = remove(filename);
|
|
||||||
#endif // UNIX
|
|
||||||
} else
|
|
||||||
rc =true;
|
|
||||||
|
|
||||||
return rc; // Return true if error
|
|
||||||
} // end of DeleteTableFile
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
/* ------------------------- TDBXML Class ---------------------------- */
|
/* ------------------------- TDBXML Class ---------------------------- */
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -667,7 +646,7 @@ PCOL TDBXML::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
/* InsertSpecialColumn: Put a special column ahead of the column list.*/
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PCOL TDBXML::InsertSpecialColumn(PGLOBAL g, PCOL colp)
|
PCOL TDBXML::InsertSpecialColumn(PCOL colp)
|
||||||
{
|
{
|
||||||
if (!colp->IsSpecial())
|
if (!colp->IsSpecial())
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -854,7 +833,6 @@ bool TDBXML::Initialize(PGLOBAL g)
|
|||||||
To_Xb = Docp->LinkXblock(g, Mode, rc, filename);
|
To_Xb = Docp->LinkXblock(g, Mode, rc, filename);
|
||||||
|
|
||||||
// Add a CONNECT comment node
|
// Add a CONNECT comment node
|
||||||
// sprintf(buf, " Created by CONNECT %s ", version);
|
|
||||||
strcpy(buf, " Created by the MariaDB CONNECT Storage Engine");
|
strcpy(buf, " Created by the MariaDB CONNECT Storage Engine");
|
||||||
Docp->AddComment(g, buf);
|
Docp->AddComment(g, buf);
|
||||||
|
|
||||||
@@ -1279,7 +1257,6 @@ void TDBXML::CloseDB(PGLOBAL g)
|
|||||||
if (Docp) {
|
if (Docp) {
|
||||||
if (Changed) {
|
if (Changed) {
|
||||||
char filename[_MAX_PATH];
|
char filename[_MAX_PATH];
|
||||||
// PDBUSER dup = (PDBUSER)g->Activityp->Aptr;
|
|
||||||
|
|
||||||
// We used the file name relative to recorded datapath
|
// We used the file name relative to recorded datapath
|
||||||
PlugSetPath(filename, Xfile, GetPath());
|
PlugSetPath(filename, Xfile, GetPath());
|
||||||
@@ -1321,7 +1298,6 @@ void TDBXML::CloseDB(PGLOBAL g)
|
|||||||
NewRow = false;
|
NewRow = false;
|
||||||
Hasnod = false;
|
Hasnod = false;
|
||||||
Write = false;
|
Write = false;
|
||||||
// Bufdone = false;
|
|
||||||
Nodedone = false;
|
Nodedone = false;
|
||||||
Void = false;
|
Void = false;
|
||||||
Nrow = -1;
|
Nrow = -1;
|
||||||
@@ -1413,8 +1389,6 @@ bool XMLCOL::AllocBuf(PGLOBAL g, bool mode)
|
|||||||
if (Valbuf)
|
if (Valbuf)
|
||||||
return false; // Already done
|
return false; // Already done
|
||||||
|
|
||||||
//Valbuf = (char*)PlugSubAlloc(g, NULL, Long + 1);
|
|
||||||
//Valbuf[Long] = '\0';
|
|
||||||
return ParseXpath(g, mode);
|
return ParseXpath(g, mode);
|
||||||
} // end of AllocBuf
|
} // end of AllocBuf
|
||||||
|
|
||||||
@@ -1506,8 +1480,6 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode)
|
|||||||
// HTML like table, columns are retrieved by position
|
// HTML like table, columns are retrieved by position
|
||||||
new(this) XPOSCOL(Value); // Change the class of this column
|
new(this) XPOSCOL(Value); // Change the class of this column
|
||||||
Inod = -1;
|
Inod = -1;
|
||||||
// Tdbp->Hasnod = true;
|
|
||||||
// return false;
|
|
||||||
} else if (Type == 0 && !mode) {
|
} else if (Type == 0 && !mode) {
|
||||||
strcat(strcat(pbuf, "@"), Name);
|
strcat(strcat(pbuf, "@"), Name);
|
||||||
} else { // Type == 1
|
} else { // Type == 1
|
||||||
@@ -1657,7 +1629,6 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
|||||||
int done = 0;
|
int done = 0;
|
||||||
int i, n, k = 0;
|
int i, n, k = 0;
|
||||||
PXNODE TopNode = NULL;
|
PXNODE TopNode = NULL;
|
||||||
//PXATTR AttNode = NULL;
|
|
||||||
|
|
||||||
if (trace > 1)
|
if (trace > 1)
|
||||||
htrc("XML WriteColumn: col %s R%d coluse=%.4X status=%.4X\n",
|
htrc("XML WriteColumn: col %s R%d coluse=%.4X status=%.4X\n",
|
||||||
@@ -1892,7 +1863,6 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
|||||||
int done = 0;
|
int done = 0;
|
||||||
int i, n, len, k = 0;
|
int i, n, len, k = 0;
|
||||||
PXNODE TopNode = NULL;
|
PXNODE TopNode = NULL;
|
||||||
//PXATTR AttNode = NULL;
|
|
||||||
|
|
||||||
if (trace)
|
if (trace)
|
||||||
htrc("XML WriteColumn: col %s R%d coluse=%.4X status=%.4X\n",
|
htrc("XML WriteColumn: col %s R%d coluse=%.4X status=%.4X\n",
|
||||||
|
@@ -84,7 +84,7 @@ class DllExport TDBXML : public TDBASE {
|
|||||||
|
|
||||||
// Database routines
|
// Database routines
|
||||||
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
||||||
virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL colp);
|
virtual PCOL InsertSpecialColumn(PCOL colp);
|
||||||
//virtual int GetMaxSame(PGLOBAL g) {return (Xpand) ? Limit : 1;}
|
//virtual int GetMaxSame(PGLOBAL g) {return (Xpand) ? Limit : 1;}
|
||||||
virtual int Cardinality(PGLOBAL g);
|
virtual int Cardinality(PGLOBAL g);
|
||||||
virtual int GetMaxSize(PGLOBAL g);
|
virtual int GetMaxSize(PGLOBAL g);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) Olivier Bertrand 2004 - 2014
|
/* Copyright (C) Olivier Bertrand 2004 - 2015
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Author: Olivier Bertrand -- bertrandop@gmail.com -- 2004-2014 */
|
/* Author: Olivier Bertrand -- bertrandop@gmail.com -- 2004-2015 */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
#ifdef USE_PRAGMA_IMPLEMENTATION
|
#ifdef USE_PRAGMA_IMPLEMENTATION
|
||||||
#pragma implementation // gcc: Class implementation
|
#pragma implementation // gcc: Class implementation
|
||||||
@@ -63,7 +63,7 @@ void SetWorkSize(uint);
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Constructor. */
|
/* Constructor. */
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
user_connect::user_connect(THD *thd, const char *dbn)
|
user_connect::user_connect(THD *thd)
|
||||||
{
|
{
|
||||||
thdp= thd;
|
thdp= thd;
|
||||||
next= NULL;
|
next= NULL;
|
||||||
|
@@ -45,7 +45,7 @@ class user_connect
|
|||||||
friend int connect_done_func(void *);
|
friend int connect_done_func(void *);
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
user_connect(THD *thd, const char *dbn);
|
user_connect(THD *thd);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
virtual ~user_connect();
|
virtual ~user_connect();
|
||||||
|
@@ -132,7 +132,7 @@ VALBLK::VALBLK(void *mp, int type, int nval, bool un)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Raise error for numeric types. */
|
/* Raise error for numeric types. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
PSZ VALBLK::GetCharValue(int n)
|
PSZ VALBLK::GetCharValue(int)
|
||||||
{
|
{
|
||||||
PGLOBAL& g = Global;
|
PGLOBAL& g = Global;
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ PSZ VALBLK::GetCharValue(int n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Set format so formatted dates can be converted on input. */
|
/* Set format so formatted dates can be converted on input. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VALBLK::SetFormat(PGLOBAL g, PSZ fmt, int len, int year)
|
bool VALBLK::SetFormat(PGLOBAL g, PSZ, int, int)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(NO_DATE_FMT), Type);
|
sprintf(g->Message, MSG(NO_DATE_FMT), Type);
|
||||||
return true;
|
return true;
|
||||||
@@ -752,7 +752,7 @@ double CHRBLK::GetFloatValue(int n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* STRING GetCharString: get string representation of a char value. */
|
/* STRING GetCharString: get string representation of a char value. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
char *CHRBLK::GetCharString(char *p, int n)
|
char *CHRBLK::GetCharString(char *, int n)
|
||||||
{
|
{
|
||||||
return (char *)GetValPtrEx(n);
|
return (char *)GetValPtrEx(n);
|
||||||
} // end of GetCharString
|
} // end of GetCharString
|
||||||
|
@@ -95,17 +95,17 @@ class VALBLK : public BLOCK {
|
|||||||
virtual bool IsCi(void) {return false;}
|
virtual bool IsCi(void) {return false;}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void SetValue(short sval, int n) {assert(false);}
|
virtual void SetValue(short, int) {assert(false);}
|
||||||
virtual void SetValue(ushort sval, int n) {assert(false);}
|
virtual void SetValue(ushort, int) {assert(false);}
|
||||||
virtual void SetValue(int lval, int n) {assert(false);}
|
virtual void SetValue(int, int) {assert(false);}
|
||||||
virtual void SetValue(uint lval, int n) {assert(false);}
|
virtual void SetValue(uint, int) {assert(false);}
|
||||||
virtual void SetValue(longlong lval, int n) {assert(false);}
|
virtual void SetValue(longlong, int) {assert(false);}
|
||||||
virtual void SetValue(ulonglong lval, int n) {assert(false);}
|
virtual void SetValue(ulonglong, int) {assert(false);}
|
||||||
virtual void SetValue(double fval, int n) {assert(false);}
|
virtual void SetValue(double, int) {assert(false);}
|
||||||
virtual void SetValue(char cval, int n) {assert(false);}
|
virtual void SetValue(char, int) {assert(false);}
|
||||||
virtual void SetValue(uchar cval, int n) {assert(false);}
|
virtual void SetValue(uchar, int) {assert(false);}
|
||||||
virtual void SetValue(PSZ sp, int n) {assert(false);}
|
virtual void SetValue(PSZ, int) {assert(false);}
|
||||||
virtual void SetValue(char *sp, uint len, int n) {assert(false);}
|
virtual void SetValue(char *, uint, int) {assert(false);}
|
||||||
virtual void SetValue(PVAL valp, int n) = 0;
|
virtual void SetValue(PVAL valp, int n) = 0;
|
||||||
virtual void SetValue(PVBLK pv, int n1, int n2) = 0;
|
virtual void SetValue(PVBLK pv, int n1, int n2) = 0;
|
||||||
virtual void SetMin(PVAL valp, int n) = 0;
|
virtual void SetMin(PVAL valp, int n) = 0;
|
||||||
@@ -271,7 +271,7 @@ class STRBLK : public VALBLK {
|
|||||||
// Implementation
|
// Implementation
|
||||||
virtual void SetNull(int n, bool b) {if (b) {Strp[n] = NULL;}}
|
virtual void SetNull(int n, bool b) {if (b) {Strp[n] = NULL;}}
|
||||||
virtual bool IsNull(int n) {return Strp[n] == NULL;}
|
virtual bool IsNull(int n) {return Strp[n] == NULL;}
|
||||||
virtual void SetNullable(bool b) {} // Always nullable
|
virtual void SetNullable(bool) {} // Always nullable
|
||||||
virtual bool Init(PGLOBAL g, bool check);
|
virtual bool Init(PGLOBAL g, bool check);
|
||||||
virtual int GetVlen(void) {return sizeof(PSZ);}
|
virtual int GetVlen(void) {return sizeof(PSZ);}
|
||||||
virtual PSZ GetCharValue(int n) {return Strp[n];}
|
virtual PSZ GetCharValue(int n) {return Strp[n];}
|
||||||
@@ -284,7 +284,7 @@ class STRBLK : public VALBLK {
|
|||||||
virtual longlong GetBigintValue(int n);
|
virtual longlong GetBigintValue(int n);
|
||||||
virtual ulonglong GetUBigintValue(int n);
|
virtual ulonglong GetUBigintValue(int n);
|
||||||
virtual double GetFloatValue(int n) {return atof(Strp[n]);}
|
virtual double GetFloatValue(int n) {return atof(Strp[n]);}
|
||||||
virtual char *GetCharString(char *p, int n) {return Strp[n];}
|
virtual char *GetCharString(char *, int n) {return Strp[n];}
|
||||||
virtual void Reset(int n) {Strp[n] = NULL;}
|
virtual void Reset(int n) {Strp[n] = NULL;}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
|
@@ -475,7 +475,7 @@ PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case TYPE_DATE:
|
case TYPE_DATE:
|
||||||
vp = new(g) DTVAL(g, valp->GetIntValue());
|
vp = new(g) DTVAL(valp->GetIntValue());
|
||||||
break;
|
break;
|
||||||
case TYPE_DOUBLE:
|
case TYPE_DOUBLE:
|
||||||
vp = new(g) TYPVAL<double>(valp->GetFloatValue(), TYPE_DOUBLE,
|
vp = new(g) TYPVAL<double>(valp->GetFloatValue(), TYPE_DOUBLE,
|
||||||
@@ -551,7 +551,7 @@ BYTE VALUE::TestValue(PVAL vp)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Compute a function on a string. */
|
/* Compute a function on a string. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool VALUE::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op)
|
bool VALUE::Compute(PGLOBAL g, PVAL *, int, OPVAL)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, "Compute not implemented for this value type");
|
strcpy(g->Message, "Compute not implemented for this value type");
|
||||||
return true;
|
return true;
|
||||||
@@ -976,7 +976,7 @@ ulonglong TYPVAL<ulonglong>::MinMaxVal(bool b)
|
|||||||
{return (b) ? 0xFFFFFFFFFFFFFFFFLL : 0;}
|
{return (b) ? 0xFFFFFFFFFFFFFFFFLL : 0;}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
double TYPVAL<double>::MinMaxVal(bool b)
|
double TYPVAL<double>::MinMaxVal(bool)
|
||||||
{assert(false); return 0.0;}
|
{assert(false); return 0.0;}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@@ -1566,7 +1566,7 @@ bool TYPVAL<PSZ>::GetBinValue(void *buf, int buflen, bool go)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* STRING ShowValue: get string representation of a char value. */
|
/* STRING ShowValue: get string representation of a char value. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
char *TYPVAL<PSZ>::ShowValue(char *buf, int len)
|
char *TYPVAL<PSZ>::ShowValue(char *, int)
|
||||||
{
|
{
|
||||||
return Strp;
|
return Strp;
|
||||||
} // end of ShowValue
|
} // end of ShowValue
|
||||||
@@ -1574,7 +1574,7 @@ char *TYPVAL<PSZ>::ShowValue(char *buf, int len)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* STRING GetCharString: get string representation of a char value. */
|
/* STRING GetCharString: get string representation of a char value. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
char *TYPVAL<PSZ>::GetCharString(char *p)
|
char *TYPVAL<PSZ>::GetCharString(char *)
|
||||||
{
|
{
|
||||||
return Strp;
|
return Strp;
|
||||||
} // end of GetCharString
|
} // end of GetCharString
|
||||||
@@ -1681,7 +1681,7 @@ bool TYPVAL<PSZ>::FormatValue(PVAL vp, char *fmt)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* STRING SetFormat function (used to set SELECT output format). */
|
/* STRING SetFormat function (used to set SELECT output format). */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool TYPVAL<PSZ>::SetConstFormat(PGLOBAL g, FORMAT& fmt)
|
bool TYPVAL<PSZ>::SetConstFormat(PGLOBAL, FORMAT& fmt)
|
||||||
{
|
{
|
||||||
fmt.Type[0] = 'C';
|
fmt.Type[0] = 'C';
|
||||||
fmt.Length = Len;
|
fmt.Length = Len;
|
||||||
@@ -2300,7 +2300,7 @@ char *BINVAL::ShowValue(char *buf, int len)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* BINVAL GetCharString: get string representation of a binary value. */
|
/* BINVAL GetCharString: get string representation of a binary value. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
char *BINVAL::GetCharString(char *p)
|
char *BINVAL::GetCharString(char *)
|
||||||
{
|
{
|
||||||
if (!Chrp)
|
if (!Chrp)
|
||||||
Chrp = (char*)PlugSubAlloc(Global, NULL, Clen * 2 + 1);
|
Chrp = (char*)PlugSubAlloc(Global, NULL, Clen * 2 + 1);
|
||||||
@@ -2349,7 +2349,7 @@ bool BINVAL::FormatValue(PVAL vp, char *fmt)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* BINVAL SetFormat function (used to set SELECT output format). */
|
/* BINVAL SetFormat function (used to set SELECT output format). */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool BINVAL::SetConstFormat(PGLOBAL g, FORMAT& fmt)
|
bool BINVAL::SetConstFormat(PGLOBAL, FORMAT& fmt)
|
||||||
{
|
{
|
||||||
fmt.Type[0] = 'B';
|
fmt.Type[0] = 'B';
|
||||||
fmt.Length = Clen;
|
fmt.Length = Clen;
|
||||||
@@ -2379,7 +2379,7 @@ DTVAL::DTVAL(PGLOBAL g, int n, int prec, PSZ fmt)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* DTVAL public constructor from int. */
|
/* DTVAL public constructor from int. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
DTVAL::DTVAL(PGLOBAL g, int n) : TYPVAL<int>(n, TYPE_DATE)
|
DTVAL::DTVAL(int n) : TYPVAL<int>(n, TYPE_DATE)
|
||||||
{
|
{
|
||||||
Pdtp = NULL;
|
Pdtp = NULL;
|
||||||
Len = 19;
|
Len = 19;
|
||||||
|
@@ -94,18 +94,18 @@ class DllExport VALUE : public BLOCK {
|
|||||||
virtual bool SetValue_pval(PVAL valp, bool chktype = false) = 0;
|
virtual bool SetValue_pval(PVAL valp, bool chktype = false) = 0;
|
||||||
virtual bool SetValue_char(char *p, int n) = 0;
|
virtual bool SetValue_char(char *p, int n) = 0;
|
||||||
virtual void SetValue_psz(PSZ s) = 0;
|
virtual void SetValue_psz(PSZ s) = 0;
|
||||||
virtual void SetValue_bool(bool b) {assert(FALSE);}
|
virtual void SetValue_bool(bool) {assert(FALSE);}
|
||||||
virtual int CompareValue(PVAL vp) = 0;
|
virtual int CompareValue(PVAL vp) = 0;
|
||||||
virtual BYTE TestValue(PVAL vp);
|
virtual BYTE TestValue(PVAL vp);
|
||||||
virtual void SetValue(char c) {assert(false);}
|
virtual void SetValue(char) {assert(false);}
|
||||||
virtual void SetValue(uchar c) {assert(false);}
|
virtual void SetValue(uchar) {assert(false);}
|
||||||
virtual void SetValue(short i) {assert(false);}
|
virtual void SetValue(short) {assert(false);}
|
||||||
virtual void SetValue(ushort i) {assert(false);}
|
virtual void SetValue(ushort) {assert(false);}
|
||||||
virtual void SetValue(int n) {assert(false);}
|
virtual void SetValue(int) {assert(false);}
|
||||||
virtual void SetValue(uint n) {assert(false);}
|
virtual void SetValue(uint) {assert(false);}
|
||||||
virtual void SetValue(longlong n) {assert(false);}
|
virtual void SetValue(longlong) {assert(false);}
|
||||||
virtual void SetValue(ulonglong n) {assert(false);}
|
virtual void SetValue(ulonglong) {assert(false);}
|
||||||
virtual void SetValue(double f) {assert(false);}
|
virtual void SetValue(double) {assert(false);}
|
||||||
virtual void SetValue_pvblk(PVBLK blk, int n) = 0;
|
virtual void SetValue_pvblk(PVBLK blk, int n) = 0;
|
||||||
virtual void SetBinValue(void *p) = 0;
|
virtual void SetBinValue(void *p) = 0;
|
||||||
virtual bool GetBinValue(void *buf, int buflen, bool go) = 0;
|
virtual bool GetBinValue(void *buf, int buflen, bool go) = 0;
|
||||||
@@ -338,7 +338,7 @@ class DllExport BINVAL: public VALUE {
|
|||||||
virtual void SetValue(double f);
|
virtual void SetValue(double f);
|
||||||
virtual void SetBinValue(void *p);
|
virtual void SetBinValue(void *p);
|
||||||
virtual bool GetBinValue(void *buf, int buflen, bool go);
|
virtual bool GetBinValue(void *buf, int buflen, bool go);
|
||||||
virtual int CompareValue(PVAL vp) {assert(false); return 0;}
|
virtual int CompareValue(PVAL) {assert(false); return 0;}
|
||||||
virtual char *ShowValue(char *buf, int);
|
virtual char *ShowValue(char *buf, int);
|
||||||
virtual char *GetCharString(char *p);
|
virtual char *GetCharString(char *p);
|
||||||
virtual bool IsEqual(PVAL vp, bool chktype);
|
virtual bool IsEqual(PVAL vp, bool chktype);
|
||||||
@@ -359,11 +359,11 @@ class DllExport DTVAL : public TYPVAL<int> {
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
DTVAL(PGLOBAL g, int n, int p, PSZ fmt);
|
DTVAL(PGLOBAL g, int n, int p, PSZ fmt);
|
||||||
DTVAL(PGLOBAL g, PSZ s, int n);
|
//DTVAL(PGLOBAL g, PSZ s, int n);
|
||||||
DTVAL(PGLOBAL g, short i);
|
//DTVAL(PGLOBAL g, short i);
|
||||||
DTVAL(PGLOBAL g, int n);
|
DTVAL(int n);
|
||||||
DTVAL(PGLOBAL g, longlong n);
|
//DTVAL(PGLOBAL g, longlong n);
|
||||||
DTVAL(PGLOBAL g, double f);
|
//DTVAL(PGLOBAL g, double f);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual bool IsZero(void) {return Null;}
|
virtual bool IsZero(void) {return Null;}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/***************** Xindex C++ Class Xindex Code (.CPP) *****************/
|
/***************** Xindex C++ Class Xindex Code (.CPP) *****************/
|
||||||
/* Name: XINDEX.CPP Version 2.9 */
|
/* Name: XINDEX.CPP Version 2.9 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */
|
/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the class XINDEX implementation code. */
|
/* This file contains the class XINDEX implementation code. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -179,7 +179,7 @@ XXBASE::XXBASE(PTDBDOS tbxp, bool b) : CSORT(b),
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make file output of XINDEX contents. */
|
/* Make file output of XINDEX contents. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void XXBASE::Print(PGLOBAL g, FILE *f, uint n)
|
void XXBASE::Print(PGLOBAL, FILE *f, uint n)
|
||||||
{
|
{
|
||||||
char m[64];
|
char m[64];
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ void XXBASE::Print(PGLOBAL g, FILE *f, uint n)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Make string output of XINDEX contents. */
|
/* Make string output of XINDEX contents. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void XXBASE::Print(PGLOBAL g, char *ps, uint z)
|
void XXBASE::Print(PGLOBAL, char *ps, uint z)
|
||||||
{
|
{
|
||||||
*ps = '\0';
|
*ps = '\0';
|
||||||
strncat(ps, "Xindex", z);
|
strncat(ps, "Xindex", z);
|
||||||
@@ -287,7 +287,7 @@ int XINDEX::Qcompare(int *i1, int *i2)
|
|||||||
/* Sure enough, it is done while records are read and permit to avoid */
|
/* Sure enough, it is done while records are read and permit to avoid */
|
||||||
/* reading the table while doing the join (Dynamic index only) */
|
/* reading the table while doing the join (Dynamic index only) */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool XINDEX::AddColumns(PIXDEF xdp)
|
bool XINDEX::AddColumns(void)
|
||||||
{
|
{
|
||||||
if (!Dynamic)
|
if (!Dynamic)
|
||||||
return false; // Not applying to static index
|
return false; // Not applying to static index
|
||||||
@@ -377,7 +377,7 @@ bool XINDEX::Make(PGLOBAL g, PIXDEF sxp)
|
|||||||
|
|
||||||
To_LastCol = prev;
|
To_LastCol = prev;
|
||||||
|
|
||||||
if (AddColumns(sxp)) {
|
if (AddColumns()) {
|
||||||
PCOL kolp = To_Cols[0]; // Temporary while imposing Nk = 1
|
PCOL kolp = To_Cols[0]; // Temporary while imposing Nk = 1
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
@@ -733,7 +733,7 @@ int XINDEX::ColMaxSame(PXCOL kp)
|
|||||||
/* Reorder: use the sort index to reorder the data in storage so */
|
/* Reorder: use the sort index to reorder the data in storage so */
|
||||||
/* it will be physically sorted and sort index can be removed. */
|
/* it will be physically sorted and sort index can be removed. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool XINDEX::Reorder(PGLOBAL g)
|
bool XINDEX::Reorder(PGLOBAL g __attribute__((unused)))
|
||||||
{
|
{
|
||||||
register int i, j, k, n;
|
register int i, j, k, n;
|
||||||
bool sorted = true;
|
bool sorted = true;
|
||||||
@@ -1585,7 +1585,7 @@ int XINDEX::Range(PGLOBAL g, int limit, bool incl)
|
|||||||
if (++i == Nval) break;
|
if (++i == Nval) break;
|
||||||
} // endfor kp
|
} // endfor kp
|
||||||
|
|
||||||
if ((k = FastFind(Nval)) < Num_K)
|
if ((k = FastFind()) < Num_K)
|
||||||
n = k;
|
n = k;
|
||||||
// if (limit)
|
// if (limit)
|
||||||
// n = (Mul) ? k : kp->Val_K;
|
// n = (Mul) ? k : kp->Val_K;
|
||||||
@@ -1826,7 +1826,7 @@ int XINDEX::Fetch(PGLOBAL g)
|
|||||||
if (trace > 1)
|
if (trace > 1)
|
||||||
htrc("Fetch: Looking for new value\n");
|
htrc("Fetch: Looking for new value\n");
|
||||||
|
|
||||||
Cur_K = FastFind(Nval);
|
Cur_K = FastFind();
|
||||||
|
|
||||||
if (Cur_K >= Num_K)
|
if (Cur_K >= Num_K)
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
@@ -1857,12 +1857,12 @@ int XINDEX::Fetch(PGLOBAL g)
|
|||||||
/* FastFind: Returns the index of matching record in a join using an */
|
/* FastFind: Returns the index of matching record in a join using an */
|
||||||
/* optimized algorithm based on dichotomie and optimized comparing. */
|
/* optimized algorithm based on dichotomie and optimized comparing. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int XINDEX::FastFind(int nv)
|
int XINDEX::FastFind(void)
|
||||||
{
|
{
|
||||||
register int curk, sup, inf, i= 0, k, n = 2;
|
register int curk, sup, inf, i= 0, k, n = 2;
|
||||||
register PXCOL kp, kcp;
|
register PXCOL kp, kcp;
|
||||||
|
|
||||||
assert((int)nv == Nval);
|
//assert((int)nv == Nval);
|
||||||
|
|
||||||
if (Nblk && Op == OP_EQ) {
|
if (Nblk && Op == OP_EQ) {
|
||||||
// Look in block values to find in which block to search
|
// Look in block values to find in which block to search
|
||||||
@@ -2018,7 +2018,7 @@ int XINDXS::Range(PGLOBAL g, int limit, bool incl)
|
|||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
if (xp->GetType() == TYPE_CONST) {
|
if (xp->GetType() == TYPE_CONST) {
|
||||||
kp->Valp->SetValue_pval(xp->GetValue(), !kp->Prefix);
|
kp->Valp->SetValue_pval(xp->GetValue(), !kp->Prefix);
|
||||||
k = FastFind(Nval);
|
k = FastFind();
|
||||||
|
|
||||||
if (k < Num_K || Op != OP_EQ)
|
if (k < Num_K || Op != OP_EQ)
|
||||||
if (limit)
|
if (limit)
|
||||||
@@ -2162,7 +2162,7 @@ int XINDXS::Fetch(PGLOBAL g)
|
|||||||
if (trace > 1)
|
if (trace > 1)
|
||||||
htrc("Fetch: Looking for new value\n");
|
htrc("Fetch: Looking for new value\n");
|
||||||
|
|
||||||
Cur_K = FastFind(1);
|
Cur_K = FastFind();
|
||||||
|
|
||||||
if (Cur_K >= Num_K)
|
if (Cur_K >= Num_K)
|
||||||
// Rank not whithin index table, signal record not found
|
// Rank not whithin index table, signal record not found
|
||||||
@@ -2190,7 +2190,7 @@ int XINDXS::Fetch(PGLOBAL g)
|
|||||||
/* FastFind: Returns the index of matching indexed record using an */
|
/* FastFind: Returns the index of matching indexed record using an */
|
||||||
/* optimized algorithm based on dichotomie and optimized comparing. */
|
/* optimized algorithm based on dichotomie and optimized comparing. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int XINDXS::FastFind(int nk)
|
int XINDXS::FastFind(void)
|
||||||
{
|
{
|
||||||
register int sup, inf, i= 0, n = 2;
|
register int sup, inf, i= 0, n = 2;
|
||||||
register PXCOL kcp = To_KeyCol;
|
register PXCOL kcp = To_KeyCol;
|
||||||
@@ -2360,7 +2360,8 @@ bool XFILE::Open(PGLOBAL g, char *filename, int id, MODE mode)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Move into an index file. */
|
/* Move into an index file. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
bool XFILE::Seek(PGLOBAL g, int low, int high, int origin)
|
bool XFILE::Seek(PGLOBAL g, int low, int high __attribute__((unused)),
|
||||||
|
int origin)
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
assert(high == 0);
|
assert(high == 0);
|
||||||
@@ -2371,7 +2372,6 @@ bool XFILE::Seek(PGLOBAL g, int low, int high, int origin)
|
|||||||
return true;
|
return true;
|
||||||
} // endif
|
} // endif
|
||||||
|
|
||||||
//ftell(Xfile);
|
|
||||||
return false;
|
return false;
|
||||||
} // end of Seek
|
} // end of Seek
|
||||||
|
|
||||||
@@ -2819,7 +2819,7 @@ void XHUGE::Close(char *fn, int id)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Don't know whether this is possible for huge files. */
|
/* Don't know whether this is possible for huge files. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
void *XHUGE::FileView(PGLOBAL g, char *fn)
|
void *XHUGE::FileView(PGLOBAL g, char *)
|
||||||
{
|
{
|
||||||
strcpy(g->Message, MSG(NO_PART_MAP));
|
strcpy(g->Message, MSG(NO_PART_MAP));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -2879,7 +2879,7 @@ bool XXROW::Init(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* RANGE: Tell how many record exist in a given value range. */
|
/* RANGE: Tell how many record exist in a given value range. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int XXROW::Range(PGLOBAL g, int limit, bool incl)
|
int XXROW::Range(PGLOBAL, int limit, bool incl)
|
||||||
{
|
{
|
||||||
int n = Valp->GetIntValue();
|
int n = Valp->GetIntValue();
|
||||||
|
|
||||||
@@ -2895,7 +2895,7 @@ int XXROW::Range(PGLOBAL g, int limit, bool incl)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* XXROW: Fetch a physical or logical record. */
|
/* XXROW: Fetch a physical or logical record. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int XXROW::Fetch(PGLOBAL g)
|
int XXROW::Fetch(PGLOBAL)
|
||||||
{
|
{
|
||||||
if (Num_K == 0)
|
if (Num_K == 0)
|
||||||
return -1; // means end of file
|
return -1; // means end of file
|
||||||
@@ -2904,7 +2904,7 @@ int XXROW::Fetch(PGLOBAL g)
|
|||||||
/* Look for a key equal to the link column of previous table, */
|
/* Look for a key equal to the link column of previous table, */
|
||||||
/* and return its rank whithin the index table. */
|
/* and return its rank whithin the index table. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
Cur_K = FastFind(1);
|
Cur_K = FastFind();
|
||||||
|
|
||||||
if (Cur_K >= Num_K)
|
if (Cur_K >= Num_K)
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
@@ -2926,7 +2926,7 @@ int XXROW::Fetch(PGLOBAL g)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* FastFind: Returns the index of matching record in a join. */
|
/* FastFind: Returns the index of matching record in a join. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
int XXROW::FastFind(int nk)
|
int XXROW::FastFind(void)
|
||||||
{
|
{
|
||||||
int n = Valp->GetIntValue();
|
int n = Valp->GetIntValue();
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*************** Xindex H Declares Source Code File (.H) ***************/
|
/*************** Xindex H Declares Source Code File (.H) ***************/
|
||||||
/* Name: XINDEX.H Version 3.5 */
|
/* Name: XINDEX.H Version 3.5 */
|
||||||
/* */
|
/* */
|
||||||
/* (C) Copyright to the author Olivier BERTRAND 2004 - 2013 */
|
/* (C) Copyright to the author Olivier BERTRAND 2004 - 2015 */
|
||||||
/* */
|
/* */
|
||||||
/* This file contains the XINDEX class declares. */
|
/* This file contains the XINDEX class declares. */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -205,12 +205,11 @@ class DllExport XXBASE : public CSORT, public BLOCK {
|
|||||||
#endif // XMAP
|
#endif // XMAP
|
||||||
virtual int MaxRange(void) {return 1;}
|
virtual int MaxRange(void) {return 1;}
|
||||||
virtual int Fetch(PGLOBAL g) = 0;
|
virtual int Fetch(PGLOBAL g) = 0;
|
||||||
virtual bool NextVal(bool eq) {return true;}
|
virtual bool NextVal(bool) {return true;}
|
||||||
virtual bool PrevVal(void) {return true;}
|
virtual bool PrevVal(void) {return true;}
|
||||||
virtual int FastFind(int nk) = 0;
|
virtual int FastFind(void) = 0;
|
||||||
virtual bool Reorder(PGLOBAL g) {return true;}
|
virtual bool Reorder(PGLOBAL) {return true;}
|
||||||
virtual int Range(PGLOBAL g, int limit = 0, bool incl = true)
|
virtual int Range(PGLOBAL, int = 0, bool = true) {return -1;} // Means error
|
||||||
{return -1;} // Means error
|
|
||||||
virtual int Qcompare(int *, int *) = 0;
|
virtual int Qcompare(int *, int *) = 0;
|
||||||
virtual int GroupSize(void) {return 1;}
|
virtual int GroupSize(void) {return 1;}
|
||||||
virtual void Close(void) = 0;
|
virtual void Close(void) = 0;
|
||||||
@@ -266,7 +265,7 @@ class DllExport XINDEX : public XXBASE {
|
|||||||
#endif // XMAP
|
#endif // XMAP
|
||||||
virtual int Qcompare(int *, int *);
|
virtual int Qcompare(int *, int *);
|
||||||
virtual int Fetch(PGLOBAL g);
|
virtual int Fetch(PGLOBAL g);
|
||||||
virtual int FastFind(int nk);
|
virtual int FastFind(void);
|
||||||
virtual int GroupSize(void);
|
virtual int GroupSize(void);
|
||||||
virtual int Range(PGLOBAL g, int limit = 0, bool incl = true);
|
virtual int Range(PGLOBAL g, int limit = 0, bool incl = true);
|
||||||
virtual int MaxRange(void) {return MaxSame;}
|
virtual int MaxRange(void) {return MaxSame;}
|
||||||
@@ -280,7 +279,7 @@ class DllExport XINDEX : public XXBASE {
|
|||||||
bool GetAllSizes(PGLOBAL g,/* int &ndif,*/ int &numk);
|
bool GetAllSizes(PGLOBAL g,/* int &ndif,*/ int &numk);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool AddColumns(PIXDEF xdp);
|
bool AddColumns(void);
|
||||||
bool NextValDif(void);
|
bool NextValDif(void);
|
||||||
|
|
||||||
// Members
|
// Members
|
||||||
@@ -312,7 +311,7 @@ class DllExport XINDXS : public XINDEX {
|
|||||||
// Methods
|
// Methods
|
||||||
virtual int Qcompare(int *, int *);
|
virtual int Qcompare(int *, int *);
|
||||||
virtual int Fetch(PGLOBAL g);
|
virtual int Fetch(PGLOBAL g);
|
||||||
virtual int FastFind(int nk);
|
virtual int FastFind(void);
|
||||||
virtual bool NextVal(bool eq);
|
virtual bool NextVal(bool eq);
|
||||||
virtual bool PrevVal(void);
|
virtual bool PrevVal(void);
|
||||||
virtual int Range(PGLOBAL g, int limit = 0, bool incl = true);
|
virtual int Range(PGLOBAL g, int limit = 0, bool incl = true);
|
||||||
@@ -421,14 +420,14 @@ class DllExport XXROW : public XXBASE {
|
|||||||
// Methods
|
// Methods
|
||||||
virtual bool Init(PGLOBAL g);
|
virtual bool Init(PGLOBAL g);
|
||||||
#if defined(XMAP)
|
#if defined(XMAP)
|
||||||
virtual bool MapInit(PGLOBAL g) {return true;}
|
virtual bool MapInit(PGLOBAL) {return true;}
|
||||||
#endif // XMAP
|
#endif // XMAP
|
||||||
virtual int Fetch(PGLOBAL g);
|
virtual int Fetch(PGLOBAL g);
|
||||||
virtual int FastFind(int nk);
|
virtual int FastFind(void);
|
||||||
virtual int MaxRange(void) {return 1;}
|
virtual int MaxRange(void) {return 1;}
|
||||||
virtual int Range(PGLOBAL g, int limit = 0, bool incl = true);
|
virtual int Range(PGLOBAL g, int limit = 0, bool incl = true);
|
||||||
virtual int Qcompare(int *, int *) {assert(false); return 0;}
|
virtual int Qcompare(int *, int *) {assert(false); return 0;}
|
||||||
virtual bool Make(PGLOBAL g, PIXDEF sxp) {return false;}
|
virtual bool Make(PGLOBAL, PIXDEF) {return false;}
|
||||||
virtual void Close(void) {}
|
virtual void Close(void) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -42,9 +42,9 @@ class DllExport XOBJECT : public BLOCK {
|
|||||||
virtual int GetResultType(void) {return TYPE_VOID;}
|
virtual int GetResultType(void) {return TYPE_VOID;}
|
||||||
virtual int GetKey(void) {return 0;}
|
virtual int GetKey(void) {return 0;}
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
virtual void SetKey(int k) {assert(false);}
|
virtual void SetKey(int) {assert(false);}
|
||||||
#else // !_DEBUG
|
#else // !_DEBUG
|
||||||
virtual void SetKey(int k) {} // Only defined for COLBLK
|
virtual void SetKey(int) {} // Only defined for COLBLK
|
||||||
#endif // !_DEBUG
|
#endif // !_DEBUG
|
||||||
virtual int GetLength(void) = 0;
|
virtual int GetLength(void) = 0;
|
||||||
virtual int GetLengthEx(void) = 0;
|
virtual int GetLengthEx(void) = 0;
|
||||||
|
@@ -77,21 +77,21 @@ class DllExport TDB: public BLOCK { // Table Descriptor Block.
|
|||||||
virtual int GetTdb_No(void) {return Tdb_No;}
|
virtual int GetTdb_No(void) {return Tdb_No;}
|
||||||
virtual PTDB GetNext(void) {return Next;}
|
virtual PTDB GetNext(void) {return Next;}
|
||||||
virtual PCATLG GetCat(void) {return NULL;}
|
virtual PCATLG GetCat(void) {return NULL;}
|
||||||
virtual void SetAbort(bool b) {;}
|
virtual void SetAbort(bool) {;}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual bool IsSame(PTDB tp) {return tp == this;}
|
virtual bool IsSame(PTDB tp) {return tp == this;}
|
||||||
virtual bool IsSpecial(PSZ name) = 0;
|
virtual bool IsSpecial(PSZ name) = 0;
|
||||||
virtual bool GetBlockValues(PGLOBAL g) {return false;}
|
virtual bool GetBlockValues(PGLOBAL) {return false;}
|
||||||
virtual int Cardinality(PGLOBAL g) {return 0;}
|
virtual int Cardinality(PGLOBAL) {return 0;}
|
||||||
virtual int GetMaxSize(PGLOBAL) = 0;
|
virtual int GetMaxSize(PGLOBAL) = 0;
|
||||||
virtual int GetProgMax(PGLOBAL) = 0;
|
virtual int GetProgMax(PGLOBAL) = 0;
|
||||||
virtual int GetProgCur(void) = 0;
|
virtual int GetProgCur(void) = 0;
|
||||||
virtual int RowNumber(PGLOBAL g, bool b = false);
|
virtual int RowNumber(PGLOBAL g, bool b = false);
|
||||||
virtual bool IsReadOnly(void) {return true;}
|
virtual bool IsReadOnly(void) {return true;}
|
||||||
virtual const CHARSET_INFO *data_charset() {return NULL;}
|
virtual const CHARSET_INFO *data_charset() {return NULL;}
|
||||||
virtual PTDB Duplicate(PGLOBAL g) {return NULL;}
|
virtual PTDB Duplicate(PGLOBAL) {return NULL;}
|
||||||
virtual PTDB CopyOne(PTABS t) {return this;}
|
virtual PTDB CopyOne(PTABS) {return this;}
|
||||||
virtual PTDB Copy(PTABS t);
|
virtual PTDB Copy(PTABS t);
|
||||||
virtual void PrintAM(FILE *f, char *m)
|
virtual void PrintAM(FILE *f, char *m)
|
||||||
{fprintf(f, "%s AM(%d)\n", m, GetAmType());}
|
{fprintf(f, "%s AM(%d)\n", m, GetAmType());}
|
||||||
@@ -108,7 +108,7 @@ class DllExport TDB: public BLOCK { // Table Descriptor Block.
|
|||||||
virtual int WriteDB(PGLOBAL) = 0;
|
virtual int WriteDB(PGLOBAL) = 0;
|
||||||
virtual int DeleteDB(PGLOBAL, int) = 0;
|
virtual int DeleteDB(PGLOBAL, int) = 0;
|
||||||
virtual void CloseDB(PGLOBAL) = 0;
|
virtual void CloseDB(PGLOBAL) = 0;
|
||||||
virtual int CheckWrite(PGLOBAL g) {return 0;}
|
virtual int CheckWrite(PGLOBAL) {return 0;}
|
||||||
virtual bool ReadKey(PGLOBAL, OPVAL, const void *, int) = 0;
|
virtual bool ReadKey(PGLOBAL, OPVAL, const void *, int) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -155,7 +155,7 @@ class DllExport TDBASE : public TDB {
|
|||||||
PCOL Key(int i) {return (To_Key_Col) ? To_Key_Col[i] : NULL;}
|
PCOL Key(int i) {return (To_Key_Col) ? To_Key_Col[i] : NULL;}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual bool IsUsingTemp(PGLOBAL g) {return false;}
|
virtual bool IsUsingTemp(PGLOBAL) {return false;}
|
||||||
virtual bool IsIndexed(void) {return false;}
|
virtual bool IsIndexed(void) {return false;}
|
||||||
virtual bool IsSpecial(PSZ name);
|
virtual bool IsSpecial(PSZ name);
|
||||||
virtual PCATLG GetCat(void);
|
virtual PCATLG GetCat(void);
|
||||||
@@ -170,9 +170,9 @@ class DllExport TDBASE : public TDB {
|
|||||||
virtual CHARSET_INFO *data_charset(void);
|
virtual CHARSET_INFO *data_charset(void);
|
||||||
virtual int GetProgMax(PGLOBAL g) {return GetMaxSize(g);}
|
virtual int GetProgMax(PGLOBAL g) {return GetMaxSize(g);}
|
||||||
virtual int GetProgCur(void) {return GetRecpos();}
|
virtual int GetProgCur(void) {return GetRecpos();}
|
||||||
virtual PSZ GetFile(PGLOBAL g) {return "Not a file";}
|
virtual PSZ GetFile(PGLOBAL) {return "Not a file";}
|
||||||
virtual int GetRemote(void) {return 0;}
|
virtual int GetRemote(void) {return 0;}
|
||||||
virtual void SetFile(PGLOBAL g, PSZ fn) {}
|
virtual void SetFile(PGLOBAL, PSZ) {}
|
||||||
virtual void ResetDB(void) {}
|
virtual void ResetDB(void) {}
|
||||||
virtual void ResetSize(void) {MaxSize = -1;}
|
virtual void ResetSize(void) {MaxSize = -1;}
|
||||||
virtual void RestoreNrec(void) {}
|
virtual void RestoreNrec(void) {}
|
||||||
@@ -183,12 +183,12 @@ class DllExport TDBASE : public TDB {
|
|||||||
virtual PCOL ColDB(PGLOBAL g, PSZ name, int num);
|
virtual PCOL ColDB(PGLOBAL g, PSZ name, int num);
|
||||||
virtual PCOL MakeCol(PGLOBAL, PCOLDEF, PCOL, int)
|
virtual PCOL MakeCol(PGLOBAL, PCOLDEF, PCOL, int)
|
||||||
{assert(false); return NULL;}
|
{assert(false); return NULL;}
|
||||||
virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL colp);
|
virtual PCOL InsertSpecialColumn(PCOL colp);
|
||||||
virtual PCOL InsertSpcBlk(PGLOBAL g, PCOLDEF cdp);
|
virtual PCOL InsertSpcBlk(PGLOBAL g, PCOLDEF cdp);
|
||||||
virtual void MarkDB(PGLOBAL g, PTDB tdb2);
|
virtual void MarkDB(PGLOBAL g, PTDB tdb2);
|
||||||
virtual int MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
|
virtual int MakeIndex(PGLOBAL g, PIXDEF, bool)
|
||||||
{strcpy(g->Message, "Remote index"); return RC_INFO;}
|
{strcpy(g->Message, "Remote index"); return RC_INFO;}
|
||||||
virtual bool ReadKey(PGLOBAL g, OPVAL op, const void *key, int len)
|
virtual bool ReadKey(PGLOBAL, OPVAL, const void *, int)
|
||||||
{assert(false); return true;}
|
{assert(false); return true;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -225,7 +225,7 @@ class DllExport TDBCAT : public TDBASE {
|
|||||||
// Methods
|
// Methods
|
||||||
virtual int GetRecpos(void) {return N;}
|
virtual int GetRecpos(void) {return N;}
|
||||||
virtual int GetProgCur(void) {return N;}
|
virtual int GetProgCur(void) {return N;}
|
||||||
virtual int RowNumber(PGLOBAL g, bool b = false) {return N + 1;}
|
virtual int RowNumber(PGLOBAL, bool = false) {return N + 1;}
|
||||||
virtual bool SetRecpos(PGLOBAL g, int recpos);
|
virtual bool SetRecpos(PGLOBAL g, int recpos);
|
||||||
|
|
||||||
// Database routines
|
// Database routines
|
||||||
|
Reference in New Issue
Block a user