Skip to content

Commit

Permalink
Merge branch 'connect-10.0' into 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Jun 16, 2015
2 parents 985e430 + 1443227 commit 569d2f8
Show file tree
Hide file tree
Showing 88 changed files with 1,522 additions and 1,226 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
*.ko
*.obj
*.elf
*.exp
*.dep
*.idb

# Precompiled Headers
*.gch
Expand Down
16 changes: 8 additions & 8 deletions storage/connect/array.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/************* Array C++ Functions Source Code File (.CPP) *************/
/* 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. */
/* ARRAY is used for elaborate type of processing, such as sorting */
Expand All @@ -19,14 +19,14 @@
#include "sql_class.h"
//#include "sql_time.h"

#if defined(WIN32)
#if defined(__WIN__)
//#include <windows.h>
#else // !WIN32
#else // !__WIN__
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h> // for uintprt_h
#endif // !WIN32
#endif // !__WIN__

/***********************************************************************/
/* Include required application header files */
Expand Down Expand Up @@ -186,7 +186,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec)
// The error message was built by PlgDBalloc
Type = TYPE_ERROR;
else if (type != TYPE_PCHAR)
Value = AllocateValue(g, type, Len, prec, NULL);
Value = AllocateValue(g, type, Len, prec);

Constant = TRUE;
} // end of ARRAY constructor
Expand Down Expand Up @@ -610,7 +610,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
// The error message was built by PlgDBalloc
return TYPE_ERROR;
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. */
Expand Down Expand Up @@ -848,7 +848,7 @@ void *ARRAY::GetSortIndex(PGLOBAL g)
/* the indication of whether the Find will be always true, always not */
/* 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)
{
bool bin, bax, pin, pax, veq, all = (opm == 2);
Expand Down Expand Up @@ -1038,7 +1038,7 @@ void ARRAY::Print(PGLOBAL g, FILE *f, uint n)
/***********************************************************************/
/* 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)
return;
Expand Down
28 changes: 14 additions & 14 deletions storage/connect/blkfil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* COPYRIGHT: */
/* ---------- */
/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */
/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
Expand All @@ -20,13 +20,13 @@
#include "sql_class.h"
//#include "sql_time.h"

#if defined(WIN32)
#if defined(__WIN__)
//#include <windows.h>
#else // !WIN32
#else // !__WIN__
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#endif // !WIN32
#endif // !__WIN__

/***********************************************************************/
/* Include application header files: */
Expand Down Expand Up @@ -56,7 +56,7 @@ BLOCKFILTER::BLOCKFILTER(PTDBDOS tdbp, int op)
/***********************************************************************/
/* 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];

Expand All @@ -70,7 +70,7 @@ void BLOCKFILTER::Print(PGLOBAL g, FILE *f, uint n)
/***********************************************************************/
/* 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);
} // end of Print
Expand Down Expand Up @@ -186,7 +186,7 @@ void BLKFILARI::Reset(PGLOBAL g)
/***********************************************************************/
/* Evaluate block filter for arithmetic operators. */
/***********************************************************************/
int BLKFILARI::BlockEval(PGLOBAL g)
int BLKFILARI::BlockEval(PGLOBAL)
{
int mincmp, maxcmp, n;

Expand Down Expand Up @@ -306,7 +306,7 @@ void BLKFILAR2::MakeValueBitmap(void)
/***********************************************************************/
/* Evaluate XDB2 block filter for arithmetic operators. */
/***********************************************************************/
int BLKFILAR2::BlockEval(PGLOBAL g)
int BLKFILAR2::BlockEval(PGLOBAL)
{
#if defined(_DEBUG)
assert (Colp->IsClustered());
Expand Down Expand Up @@ -428,7 +428,7 @@ void BLKFILMR2::MakeValueBitmap(void)
/***********************************************************************/
/* Evaluate XDB2 block filter for arithmetic operators. */
/***********************************************************************/
int BLKFILMR2::BlockEval(PGLOBAL g)
int BLKFILMR2::BlockEval(PGLOBAL)
{
#if defined(_DEBUG)
assert (Colp->IsClustered());
Expand Down Expand Up @@ -514,7 +514,7 @@ void BLKSPCARI::Reset(PGLOBAL g)
/***********************************************************************/
/* Evaluate block filter for arithmetic operators (ROWID) */
/***********************************************************************/
int BLKSPCARI::BlockEval(PGLOBAL g)
int BLKSPCARI::BlockEval(PGLOBAL)
{
int mincmp, maxcmp, n, m;

Expand Down Expand Up @@ -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). */
/***********************************************************************/
void BLKFILIN::Reset(PGLOBAL g)
void BLKFILIN::Reset(PGLOBAL)
{
Arap->Reset();
// MakeValueBitmap(); // Does nothing for class BLKFILIN
Expand Down Expand Up @@ -736,7 +736,7 @@ void BLKFILIN2::MakeValueBitmap(void)
/* ended string in case of string argument. This is because the ARRAY */
/* can have a different width than the char column. */
/***********************************************************************/
int BLKFILIN2::BlockEval(PGLOBAL g)
int BLKFILIN2::BlockEval(PGLOBAL)
{
if (N < 0)
return Result; // Was set in MakeValueBitmap
Expand Down Expand Up @@ -909,7 +909,7 @@ int BLKFILIN2::BlockEval(PGLOBAL g)
/***********************************************************************/
/* 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)
: BLOCKFILTER(tdbp, op)
{
Expand All @@ -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). */
/***********************************************************************/
void BLKSPCIN::Reset(PGLOBAL g)
void BLKSPCIN::Reset(PGLOBAL)
{
Arap->Reset();
} // end of Reset
Expand Down
10 changes: 5 additions & 5 deletions storage/connect/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#if !defined(BLOCK_DEFINED)
#define BLOCK_DEFINED

#if defined(WIN32) && !defined(NOEX)
#if defined(__WIN__) && !defined(NOEX)
#define DllExport __declspec( dllexport )
#else // !WIN32
#else // !__WIN__
#define DllExport
#endif // !WIN32
#endif // !__WIN__

/***********************************************************************/
/* Definition of class BLOCK with its method function new. */
Expand All @@ -38,7 +38,7 @@ typedef class BLOCK *PBLOCK;
class DllExport BLOCK {
public:
void * operator new(size_t size, PGLOBAL g, void *p = NULL) {
// if (trace > 2)
// if (trace > 3)
// htrc("New BLOCK: size=%d g=%p p=%p\n", size, g, p);

return (PlugSubAlloc(g, p, size));
Expand All @@ -50,7 +50,7 @@ class DllExport BLOCK {
#if !defined(__BORLANDC__)
// Avoid warning C4291 by defining a matching dummy delete operator
void operator delete(void *, PGLOBAL, void *) {}
void operator delete(void *ptr,size_t size) {}
void operator delete(void *, size_t) {}
#endif
virtual ~BLOCK() {}

Expand Down
48 changes: 22 additions & 26 deletions storage/connect/catalog.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*************** Catalog H Declares Source Code File (.H) **************/
/* 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. */
/***********************************************************************/
Expand Down Expand Up @@ -73,33 +73,29 @@ class DllExport CATALOG {
// Methods
virtual void Reset(void) {}
//virtual void SetDataPath(PGLOBAL g, const char *path) {}
virtual bool CheckName(PGLOBAL g, char *name) {return true;}
virtual bool ClearName(PGLOBAL g, PSZ name) {return true;}
virtual PRELDEF MakeOneTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am) {return NULL;}
virtual PRELDEF GetTableDescEx(PGLOBAL g, PTABLE tablep) {return NULL;}
virtual PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name, LPCSTR type,
PRELDEF *prp = NULL) {return NULL;}
virtual PRELDEF GetFirstTable(PGLOBAL g) {return NULL;}
virtual PRELDEF GetNextTable(PGLOBAL g) {return NULL;}
virtual bool TestCond(PGLOBAL g, const char *name, const char *type)
{return true;}
virtual bool DropTable(PGLOBAL g, PSZ name, bool erase) {return true;}
virtual PTDB GetTable(PGLOBAL g, PTABLE tablep,
MODE mode = MODE_READ, LPCSTR type = NULL)
{return NULL;}
virtual void TableNames(PGLOBAL g, char *buffer, int maxbuf, int info[]) {}
virtual void ColumnNames(PGLOBAL g, char *tabname, char *buffer,
int maxbuf, int info[]) {}
virtual void ColumnDefs(PGLOBAL g, char *tabname, char *buffer,
int maxbuf, int info[]) {}
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) {}
virtual bool CheckName(PGLOBAL, char*) {return true;}
virtual bool ClearName(PGLOBAL, PSZ) {return true;}
virtual PRELDEF MakeOneTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;}
virtual PRELDEF GetTableDescEx(PGLOBAL, PTABLE) {return NULL;}
virtual PRELDEF GetTableDesc(PGLOBAL, LPCSTR, LPCSTR,
PRELDEF* = NULL) {return NULL;}
virtual PRELDEF GetFirstTable(PGLOBAL) {return NULL;}
virtual PRELDEF GetNextTable(PGLOBAL) {return NULL;}
virtual bool TestCond(PGLOBAL, const char*, const char*) {return true;}
virtual bool DropTable(PGLOBAL, PSZ, bool) {return true;}
virtual PTDB GetTable(PGLOBAL, PTABLE,
MODE = MODE_READ, LPCSTR = NULL) {return NULL;}
virtual void TableNames(PGLOBAL, char*, int, int[]) {}
virtual void ColumnNames(PGLOBAL, char*, char*, int, int[]) {}
virtual void ColumnDefs(PGLOBAL, char*, char*, int, int[]) {}
virtual void *DecodeValues(PGLOBAL, char*, char*, char*,
int, int[]) {return NULL;}
virtual int ColumnType(PGLOBAL, char*, char*) {return 0;}
virtual void ClearDB(PGLOBAL) {}

protected:
virtual bool ClearSection(PGLOBAL g, const char *key, const char *section) {return true;}
virtual PRELDEF MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am) {return NULL;}
virtual bool ClearSection(PGLOBAL, const char*, const char*) {return true;}
virtual PRELDEF MakeTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;}

// Members
char *Cbuf; /* Buffer used for col section */
Expand Down
18 changes: 9 additions & 9 deletions storage/connect/colblk.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/************* Colblk C++ Functions Source Code File (.CPP) ************/
/* 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. */
/***********************************************************************/
Expand Down Expand Up @@ -111,7 +111,7 @@ bool COLBLK::Compare(PXOB xp)
/***********************************************************************/
/* SetFormat: function used to set SELECT output format. */
/***********************************************************************/
bool COLBLK::SetFormat(PGLOBAL g, FORMAT& fmt)
bool COLBLK::SetFormat(PGLOBAL, FORMAT& fmt)
{
fmt = Format;

Expand Down Expand Up @@ -175,7 +175,7 @@ bool COLBLK::InitValue(PGLOBAL g)
/***********************************************************************/
/* 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");
return true;
Expand Down Expand Up @@ -214,7 +214,7 @@ void COLBLK::WriteColumn(PGLOBAL g)
/***********************************************************************/
/* 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];
int i;
Expand All @@ -237,7 +237,7 @@ void COLBLK::Print(PGLOBAL g, FILE *f, uint n)
/***********************************************************************/
/* 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);
} // end of Print
Expand Down Expand Up @@ -297,9 +297,9 @@ FIDBLK::FIDBLK(PCOLUMN cp, OPVAL op) : SPCBLK(cp), Op(op)
Buf_Type = TYPE_STRING;
*Format.Type = 'C';
Format.Length = Long;
#if defined(WIN32)
#if defined(__WIN__)
Format.Prec = 1; // Case insensitive
#endif // WIN32
#endif // __WIN__
Constant = (!((PTDBASE)To_Tdb)->GetDef()->GetMultiple() &&
To_Tdb->GetAmType() != TYPE_AM_PLG &&
To_Tdb->GetAmType() != TYPE_AM_PLM);
Expand Down Expand Up @@ -347,7 +347,7 @@ TIDBLK::TIDBLK(PCOLUMN cp) : SPCBLK(cp)
/***********************************************************************/
/* ReadColumn: what this routine does is to return the table ID. */
/***********************************************************************/
void TIDBLK::ReadColumn(PGLOBAL g)
void TIDBLK::ReadColumn(PGLOBAL)
{
if (Tname == NULL) {
Tname = (char*)To_Tdb->GetName();
Expand Down Expand Up @@ -406,7 +406,7 @@ SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp)
/***********************************************************************/
/* ReadColumn: what this routine does is to return the server ID. */
/***********************************************************************/
void SIDBLK::ReadColumn(PGLOBAL g)
void SIDBLK::ReadColumn(PGLOBAL)
{
//if (Sname == NULL) {
Sname = (char*)To_Tdb->GetServer();
Expand Down
6 changes: 3 additions & 3 deletions storage/connect/colblk.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*************** Colblk H Declares Source Code File (.H) ***************/
/* 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. */
/***********************************************************************/
Expand All @@ -23,7 +23,7 @@ class DllExport COLBLK : public XOBJECT {
// Default constructors used by derived classes
COLBLK(PCOLDEF cdp = NULL, PTDB tdbp = NULL, int i = 0);
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:
// Implementation
Expand Down Expand Up @@ -69,7 +69,7 @@ class DllExport COLBLK : public XOBJECT {
virtual bool IsSpecial(void) {return false;}
virtual bool Eval(PGLOBAL g);
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 WriteColumn(PGLOBAL g);
virtual void Print(PGLOBAL g, FILE *, uint);
Expand Down
Loading

0 comments on commit 569d2f8

Please sign in to comment.