diff options
author | Alexander Barkov <bar@mariadb.org> | 2013-07-10 11:39:15 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2013-07-10 11:39:15 +0400 |
commit | 99019afccc2b60ba0f65df70c1f59288744b3608 (patch) | |
tree | b2f75664f1f6cc00a0774bc39249930c881d7b08 | |
parent | 17f3ae267f3b8c189be1671f86902f24ae79cdeb (diff) | |
parent | b3ad9a97e984864c7809f0c2a2847ab35305488c (diff) | |
download | mariadb-git-99019afccc2b60ba0f65df70c1f59288744b3608.tar.gz |
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
-rw-r--r-- | storage/connect/connect.cc | 2 | ||||
-rw-r--r-- | storage/connect/ha_connect.cc | 5 | ||||
-rw-r--r-- | storage/connect/mycat.cc | 5 | ||||
-rw-r--r-- | storage/connect/odbconn.cpp | 6 | ||||
-rw-r--r-- | storage/connect/osutil.c | 2 | ||||
-rw-r--r-- | storage/connect/tabutil.cpp | 10 |
6 files changed, 16 insertions, 14 deletions
diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc index 41fb061bd7f..e0c722bc01f 100644 --- a/storage/connect/connect.cc +++ b/storage/connect/connect.cc @@ -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)) { diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 786997cc76d..3325d39f1d8 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -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) { diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index fe93751d600..3c75c0b63b3 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -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 diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 5808bf266bd..69fddb2d9f8 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -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 { diff --git a/storage/connect/osutil.c b/storage/connect/osutil.c index 4cdd7c560f0..ad92caefe95 100644 --- a/storage/connect/osutil.c +++ b/storage/connect/osutil.c @@ -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); diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index 21dee4e1856..6e5f6784d3a 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -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. */ /**********************************************************************/ - free_table_share(s); + 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); |