1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
This commit is contained in:
Olivier Bertrand
2013-02-12 12:34:14 +01:00
parent b91386c2f6
commit 88c76f3b70
14 changed files with 276 additions and 263 deletions

View File

@ -10,7 +10,7 @@
#include "global.h"
#include "plgdbsem.h"
//#include "catalog.h"
#include "mycat.h"
#include "reldef.h"
#include "xtable.h"
#include "colblk.h"
@ -344,7 +344,7 @@ bool WMIDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
Wclass = strcat(strcpy(p, "Win32_"), Wclass);
} // endif Wclass
if (!Catfunc)
if (Catfunc == FNC_NO)
Ems = Cat->GetIntCatInfo(Name, "Estimate", 100);
return false;
@ -355,12 +355,12 @@ bool WMIDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
/***********************************************************************/
PTDB WMIDEF::GetTable(PGLOBAL g, MODE m)
{
if (!Catfunc)
if (Catfunc == FNC_NO)
return new(g) TDBWMI(this);
else if (Catfunc == 'C')
else if (Catfunc == FNC_COL)
return new(g) TDBWCL(this);
sprintf(g->Message, "Bad catfunc %c for WMI", Catfunc);
sprintf(g->Message, "Bad catfunc %ud for WMI", Catfunc);
return NULL;
} // end of GetTable