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,
p+= valp->GetClen();
if (len[i] == p - kp) {
if (len[i] == (unsigned)(p - kp)) {
n++;
break;
} else if (len[i] < (unsigned)(p - kp)) {
......
......@@ -3433,7 +3433,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
uint tm, fnc= FNC_NO, supfnc= (FNC_NO | FNC_COL);
bool bif, ok= false, dbf= false;
TABTYPE ttp= TAB_UNDEF;
PQRYRES qrp;
PQRYRES qrp= NULL;
PCOLRES crp;
PGLOBAL g= GetPlug(thd, NULL);
PTOS topt= table_s->option_struct;
......@@ -3709,7 +3709,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
if (fnc != FNC_NO || src || ttp == TAB_PIVOT) {
// 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);
type= PLGtoMYSQLtype(crp->Type, dbf);
len= crp->Length;
......@@ -3726,6 +3726,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
rem= NULL;
typ= len= dec= 0;
tm= NOT_NULL_FLAG;
cnm= (char*)"noname";
for (crp= qrp->Colresp; crp; crp= crp->Next)
switch (crp->Fld) {
......
......@@ -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 *sval, *s= Hc->GetStringOption(what, sdef);
char *sval= NULL, *s= Hc->GetStringOption(what, sdef);
if (s) {
sval= (char*)PlugSubAlloc(g, NULL, strlen(s) + 1);
......@@ -408,8 +408,7 @@ char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef)
} // endif FileType
} else
sval = NULL;
} // endif s
return sval;
} // end of GetStringCatInfo
......
......@@ -242,7 +242,7 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table,
int maxres;
PQRYRES qrp;
CATPARM *cap;
ODBConn *ocp;
ODBConn *ocp = NULL;
/************************************************************************/
/* Do an evaluation of the result size. */
......@@ -497,7 +497,7 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info)
int maxres;
PQRYRES qrp;
CATPARM *cap;
ODBConn *ocp;
ODBConn *ocp = NULL;
/************************************************************************/
/* Do an evaluation of the result size. */
......@@ -1654,7 +1654,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
PCOLRES crp;
RETCODE rc;
HSTMT hstmt = NULL;
SQLLEN *vl, *vlen;
SQLLEN *vl, *vlen = NULL;
PVAL *pval = NULL;
try {
......
......@@ -181,7 +181,7 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength)
} else {
char buff[2*_MAX_PATH];
getcwd(buff, _MAX_PATH);
assert(getcwd(buff, _MAX_PATH) != NULL);
strcat(buff,"/");
strcat(buff, relPath);
strncpy(absPath, buff, maxLength);
......
......@@ -133,7 +133,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
int i, n, ncol = sizeof(buftyp) / sizeof(int);
int len, type, prec;
bool mysql;
TABLE_SHARE *s;
TABLE_SHARE *s = NULL;
Field* *field;
Field *fp;
PQRYRES qrp;
......@@ -243,7 +243,9 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
/**********************************************************************/
/* Return the result pointer for use by GetData routines. */
/**********************************************************************/
if (s)
free_table_share(s);
return qrp;
} // end of TabColumns
......@@ -315,12 +317,12 @@ TDBPRX::TDBPRX(PPRXDEF tdp) : TDBASE(tdp)
/***********************************************************************/
PTDBASE TDBPRX::GetSubTable(PGLOBAL g, PTABLE tabp, bool b)
{
const char *sp;
const char *sp = NULL;
char *db, *name;
bool mysql = true;
PTDB tdbp = NULL;
TABLE_SHARE *s = NULL;
Field* *fp;
Field* *fp = NULL;
PCATLG cat = To_Def->GetCat();
PHC hc = ((MYCAT*)cat)->GetHandler();
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