Commit 99019afc authored by Alexander Barkov's avatar Alexander Barkov

Merge from 10.0-connect

modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/mycat.cc
  storage/connect/odbconn.cpp
  storage/connect/osutil.c
  storage/connect/tabutil.cpp
pending merges:
  Olivier Bertrand 2013-07-08 - Suppress some ubuntu compiler warnings
    Alexander Barkov 2013-07-08 Re-enabling connect tests in 10.0-connect
parents 17f3ae26 b3ad9a97
...@@ -816,7 +816,7 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, ...@@ -816,7 +816,7 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
p+= valp->GetClen(); p+= valp->GetClen();
if (len[i] == p - kp) { if (len[i] == (unsigned)(p - kp)) {
n++; n++;
break; break;
} else if (len[i] < (unsigned)(p - kp)) { } else if (len[i] < (unsigned)(p - kp)) {
......
...@@ -3433,7 +3433,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -3433,7 +3433,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL); uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL);
bool bif, ok= false, dbf= false; bool bif, ok= false, dbf= false;
TABTYPE ttp= TAB_UNDEF; TABTYPE ttp= TAB_UNDEF;
PQRYRES qrp; PQRYRES qrp= NULL;
PCOLRES crp; PCOLRES crp;
PGLOBAL g= GetPlug(thd, NULL); PGLOBAL g= GetPlug(thd, NULL);
PTOS topt= table_s->option_struct; PTOS topt= table_s->option_struct;
...@@ -3709,7 +3709,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -3709,7 +3709,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
if (fnc != FNC_NO || src || ttp == TAB_PIVOT) { if (fnc != FNC_NO || src || ttp == TAB_PIVOT) {
// Catalog like table // Catalog like table
for (crp=qrp->Colresp; !b && crp; crp= crp->Next) { for (crp= qrp->Colresp; !b && crp; crp= crp->Next) {
cnm= encode(g, crp->Name); cnm= encode(g, crp->Name);
type= PLGtoMYSQLtype(crp->Type, dbf); type= PLGtoMYSQLtype(crp->Type, dbf);
len= crp->Length; len= crp->Length;
...@@ -3726,6 +3726,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -3726,6 +3726,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
rem= NULL; rem= NULL;
typ= len= dec= 0; typ= len= dec= 0;
tm= NOT_NULL_FLAG; tm= NOT_NULL_FLAG;
cnm= (char*)"noname";
for (crp= qrp->Colresp; crp; crp= crp->Next) for (crp= qrp->Colresp; crp; crp= crp->Next)
switch (crp->Fld) { switch (crp->Fld) {
......
...@@ -383,7 +383,7 @@ int MYCAT::GetCharCatInfo(PSZ what, PSZ sdef, char *buf, int size) ...@@ -383,7 +383,7 @@ int MYCAT::GetCharCatInfo(PSZ what, PSZ sdef, char *buf, int size)
/***********************************************************************/ /***********************************************************************/
char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef) char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef)
{ {
char *sval, *s= Hc->GetStringOption(what, sdef); char *sval= NULL, *s= Hc->GetStringOption(what, sdef);
if (s) { if (s) {
sval= (char*)PlugSubAlloc(g, NULL, strlen(s) + 1); sval= (char*)PlugSubAlloc(g, NULL, strlen(s) + 1);
...@@ -408,8 +408,7 @@ char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef) ...@@ -408,8 +408,7 @@ char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef)
} // endif FileType } // endif FileType
} else } // endif s
sval = NULL;
return sval; return sval;
} // end of GetStringCatInfo } // end of GetStringCatInfo
......
...@@ -242,7 +242,7 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table, ...@@ -242,7 +242,7 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table,
int maxres; int maxres;
PQRYRES qrp; PQRYRES qrp;
CATPARM *cap; CATPARM *cap;
ODBConn *ocp; ODBConn *ocp = NULL;
/************************************************************************/ /************************************************************************/
/* Do an evaluation of the result size. */ /* Do an evaluation of the result size. */
...@@ -497,7 +497,7 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info) ...@@ -497,7 +497,7 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info)
int maxres; int maxres;
PQRYRES qrp; PQRYRES qrp;
CATPARM *cap; CATPARM *cap;
ODBConn *ocp; ODBConn *ocp = NULL;
/************************************************************************/ /************************************************************************/
/* Do an evaluation of the result size. */ /* Do an evaluation of the result size. */
...@@ -1654,7 +1654,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) ...@@ -1654,7 +1654,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
PCOLRES crp; PCOLRES crp;
RETCODE rc; RETCODE rc;
HSTMT hstmt = NULL; HSTMT hstmt = NULL;
SQLLEN *vl, *vlen; SQLLEN *vl, *vlen = NULL;
PVAL *pval = NULL; PVAL *pval = NULL;
try { try {
......
...@@ -181,7 +181,7 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength) ...@@ -181,7 +181,7 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength)
} else { } else {
char buff[2*_MAX_PATH]; char buff[2*_MAX_PATH];
getcwd(buff, _MAX_PATH); assert(getcwd(buff, _MAX_PATH) != NULL);
strcat(buff,"/"); strcat(buff,"/");
strcat(buff, relPath); strcat(buff, relPath);
strncpy(absPath, buff, maxLength); strncpy(absPath, buff, maxLength);
......
...@@ -133,7 +133,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, ...@@ -133,7 +133,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
int i, n, ncol = sizeof(buftyp) / sizeof(int); int i, n, ncol = sizeof(buftyp) / sizeof(int);
int len, type, prec; int len, type, prec;
bool mysql; bool mysql;
TABLE_SHARE *s; TABLE_SHARE *s = NULL;
Field* *field; Field* *field;
Field *fp; Field *fp;
PQRYRES qrp; PQRYRES qrp;
...@@ -243,7 +243,9 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, ...@@ -243,7 +243,9 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
/**********************************************************************/ /**********************************************************************/
/* Return the result pointer for use by GetData routines. */ /* Return the result pointer for use by GetData routines. */
/**********************************************************************/ /**********************************************************************/
free_table_share(s); if (s)
free_table_share(s);
return qrp; return qrp;
} // end of TabColumns } // end of TabColumns
...@@ -315,12 +317,12 @@ TDBPRX::TDBPRX(PPRXDEF tdp) : TDBASE(tdp) ...@@ -315,12 +317,12 @@ TDBPRX::TDBPRX(PPRXDEF tdp) : TDBASE(tdp)
/***********************************************************************/ /***********************************************************************/
PTDBASE TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp, bool b) PTDBASE TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp, bool b)
{ {
const char *sp; const char *sp = NULL;
char *db, *name; char *db, *name;
bool mysql = true; bool mysql = true;
PTDB tdbp = NULL; PTDB tdbp = NULL;
TABLE_SHARE *s = NULL; TABLE_SHARE *s = NULL;
Field* *fp; Field* *fp = NULL;
PCATLG cat = To_Def->GetCat(); PCATLG cat = To_Def->GetCat();
PHC hc = ((MYCAT*)cat)->GetHandler(); PHC hc = ((MYCAT*)cat)->GetHandler();
LPCSTR cdb, curdb = hc->GetDBName(NULL); LPCSTR cdb, curdb = hc->GetDBName(NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment