summaryrefslogtreecommitdiff
path: root/storage/connect/tabtbl.h
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-04-29 13:50:20 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2013-04-29 13:50:20 +0200
commit4fd74200dd8ff357b7f870ea0407ef8f3c78ff11 (patch)
treed297698912fdf321efb715957a62ffd2b7e5e099 /storage/connect/tabtbl.h
parentbc80fb07ded7abcfb99d368d14e4c5e81a669101 (diff)
downloadmariadb-git-4fd74200dd8ff357b7f870ea0407ef8f3c78ff11.tar.gz
- Adding 3 new table types:
PROXY table base on another table. Used by several other types. XCOL proxy on a table having a colummn containing a list of values OCCUR proxy on a table having several columns containing the same type of values that can be put in a unique column and several rows. TBL Not new but now internally using the PROXY table class. - Fix 2 bugs in add_field: Change '=' to ' ' after the COMMENT keyword. Quote column names between '`' in the SQL string. - Update xml test result to the CONNECT version added: storage/connect/taboccur.cpp storage/connect/taboccur.h storage/connect/tabutil.cpp storage/connect/tabutil.h storage/connect/tabxcl.cpp storage/connect/tabxcl.h modified: storage/connect/CMakeLists.txt storage/connect/ha_connect.cc storage/connect/ha_connect.h storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/xml.result storage/connect/plgdbsem.h storage/connect/tabmysql.cpp storage/connect/tabtbl.cpp storage/connect/tabtbl.h storage/connect/valblk.cpp storage/connect/valblk.h
Diffstat (limited to 'storage/connect/tabtbl.h')
-rw-r--r--storage/connect/tabtbl.h49
1 files changed, 18 insertions, 31 deletions
diff --git a/storage/connect/tabtbl.h b/storage/connect/tabtbl.h
index 07a20bb2867..d241b00743e 100644
--- a/storage/connect/tabtbl.h
+++ b/storage/connect/tabtbl.h
@@ -1,41 +1,30 @@
/*************** TabTbl H Declares Source Code File (.H) ***************/
/* Name: TABTBL.H Version 1.2 */
/* */
-/* (C) Copyright to the author Olivier BERTRAND 2008-2012 */
+/* (C) Copyright to the author Olivier BERTRAND 2008-2013 */
/* */
/* This file contains the TDBTBL classes declares. */
/***********************************************************************/
-//#include "osutil.h"
#include "block.h"
#include "colblk.h"
+#include "tabutil.h"
typedef class TBLDEF *PTBLDEF;
typedef class TDBTBL *PTDBTBL;
-typedef class TBLCOL *PTBLCOL;
-
-/***********************************************************************/
-/* Defines the structure used for multiple tables. */
-/***********************************************************************/
-typedef struct _tablist *PTBL;
-
-typedef struct _tablist {
- PTBL Next;
- char *Name;
- char *DB;
- } TBLIST;
/***********************************************************************/
/* TBL table. */
/***********************************************************************/
-class DllExport TBLDEF : public TABDEF { /* Logical table description */
+class DllExport TBLDEF : public PRXDEF { /* Logical table description */
friend class TDBTBL;
+ friend class TDBTBC;
public:
// Constructor
TBLDEF(void);
// Implementation
virtual const char *GetType(void) {return "TBL";}
- PTBL GetTables(void) {return To_Tables;}
+//PTABLE GetTables(void) {return Tablep;}
//int GetNtables(void) {return Ntables;}
// Methods
@@ -44,7 +33,7 @@ class DllExport TBLDEF : public TABDEF { /* Logical table description */
protected:
// Members
- PTBL To_Tables; /* To the list of tables */
+//PTABLE To_Tables; /* To the list of tables */
bool Accept; /* TRUE if bad tables are accepted */
int Maxerr; /* Maximum number of bad tables */
int Ntables; /* Number of tables */
@@ -53,50 +42,46 @@ class DllExport TBLDEF : public TABDEF { /* Logical table description */
/***********************************************************************/
/* This is the TBL Access Method class declaration. */
/***********************************************************************/
-class DllExport TDBTBL : public TDBASE {
- friend class TBLCOL;
+class DllExport TDBTBL : public TDBPRX {
+//friend class TBLCOL;
friend class TBTBLK;
friend class TDBPLG;
public:
// Constructor
TDBTBL(PTBLDEF tdp = NULL);
-//TDBTBL(PTDBTBL tdbp);
// Implementation
virtual AMT GetAmType(void) {return TYPE_AM_TBL;}
-//virtual PTDB Duplicate(PGLOBAL g)
-// {return (PTDB)new(g) TDBTBL(this);}
// Methods
virtual void ResetDB(void);
//virtual PTABLE GetTablist(void) {return (PSZ)Tablist;}
-//virtual PTDB CopyOne(PTABS t);
virtual int GetRecpos(void) {return Rows;}
virtual int GetBadLines(void) {return (int)Nbf;}
// Database routines
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
virtual int GetMaxSize(PGLOBAL g);
- virtual int GetProgMax(PGLOBAL g);
- virtual int GetProgCur(void);
+//virtual int GetProgMax(PGLOBAL g);
+//virtual int GetProgCur(void);
virtual int RowNumber(PGLOBAL g, bool b = FALSE);
virtual PCOL InsertSpecialColumn(PGLOBAL g, PCOL scp);
virtual bool OpenDB(PGLOBAL g);
virtual int ReadDB(PGLOBAL g);
- virtual int WriteDB(PGLOBAL g);
- virtual int DeleteDB(PGLOBAL g, int irc);
- virtual void CloseDB(PGLOBAL g);
+//virtual int WriteDB(PGLOBAL g);
+//virtual int DeleteDB(PGLOBAL g, int irc);
+//virtual void CloseDB(PGLOBAL g);
protected:
// Internal functions
- PTDB GetSubTable(PGLOBAL g, PTBL tblp, PTABLE tabp);
+//PTDB GetSubTable(PGLOBAL g, PTBL tblp, PTABLE tabp);
bool InitTableList(PGLOBAL g);
- bool TestFil(PGLOBAL g, PFIL filp, PTBL tblp);
+ bool TestFil(PGLOBAL g, PFIL filp, PTABLE tabp);
// Members
PTABLE Tablist; // Points to the table list
PTABLE CurTable; // Points to the current table
- PTDBASE Tdbp; // Current table PTDB
+//PTDBASE Tdbp; // Current table PTDB
bool Accept; // TRUE if bad tables are accepted
int Maxerr; // Maximum number of bad tables
int Nbf; // Number of bad connections
@@ -104,6 +89,7 @@ class DllExport TDBTBL : public TDBASE {
int Crp; // Used for CurPos
}; // end of class TDBTBL
+#if 0
/***********************************************************************/
/* Class TBLCOL: TBL access method column descriptor. */
/* This A.M. is used for TBL tables. */
@@ -136,6 +122,7 @@ class DllExport TBLCOL : public COLBLK {
bool Pseudo; // TRUE for special columns
int Colnum; // Used when retrieving columns by number
}; // end of class TBLCOL
+#endif // 0
/***********************************************************************/
/* Class TBTBLK: TDBPLG TABID special column descriptor. */