summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2013-05-13 11:37:34 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2013-05-13 11:37:34 +0200
commitdee955bdee939506804fdc36bf33224e2b104926 (patch)
treed81272d95775dcec39b5f1b7054c7255438b2178 /storage/connect
parent35f813143bbb4f3e06649678fc19a900667e6432 (diff)
downloadmariadb-git-dee955bdee939506804fdc36bf33224e2b104926.tar.gz
- fix use of uninitialized variable (colp)
modified: storage/connect/tabtbl.cpp storage/connect/tabutil.cpp
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/tabtbl.cpp10
-rw-r--r--storage/connect/tabutil.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp
index 7b10089ea36..7e89cccf583 100644
--- a/storage/connect/tabtbl.cpp
+++ b/storage/connect/tabtbl.cpp
@@ -239,14 +239,10 @@ bool TDBTBL::InitTableList(PGLOBAL g)
// We must allocate subtable columns before GetMaxSize is called
// because some (PLG, ODBC?) need to have their columns attached.
// Real initialization will be done later.
- for (PCOL cp = Columns; cp; cp = cp->GetNext())
- if (!cp->IsSpecial()) {
- if (((PPRXCOL)cp)->Init(g) && !Accept)
+ for (colp = Columns; colp; colp = colp->GetNext())
+ if (!colp->IsSpecial())
+ if (((PPRXCOL)colp)->Init(g) && !Accept)
return TRUE;
- else // this is needed by some tables (which?)
- colp->SetColUse(cp->GetColUse());
-
- } // endif !special
if (Tablist)
Tablist->Link(tabp);
diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp
index 2c14b711f86..c55b8d1fa5c 100644
--- a/storage/connect/tabutil.cpp
+++ b/storage/connect/tabutil.cpp
@@ -531,8 +531,12 @@ bool PRXCOL::Init(PGLOBAL g)
Colp = tdbp->Tdbp->ColDB(g, NULL, Colnum);
if (Colp) {
- Colp->InitValue(g); // May not have been done elsewhere
+ // May not have been done elsewhere
+ Colp->InitValue(g);
To_Val = Colp->GetValue();
+
+ // this may be needed by some tables (which?)
+ Colp->SetColUse(ColUse);
} else {
sprintf(g->Message, MSG(NO_MATCHING_COL), Name, tdbp->Tdbp->GetName());
return TRUE;