summaryrefslogtreecommitdiff
path: root/storage/connect/tabodbc.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-02-12 12:34:14 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2013-02-12 12:34:14 +0100
commit88c76f3b70def1a26f15c7ea23759369ba28392d (patch)
tree87b9e449177ddecf4a12f205da84ab40644e3c42 /storage/connect/tabodbc.cpp
parentb91386c2f6964c03de353aa5155e06098055de09 (diff)
downloadmariadb-git-88c76f3b70def1a26f15c7ea23759369ba28392d.tar.gz
All use of a character to represent table types or
catalog functions have been changed: Table_types are now internally represented be enum TABTYPE. Catalog function names are internally translated to a uint. The function GetTypeID was modified accordingly and a new function GetFuncID was implemented in mycat.cc. Modified: ha_connect.cc odbccat.h odbconn.cpp tabodbc.cpp tabfmt.cpp tabmysql.h tabmysql.cpp tabwmi.cpp mycat.h mycat.cc plgdbsem.h reldef.h tabdos.cpp rcmsg.h
Diffstat (limited to 'storage/connect/tabodbc.cpp')
-rw-r--r--storage/connect/tabodbc.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp
index 276834b4e5e..876467c9706 100644
--- a/storage/connect/tabodbc.cpp
+++ b/storage/connect/tabodbc.cpp
@@ -64,6 +64,7 @@
/***********************************************************************/
#include "global.h"
#include "plgdbsem.h"
+#include "mycat.h"
#include "xtable.h"
#include "tabodbc.h"
#include "odbccat.h"
@@ -102,7 +103,7 @@ bool ODBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Desc = Connect = Cat->GetStringCatInfo(g, Name, "Connect", "");
Tabname = Cat->GetStringCatInfo(g, Name, "Name",
- Catfunc == 'T' ? NULL : Name);
+ (Catfunc & (FNC_TABLE || FNC_COL)) ? NULL : Name);
Tabname = Cat->GetStringCatInfo(g, Name, "Tabname", Tabname);
Tabowner = Cat->GetStringCatInfo(g, Name, "Owner", "");
Tabqual = Cat->GetStringCatInfo(g, Name, "Qualifier", "");
@@ -125,16 +126,16 @@ PTDB ODBCDEF::GetTable(PGLOBAL g, MODE m)
/* Column blocks will be allocated only when needed. */
/*********************************************************************/
switch (Catfunc) {
- case 'C':
+ case FNC_COL:
tdbp = new(g) TDBOCL(this);
break;
- case 'T':
+ case FNC_TABLE:
tdbp = new(g) TDBOTB(this);
break;
- case 'S':
+ case FNC_DSN:
tdbp = new(g) TDBSRC(this);
break;
- case 'D':
+ case FNC_DRIVER:
tdbp = new(g) TDBDRV(this);
break;
default:
@@ -950,7 +951,7 @@ PQRYRES TDBOTB::GetResult(PGLOBAL g)
/***********************************************************************/
PQRYRES TDBOCL::GetResult(PGLOBAL g)
{
- return MyODBCCols(g, Dsn, Tab, false);
+ return ODBCColumns(g, Dsn, Tab, NULL, false);
} // end of GetResult
/* ------------------------ End of Tabodbc --------------------------- */