diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-02-08 03:48:47 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-02-08 03:48:47 +0100 |
commit | ec2112f32d423aea353feef388ed31e36337de2b (patch) | |
tree | 6a1aa21ceb14d79abef39cc9770b5ed88ac04218 /storage | |
parent | 2809803ee272e8ba0fb15110c69635fe43f02331 (diff) | |
download | mariadb-git-ec2112f32d423aea353feef388ed31e36337de2b.tar.gz |
1) Fix bug on strange sprintf
2) Fix bug on bad sprintf
3) Fix bug on cast from pointer to int
4) Begin implementing the "info" tables.
Already existing were the ODBC sata source table and the
WMI column info table.
A common way to handle them will permit to develop many
other such tables. Implemented:
The ODBC column info table.
Modified:
ha_connect.cc (4)
odbconn.cpp (4)
tabodbc.h (4)
tabodbc.cpp (4)
tabsys.h (3)
rcmsg.c (4)
tabfmt.cpp (2)
tabtbl.cpp (1)
resource.h (4)
mycat.h (4)
Diffstat (limited to 'storage')
-rw-r--r-- | storage/connect/ha_connect.cc | 8 | ||||
-rw-r--r-- | storage/connect/odbconn.cpp | 5 | ||||
-rw-r--r-- | storage/connect/tabodbc.cpp | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 3dc8880865f..eaab8bf1f12 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -161,8 +161,10 @@ PQRYRES ODBCDataSources(PGLOBAL g, bool info = true); PQRYRES MyODBCCols(PGLOBAL g, char *tab, char *dsn, bool info); #endif // ODBC_SUPPORT #if defined(MYSQL_SUPPORT) -PQRYRES MyColumns(PGLOBAL g, char *host, char *db, char *user, char *pwd, - char *table, char *colpat, int port, bool key); +PQRYRES MyColumns(PGLOBAL g, const char *host, const char *db, + const char *user, const char *pwd, + const char *table, const char *colpat, + int port, bool key); #endif // MYSQL_SUPPORT enum enum_field_types PLGtoMYSQL(int type, bool gdf); @@ -3283,7 +3285,7 @@ bool ha_connect::pre_create(THD *thd, void *crt_info, void *alt_info) char ttp= '?', spc= ',', qch= 0; const char *typn= "DOS"; const char *user; - char *fn, *dsn, *tab, *db, *host, *user, *pwd, *prt, *sep, *inf; + char *fn, *dsn, *tab, *db, *host, *pwd, *prt, *sep, *inf; #if defined(WIN32) char *nsp= NULL, *cls= NULL; #endif // WIN32 diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index da76bbec5f2..ac40fb8b4bb 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -339,7 +339,8 @@ PQRYRES MyODBCCols(PGLOBAL g, char *tab, char *dsn, bool info) /************************************************************************/ /* Close the local connection. */ /************************************************************************/ - ocp->Close(); + if (ocp) + ocp->Close(); if (!qrp) return NULL; // Error in ODBCColumns @@ -379,7 +380,7 @@ PQRYRES MyODBCCols(PGLOBAL g, char *tab, char *dsn, bool info) /* data sources available on the local host. */ /* Called with info=true to have result column names. */ /*************************************************************************/ -PQRYRES ODBCDataSources(PGLOBAL g) +PQRYRES ODBCDataSources(PGLOBAL g, bool info) { static int dbtype[] = {DB_CHAR, DB_CHAR}; static int buftyp[] = {TYPE_STRING, TYPE_STRING}; diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp index f31c1330004..31f696577cb 100644 --- a/storage/connect/tabodbc.cpp +++ b/storage/connect/tabodbc.cpp @@ -74,7 +74,7 @@ #include "sql_string.h" extern "C" char *GetMsgid(int id); -PQRYRES ODBCDataSources(PGLOBAL g); +PQRYRES ODBCDataSources(PGLOBAL g, bool info = false); PQRYRES MyODBCCols(PGLOBAL g, char *tab, char *dsn, bool info); /***********************************************************************/ @@ -934,8 +934,6 @@ PCOL TDBOIF::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n) if (!stricmp(colp->Name, GetMsgid(ID + i))) colp->Flag = i; - } // endif Flag - return colp; } // end of MakeCol |