Skip to content
Permalink
Browse files
Merge remote-tracking branch 'connect/10.0' into 10.0
  • Loading branch information
cvicentiu committed May 16, 2017
2 parents f186129 + fd03356 commit a111642
Show file tree
Hide file tree
Showing 102 changed files with 3,563 additions and 4,083 deletions.
@@ -18,10 +18,10 @@ SET(CONNECT_PLUGIN_DYNAMIC "connect")

SET(CONNECT_SOURCES
ha_connect.cc connect.cc user_connect.cc mycat.cc
fmdlex.c osutil.c plugutil.c rcmsg.c rcmsg.h
fmdlex.c osutil.c rcmsg.c rcmsg.h
array.cpp blkfil.cpp colblk.cpp csort.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamgz.cpp filamtxt.cpp
filter.cpp json.cpp jsonudf.cpp maputil.cpp myconn.cpp myutil.cpp plgdbutl.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamgz.cpp filamtxt.cpp filter.cpp
json.cpp jsonudf.cpp maputil.cpp myconn.cpp myutil.cpp plgdbutl.cpp plugutil.cpp
reldef.cpp tabcol.cpp tabdos.cpp tabext.cpp tabfix.cpp tabfmt.cpp tabjson.cpp
table.cpp tabmul.cpp tabmysql.cpp taboccur.cpp tabpivot.cpp tabsys.cpp tabtbl.cpp
tabutil.cpp tabvir.cpp tabxcl.cpp valblk.cpp value.cpp xindex.cpp xobject.cpp
@@ -38,7 +38,7 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h)
# Definitions that are shared for all OSes
#
add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS)
add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT )
add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT -DUSE_TRY )


#
@@ -518,8 +518,8 @@ bool ARRAY::FilTest(PGLOBAL g, PVAL valp, OPVAL opc, int opm)
vp = valp;

} else if (opc != OP_EXIST) {
sprintf(g->Message, MSG(MISSING_ARG), opc);
longjmp(g->jumper[g->jump_level], TYPE_ARRAY);
sprintf(g->Message, MSG(MISSING_ARG), opc);
throw TYPE_ARRAY;
} else // OP_EXIST
return Nval > 0;

@@ -681,15 +681,15 @@ void ARRAY::SetPrecision(PGLOBAL g, int p)
{
if (Vblp == NULL) {
strcpy(g->Message, MSG(PREC_VBLP_NULL));
longjmp(g->jumper[g->jump_level], TYPE_ARRAY);
throw TYPE_ARRAY;
} // endif Vblp

bool was = Vblp->IsCi();

if (was && !p) {
strcpy(g->Message, MSG(BAD_SET_CASE));
longjmp(g->jumper[g->jump_level], TYPE_ARRAY);
} // endif Vblp
throw TYPE_ARRAY;
} // endif Vblp

if (was || !p)
return;
@@ -699,7 +699,7 @@ void ARRAY::SetPrecision(PGLOBAL g, int p)
if (!was && Type == TYPE_STRING)
// Must be resorted to eliminate duplicate strings
if (Sort(g))
longjmp(g->jumper[g->jump_level], TYPE_ARRAY);
throw TYPE_ARRAY;

} // end of SetPrecision

@@ -977,7 +977,7 @@ PSZ ARRAY::MakeArrayList(PGLOBAL g)
size_t z, len = 2;

if (Type == TYPE_LIST)
return "(?" "?" "?)"; // To be implemented
return (PSZ)("(?" "?" "?)"); // To be implemented

z = MY_MAX(24, GetTypeSize(Type, Len) + 4);
tp = (char*)PlugSubAlloc(g, NULL, z);
@@ -1,11 +1,11 @@
/************* BlkFil C++ Program Source Code File (.CPP) **************/
/* PROGRAM NAME: BLKFIL */
/* ------------- */
/* Version 2.5 */
/* Version 2.6 */
/* */
/* COPYRIGHT: */
/* ---------- */
/* (C) Copyright to the author Olivier BERTRAND 2004-2015 */
/* (C) Copyright to the author Olivier BERTRAND 2004-2017 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -595,8 +595,8 @@ BLKFILIN::BLKFILIN(PGLOBAL g, PTDBDOS tdbp, int op, int opm, PXOB *xp)

if (Colp->GetResultType() != Type) {
sprintf(g->Message, "BLKFILIN: %s", MSG(VALTYPE_NOMATCH));
longjmp(g->jumper[g->jump_level], 99);
} else if (Colp->GetValue()->IsCi())
throw g->Message;
} else if (Colp->GetValue()->IsCi())
Arap->SetPrecision(g, 1); // Case insensitive

Sorted = Colp->IsSorted() > 0;
@@ -36,7 +36,7 @@ typedef struct _curtab {
/* Defines the structure used to get column catalog info. */
/***********************************************************************/
typedef struct _colinfo {
char *Name;
PCSZ Name;
int Type;
int Offset;
int Length;
@@ -45,9 +45,9 @@ typedef struct _colinfo {
int Scale;
int Opt;
int Freq;
char *Remark;
char *Datefmt;
char *Fieldfmt;
PCSZ Remark;
PCSZ Datefmt;
PCSZ Fieldfmt;
ushort Flags; // Used by MariaDB CONNECT handlers
} COLINFO, *PCOLINFO;

@@ -68,17 +68,15 @@ class DllExport CATALOG {
bool GetDefHuge(void) {return DefHuge;}
void SetDefHuge(bool b) {DefHuge = b;}
char *GetCbuf(void) {return Cbuf;}
//char *GetDataPath(void) {return (char*)DataPath;}

// Methods
virtual void Reset(void) {}
//virtual void SetDataPath(PGLOBAL g, const char *path) {}
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 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;}
@@ -95,14 +93,13 @@ class DllExport CATALOG {

protected:
virtual bool ClearSection(PGLOBAL, const char*, const char*) {return true;}
/*virtual PRELDEF MakeTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;}*/
//virtual PRELDEF MakeTableDesc(PGLOBAL, LPCSTR, LPCSTR) {return NULL;}

// Members
char *Cbuf; /* Buffer used for col section */
int Cblen; /* Length of suballoc. buffer */
CURTAB Ctb; /* Used to enumerate tables */
bool DefHuge; /* true: tables default to huge */
//LPCSTR DataPath; /* Is the Path of DB data dir */
}; // end of class CATALOG

#endif // __CATALOG__H
@@ -195,21 +195,21 @@ int COLBLK::GetLengthEx(void)
/* corresponding to this column and convert it to buffer type. */
/***********************************************************************/
void COLBLK::ReadColumn(PGLOBAL g)
{
{
sprintf(g->Message, MSG(UNDEFINED_AM), "ReadColumn");
longjmp(g->jumper[g->jump_level], TYPE_COLBLK);
} // end of ReadColumn
throw TYPE_COLBLK;
} // end of ReadColumn

/***********************************************************************/
/* WriteColumn: what this routine does is to access the last line */
/* read from the corresponding table, and rewrite the field */
/* corresponding to this column from the column buffer and type. */
/***********************************************************************/
void COLBLK::WriteColumn(PGLOBAL g)
{
{
sprintf(g->Message, MSG(UNDEFINED_AM), "WriteColumn");
longjmp(g->jumper[g->jump_level], TYPE_COLBLK);
} // end of WriteColumn
throw TYPE_COLBLK;
} // end of WriteColumn

/***********************************************************************/
/* Make file output of a column descriptor block. */
@@ -260,10 +260,10 @@ SPCBLK::SPCBLK(PCOLUMN cp)
/* corresponding to this column from the column buffer and type. */
/***********************************************************************/
void SPCBLK::WriteColumn(PGLOBAL g)
{
{
sprintf(g->Message, MSG(SPCOL_READONLY), Name);
longjmp(g->jumper[g->jump_level], TYPE_COLBLK);
} // end of WriteColumn
throw TYPE_COLBLK;
} // end of WriteColumn

/***********************************************************************/
/* RIDBLK constructor for the ROWID special column. */
@@ -377,7 +377,7 @@ PRTBLK::PRTBLK(PCOLUMN cp) : SPCBLK(cp)
void PRTBLK::ReadColumn(PGLOBAL g)
{
if (Pname == NULL) {
char *p;
const char *p;

Pname = To_Tdb->GetDef()->GetStringCatInfo(g, "partname", "?");
p = strrchr(Pname, '#');
@@ -407,7 +407,7 @@ SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp)
void SIDBLK::ReadColumn(PGLOBAL)
{
//if (Sname == NULL) {
Sname = (char*)To_Tdb->GetServer();
Sname = To_Tdb->GetServer();
Value->SetValue_psz(Sname);
// } // endif Sname

@@ -154,7 +154,7 @@ class DllExport FIDBLK : public SPCBLK {
virtual void ReadColumn(PGLOBAL g);

protected:
PSZ Fn; // The current To_File of the table
PCSZ Fn; // The current To_File of the table
OPVAL Op; // The file part operator
}; // end of class FIDBLK

@@ -178,7 +178,7 @@ class DllExport TIDBLK : public SPCBLK {
TIDBLK(void) {}

// Members
PSZ Tname; // The current table name
PCSZ Tname; // The current table name
}; // end of class TIDBLK

/***********************************************************************/
@@ -201,7 +201,7 @@ class DllExport PRTBLK : public SPCBLK {
PRTBLK(void) {}

// Members
PSZ Pname; // The current partition name
PCSZ Pname; // The current partition name
}; // end of class PRTBLK

/***********************************************************************/
@@ -224,7 +224,7 @@ class DllExport SIDBLK : public SPCBLK {
SIDBLK(void) {}

// Members
PSZ Sname; // The current server name
PCSZ Sname; // The current server name
}; // end of class SIDBLK

#endif // __COLBLK__H

0 comments on commit a111642

Please sign in to comment.