Skip to content

Commit

Permalink
- Fix to MDEV-9579 be testing for void result.
Browse files Browse the repository at this point in the history
  modified:   storage/connect/tabodbc.cpp
  • Loading branch information
Buggynours committed Feb 20, 2016
1 parent 481e643 commit 02fa3b8
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions storage/connect/tabodbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* COPYRIGHT: */
/* ---------- */
/* (C) Copyright to the author Olivier BERTRAND 2000-2015 */
/* (C) Copyright to the author Olivier BERTRAND 2000-2016 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
Expand Down Expand Up @@ -912,19 +912,21 @@ bool TDBODBC::OpenDB(PGLOBAL g)
if ((n = Ocp->GetResultSize(Query->GetStr(), Cnp)) < 0) {
strcpy(g->Message, "Cannot get result size");
return true;
} // endif n
} else if (n) {
Ocp->m_Rows = n;

Ocp->m_Rows = n;
if ((Qrp = Ocp->AllocateResult(g)))
Memory = 2; // Must be filled
else {
strcpy(g->Message, "Result set memory allocation failed");
return true;
} // endif n

if ((Qrp = Ocp->AllocateResult(g)))
Memory = 2; // Must be filled
else {
strcpy(g->Message, "Result set memory allocation failed");
return true;
} // endif n
} else // Void result
Memory = 0;

Ocp->m_Rows = 0;
} else
Ocp->m_Rows = 0;
} else
return true;

} // endif Memory
Expand Down

0 comments on commit 02fa3b8

Please sign in to comment.