Commit 0993d4b4 authored by Olivier Bertrand's avatar Olivier Bertrand

- Change the Blanks parameter from true to false in catalog getting

  information function. This solve the problem of uninitialised zone
  that was detected by valgrind.

modified:
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabutil.cpp
  storage/connect/tabwmi.cpp
parent f772ed74
...@@ -134,7 +134,7 @@ PQRYRES MyColumns(PGLOBAL g, const char *host, const char *db, ...@@ -134,7 +134,7 @@ PQRYRES MyColumns(PGLOBAL g, const char *host, const char *db,
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/**********************************************************************/ /**********************************************************************/
qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3, qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3,
buftyp, fldtyp, length, true, true); buftyp, fldtyp, length, false, true);
// Some columns must be renamed // Some columns must be renamed
for (i = 0, crp = qrp->Colresp; crp; crp = crp->Next) for (i = 0, crp = qrp->Colresp; crp; crp = crp->Next)
......
...@@ -280,7 +280,7 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table, ...@@ -280,7 +280,7 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table,
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/************************************************************************/ /************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_COLUMNS, qrp = PlgAllocResult(g, ncol, maxres, IDS_COLUMNS,
buftyp, fldtyp, length, true, true); buftyp, fldtyp, length, false, true);
if (info) // Info table if (info) // Info table
return qrp; return qrp;
...@@ -422,7 +422,7 @@ PQRYRES ODBCDataSources(PGLOBAL g, bool info) ...@@ -422,7 +422,7 @@ PQRYRES ODBCDataSources(PGLOBAL g, bool info)
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/************************************************************************/ /************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_DSRC, qrp = PlgAllocResult(g, ncol, maxres, IDS_DSRC,
buftyp, fldtyp, length, true, true); buftyp, fldtyp, length, false, true);
/************************************************************************/ /************************************************************************/
/* Now get the results into blocks. */ /* Now get the results into blocks. */
...@@ -467,7 +467,7 @@ PQRYRES ODBCDrivers(PGLOBAL g, bool info) ...@@ -467,7 +467,7 @@ PQRYRES ODBCDrivers(PGLOBAL g, bool info)
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/************************************************************************/ /************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_DRIVER, qrp = PlgAllocResult(g, ncol, maxres, IDS_DRIVER,
buftyp, fldtyp, length, true, true); buftyp, fldtyp, length, false, true);
/************************************************************************/ /************************************************************************/
/* Now get the results into blocks. */ /* Now get the results into blocks. */
...@@ -532,7 +532,7 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info) ...@@ -532,7 +532,7 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info)
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/************************************************************************/ /************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_TABLES, buftyp, qrp = PlgAllocResult(g, ncol, maxres, IDS_TABLES, buftyp,
fldtyp, length, true, true); fldtyp, length, false, true);
if (info) if (info)
return qrp; return qrp;
...@@ -616,7 +616,7 @@ PQRYRES ODBCPrimaryKeys(PGLOBAL g, ODBConn *op, char *dsn, char *table) ...@@ -616,7 +616,7 @@ PQRYRES ODBCPrimaryKeys(PGLOBAL g, ODBConn *op, char *dsn, char *table)
/* Allocate the structure used to refer to the result set. */ /* Allocate the structure used to refer to the result set. */
/************************************************************************/ /************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_PKEY, qrp = PlgAllocResult(g, ncol, maxres, IDS_PKEY,
buftyp, NULL, length, true, true); buftyp, NULL, length, false, true);
if (trace) if (trace)
htrc("Getting pkey results ncol=%d\n", qrp->Nbcol); htrc("Getting pkey results ncol=%d\n", qrp->Nbcol);
...@@ -698,7 +698,7 @@ PQRYRES ODBCStatistics(PGLOBAL g, ODBConn *op, char *dsn, char *pat, ...@@ -698,7 +698,7 @@ PQRYRES ODBCStatistics(PGLOBAL g, ODBConn *op, char *dsn, char *pat,
/* Allocate the structure used to refer to the result set. */ /* Allocate the structure used to refer to the result set. */
/************************************************************************/ /************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_STAT, qrp = PlgAllocResult(g, ncol, maxres, IDS_STAT,
buftyp, NULL, length, true, true); buftyp, NULL, length, false, true);
if (trace) if (trace)
htrc("Getting stat results ncol=%d\n", qrp->Nbcol); htrc("Getting stat results ncol=%d\n", qrp->Nbcol);
......
...@@ -339,7 +339,7 @@ PQRYRES CSVColumns(PGLOBAL g, const char *fn, char sep, char q, ...@@ -339,7 +339,7 @@ PQRYRES CSVColumns(PGLOBAL g, const char *fn, char sep, char q,
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/*********************************************************************/ /*********************************************************************/
qrp = PlgAllocResult(g, ncol, imax, IDS_COLUMNS + 3, qrp = PlgAllocResult(g, ncol, imax, IDS_COLUMNS + 3,
buftyp, fldtyp, length, true, false); buftyp, fldtyp, length, false, false);
qrp->Nblin = imax; qrp->Nblin = imax;
if (info) if (info)
......
...@@ -159,7 +159,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, ...@@ -159,7 +159,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db,
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/**********************************************************************/ /**********************************************************************/
qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3, qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3,
buftyp, fldtyp, length, true, true); buftyp, fldtyp, length, false, true);
// Some columns must be renamed // Some columns must be renamed
for (i = 0, crp = qrp->Colresp; crp; crp = crp->Next) for (i = 0, crp = qrp->Colresp; crp; crp = crp->Next)
......
...@@ -211,7 +211,7 @@ PQRYRES WMIColumns(PGLOBAL g, char *nsp, char *cls, bool info) ...@@ -211,7 +211,7 @@ PQRYRES WMIColumns(PGLOBAL g, char *nsp, char *cls, bool info)
/* Allocate the structures used to refer to the result set. */ /* Allocate the structures used to refer to the result set. */
/*********************************************************************/ /*********************************************************************/
qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3, qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3,
buftyp, fldtyp, length, true, true); buftyp, fldtyp, length, false, true);
if (info) if (info)
return qrp; return qrp;
......
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