diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-02-11 00:31:03 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-02-11 00:31:03 +0100 |
commit | f6ca3b05f230498ede5f4d2467719d529abbb14a (patch) | |
tree | 837b0f2bc017208312a51b1b546bc693c09d5e7c /storage/connect/tabodbc.h | |
parent | b93db097a3bca6273e2906de4cafe2a1a60ededf (diff) | |
download | mariadb-git-f6ca3b05f230498ede5f4d2467719d529abbb14a.tar.gz |
Bug fixed: Column charset were not handled on read.
Modified: ha_connect.cc (MakeRecord)
Moved PlgAllocResult to plgdbutl.cpp
Modified:
mycat.cpp
plgdbutl.cpp
Continuing implementing the "catalog" tables (ex "info").
Already existing were the ODBC data source table and the
WMI column info table.
The common way to handle them was modified to enable each
table types to send personalized data.
Now takes care of all existing catalog functions for table
types that can retrieve and use such information.
Modified:
ha_connect.cc
odbconn.cpp
tabodbc.h
tabodbc.cpp
tabfmt.h
tabfmt.cpp
tabmysql.h
tabmysql.cpp
tabwmi.h
tabwmi.cpp
myconn.h
myconn.cpp
filamdbf.cpp
plgdbsem.h
reldef.h
reldef.cpp
tabdos.h
tabdos.cpp
tabfix.h
xtable.h
table.cpp
Diffstat (limited to 'storage/connect/tabodbc.h')
-rw-r--r-- | storage/connect/tabodbc.h | 101 |
1 files changed, 18 insertions, 83 deletions
diff --git a/storage/connect/tabodbc.h b/storage/connect/tabodbc.h index f31c005e3d8..645426eef78 100644 --- a/storage/connect/tabodbc.h +++ b/storage/connect/tabodbc.h @@ -44,7 +44,6 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */ PSZ Tabowner; /* External table owner */ PSZ Tabqual; /* External table qualifier */ PSZ Qchar; /* Identifier quoting character */ - char Catfunc; /* Catalog function */ int Catver; /* ODBC version for catalog functions */ int Options; /* Open connection options */ }; // end of ODBCDEF @@ -164,127 +163,63 @@ class ODBCCOL : public COLBLK { }; // end of class ODBCCOL /***********************************************************************/ -/* This is the base class declaration for the ODBC info tables. */ -/***********************************************************************/ -class TDBOIF : public TDBASE { - friend class OIFCOL; - public: - // Constructor - TDBOIF(PODEF tdp); - - // Implementation - virtual AMT GetAmType(void) {return TYPE_AM_ODBC;} - - // Methods - virtual int GetRecpos(void) {return N;} - virtual int GetProgCur(void) {return N;} - virtual int RowNumber(PGLOBAL g, bool b = false) {return N + 1;} - - // Database routines - virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n); - virtual int GetMaxSize(PGLOBAL g); - 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); - - protected: - // Specific routines - virtual bool Initialize(PGLOBAL g) = 0; - bool InitCol(PGLOBAL g); - - // Members - PQRYRES Qrp; - int ID; // Base of Column names - int NC; // Number of valid flags - int N; // Row number - bool Init; - }; // end of class TDBOIF - -/***********************************************************************/ -/* Class OIFCOL: ODBC info column. */ -/***********************************************************************/ -class OIFCOL : public COLBLK { - friend class TDBOIF; - public: - // Constructors - OIFCOL(PCOLDEF cdp, PTDB tdbp, int n); - - // Implementation - virtual int GetAmType(void) {return TYPE_AM_ODBC;} - - // Methods - virtual void ReadColumn(PGLOBAL g); - - protected: - OIFCOL(void) {} // Default constructor not to be used - - // Members - PTDBOIF Tdbp; // Points to ODBC table block - PCOLRES Crp; // The column data array - int Flag; - }; // end of class OIFCOL - -/***********************************************************************/ /* This is the class declaration for the Data Sources catalog table. */ /***********************************************************************/ -class TDBSRC : public TDBOIF { +class TDBSRC : public TDBCAT { public: // Constructor - TDBSRC(PODEF tdp) : TDBOIF(tdp) {ID = IDS_DSRC; NC = 2;} + TDBSRC(PODEF tdp) : TDBCAT(tdp) {} protected: // Specific routines - virtual bool Initialize(PGLOBAL g); + virtual PQRYRES GetResult(PGLOBAL g); }; // end of class TDBSRC /***********************************************************************/ /* This is the class declaration for the Drivers catalog table. */ /***********************************************************************/ -class TDBDRV : public TDBOIF { +class TDBDRV : public TDBCAT { public: // Constructor - TDBDRV(PODEF tdp) : TDBOIF(tdp) {ID = IDS_DRIVER; NC = 2;} + TDBDRV(PODEF tdp) : TDBCAT(tdp) {} protected: // Specific routines - virtual bool Initialize(PGLOBAL g); + virtual PQRYRES GetResult(PGLOBAL g); }; // end of class TDBDRV /***********************************************************************/ -/* This is the class declaration for the columns catalog table. */ +/* This is the class declaration for the tables catalog table. */ /***********************************************************************/ -class TDBOCL : public TDBOIF { +class TDBOTB : public TDBCAT { public: // Constructor - TDBOCL(PODEF tdp); + TDBOTB(PODEF tdp); protected: // Specific routines - virtual bool Initialize(PGLOBAL g); + virtual PQRYRES GetResult(PGLOBAL g); // Members char *Dsn; // Points to connection string - char *Tabn; // Points to ODBC table name - }; // end of class TDBOCL + char *Tab; // Points to ODBC table name or pattern + }; // end of class TDBOTB /***********************************************************************/ -/* This is the class declaration for the tables catalog table. */ +/* This is the class declaration for the columns catalog table. */ /***********************************************************************/ -class TDBOTB : public TDBOIF { +class TDBOCL : public TDBOTB { public: // Constructor - TDBOTB(PODEF tdp); + TDBOCL(PODEF tdp) : TDBOTB(tdp) {} protected: // Specific routines - virtual bool Initialize(PGLOBAL g); + virtual PQRYRES GetResult(PGLOBAL g); // Members - char *Dsn; // Points to connection string - char *Tabpat; // Points to ODBC table pattern - }; // end of class TDBOTB + }; // end of class TDBOCL + #endif // !NODBC |