1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Added table type PIVOT

modified:
  storage/connect/filamdbf.cpp
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/myconn.cpp
  storage/connect/odbconn.cpp
  storage/connect/plgcnx.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabpivot.cpp
  storage/connect/tabpivot.h
  storage/connect/tabutil.cpp
  storage/connect/tabwmi.cpp
  storage/connect/tabxcl.cpp
  storage/connect/value.cpp
  storage/connect/value.h
This commit is contained in:
Olivier Bertrand
2013-05-10 20:22:21 +02:00
parent be268bed3d
commit 99d95c8a2f
17 changed files with 444 additions and 418 deletions

View File

@@ -230,11 +230,7 @@ void ResetNullValues(CATPARM *cap)
PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table,
char *colpat, bool info)
{
static int dbtype[] = {DB_CHAR, DB_CHAR, DB_CHAR,
DB_CHAR, DB_SHORT, DB_CHAR,
DB_INT, DB_INT, DB_SHORT,
DB_SHORT, DB_SHORT, DB_CHAR};
static int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING,
static int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_SHORT, TYPE_STRING,
TYPE_INT, TYPE_INT, TYPE_SHORT,
TYPE_SHORT, TYPE_SHORT, TYPE_STRING};
@@ -285,7 +281,7 @@ PQRYRES ODBCColumns(PGLOBAL g, char *dsn, char *table,
/* Allocate the structures used to refer to the result set. */
/************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_COLUMNS,
dbtype, buftyp, fldtyp, length, true, true);
buftyp, fldtyp, length, true, true);
if (info) // Info table
return qrp;
@@ -396,7 +392,6 @@ PQRYRES MyODBCCols(PGLOBAL g, char *dsn, char *tab, bool info)
/*************************************************************************/
PQRYRES ODBCDataSources(PGLOBAL g, bool info)
{
static int dbtype[] = {DB_CHAR, DB_CHAR};
static int buftyp[] = {TYPE_STRING, TYPE_STRING};
static XFLD fldtyp[] = {FLD_NAME, FLD_REM};
static unsigned int length[] = {0, 256};
@@ -425,7 +420,7 @@ PQRYRES ODBCDataSources(PGLOBAL g, bool info)
/* Allocate the structures used to refer to the result set. */
/************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_DSRC,
dbtype, buftyp, fldtyp, length, true, true);
buftyp, fldtyp, length, true, true);
/************************************************************************/
/* Now get the results into blocks. */
@@ -446,7 +441,6 @@ PQRYRES ODBCDataSources(PGLOBAL g, bool info)
/*************************************************************************/
PQRYRES ODBCDrivers(PGLOBAL g, bool info)
{
static int dbtype[] = {DB_CHAR, DB_CHAR};
static int buftyp[] = {TYPE_STRING, TYPE_STRING};
static XFLD fldtyp[] = {FLD_NAME, FLD_REM};
static unsigned int length[] = {128, 256};
@@ -471,7 +465,7 @@ PQRYRES ODBCDrivers(PGLOBAL g, bool info)
/* Allocate the structures used to refer to the result set. */
/************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_DRIVER,
dbtype, buftyp, fldtyp, length, true, true);
buftyp, fldtyp, length, true, true);
/************************************************************************/
/* Now get the results into blocks. */
@@ -492,8 +486,7 @@ PQRYRES ODBCDrivers(PGLOBAL g, bool info)
/***********************************************************************/
PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info)
{
static int dbtype[] = {DB_CHAR, DB_CHAR, DB_CHAR, DB_CHAR, DB_CHAR};
static int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING,
static int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_STRING};
static XFLD fldtyp[] = {FLD_QUALIF, FLD_OWNER, FLD_NAME,
FLD_TYPE, FLD_REM};
@@ -536,7 +529,7 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info)
/************************************************************************/
/* Allocate the structures used to refer to the result set. */
/************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_TABLES, dbtype, buftyp,
qrp = PlgAllocResult(g, ncol, maxres, IDS_TABLES, buftyp,
fldtyp, length, true, true);
if (info)
@@ -579,8 +572,6 @@ PQRYRES ODBCTables(PGLOBAL g, char *dsn, char *tabpat, bool info)
/**************************************************************************/
PQRYRES ODBCPrimaryKeys(PGLOBAL g, ODBConn *op, char *dsn, char *table)
{
static int dbtype[] = {DB_CHAR, DB_CHAR, DB_CHAR,
DB_CHAR, DB_SHORT, DB_CHAR};
static int buftyp[] = {TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_SHORT, TYPE_STRING};
static unsigned int length[] = {0, 0, 0, 0, 6, 128};
@@ -623,7 +614,7 @@ PQRYRES ODBCPrimaryKeys(PGLOBAL g, ODBConn *op, char *dsn, char *table)
/* Allocate the structure used to refer to the result set. */
/************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_PKEY,
dbtype, buftyp, NULL, length, true, true);
buftyp, NULL, length, true, true);
if (trace)
htrc("Getting pkey results ncol=%d\n", qrp->Nbcol);
@@ -662,9 +653,6 @@ PQRYRES ODBCPrimaryKeys(PGLOBAL g, ODBConn *op, char *dsn, char *table)
PQRYRES ODBCStatistics(PGLOBAL g, ODBConn *op, char *dsn, char *pat,
int un, int acc)
{
static int dbtype[] = {DB_CHAR, DB_CHAR, DB_CHAR, DB_SHORT, DB_CHAR,
DB_CHAR, DB_SHORT, DB_SHORT, DB_CHAR, DB_CHAR,
DB_INT, DB_INT, DB_CHAR};
static int buftyp[] = {TYPE_STRING,
TYPE_STRING, TYPE_STRING, TYPE_SHORT, TYPE_STRING,
TYPE_STRING, TYPE_SHORT, TYPE_SHORT, TYPE_STRING,
@@ -708,7 +696,7 @@ PQRYRES ODBCStatistics(PGLOBAL g, ODBConn *op, char *dsn, char *pat,
/* Allocate the structure used to refer to the result set. */
/************************************************************************/
qrp = PlgAllocResult(g, ncol, maxres, IDS_STAT,
dbtype, buftyp, NULL, length, true, true);
buftyp, NULL, length, true, true);
if (trace)
htrc("Getting stat results ncol=%d\n", qrp->Nbcol);