Commit 44cb1ce8 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix tabpivot compile errors on Linux.

- Fix Tabpivot not closing the source table.
- Fix pivot.test error on Linux by specifying ENDING=2 for the expenses table.

modified:
  storage/connect/mysql-test/connect/r/pivot.result
  storage/connect/mysql-test/connect/t/pivot.test
  storage/connect/tabpivot.cpp
  storage/connect/tabpivot.h
parent 5657660a
...@@ -6,7 +6,7 @@ Who CHAR(10) NOT NULL, ...@@ -6,7 +6,7 @@ Who CHAR(10) NOT NULL,
Week INT(2) NOT NULL, Week INT(2) NOT NULL,
What CHAR(12) NOT NULL, What CHAR(12) NOT NULL,
Amount DOUBLE(8,2)) Amount DOUBLE(8,2))
ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='expenses.txt'; ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='expenses.txt' ENDING=2;
SELECT * FROM expenses; SELECT * FROM expenses;
Who Week What Amount Who Week What Amount
Joe 3 Beer 18.00 Joe 3 Beer 18.00
......
...@@ -10,7 +10,7 @@ Who CHAR(10) NOT NULL, ...@@ -10,7 +10,7 @@ Who CHAR(10) NOT NULL,
Week INT(2) NOT NULL, Week INT(2) NOT NULL,
What CHAR(12) NOT NULL, What CHAR(12) NOT NULL,
Amount DOUBLE(8,2)) Amount DOUBLE(8,2))
ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='expenses.txt'; ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='expenses.txt' ENDING=2;
SELECT * FROM expenses; SELECT * FROM expenses;
--echo # --echo #
......
...@@ -876,7 +876,7 @@ int TDBPIVOT::DeleteDB(PGLOBAL g, int irc) ...@@ -876,7 +876,7 @@ int TDBPIVOT::DeleteDB(PGLOBAL g, int irc)
/***********************************************************************/ /***********************************************************************/
void TDBPIVOT::CloseDB(PGLOBAL g) void TDBPIVOT::CloseDB(PGLOBAL g)
{ {
//Tdbp->CloseDB(g); Tdbp->CloseDB(g);
} // end of CloseDB } // end of CloseDB
#if 0 #if 0
...@@ -1242,8 +1242,8 @@ QRSCOL::QRSCOL(PGLOBAL g, PCOLRES crp, PTDB tdbp, PCOL cprec, int i) ...@@ -1242,8 +1242,8 @@ QRSCOL::QRSCOL(PGLOBAL g, PCOLRES crp, PTDB tdbp, PCOL cprec, int i)
Long = Crp->Clen; Long = Crp->Clen;
Buf_Type = crp->Type; Buf_Type = crp->Type;
strcpy(Format.Type, GetFormatType(Buf_Type)); strcpy(Format.Type, GetFormatType(Buf_Type));
Format.Length = (SHORT)Long; Format.Length = (short)Long;
Format.Prec = (SHORT)Crp->Prec; Format.Prec = (short)Crp->Prec;
if (trace) { if (trace) {
htrc("Making new QRSCOL C%d %s at %p\n", Index, Name, this); htrc("Making new QRSCOL C%d %s at %p\n", Index, Name, this);
...@@ -1284,7 +1284,7 @@ void QRSCOL::ReadColumn(PGLOBAL g) ...@@ -1284,7 +1284,7 @@ void QRSCOL::ReadColumn(PGLOBAL g)
/***********************************************************************/ /***********************************************************************/
/* Make file output of a Dos column descriptor block. */ /* Make file output of a Dos column descriptor block. */
/***********************************************************************/ /***********************************************************************/
void QRSCOL::Print(PGLOBAL g, FILE *f, UINT n) void QRSCOL::Print(PGLOBAL g, FILE *f, uint n)
{ {
COLBLK::Print(g, f, n); COLBLK::Print(g, f, n);
......
...@@ -231,7 +231,7 @@ class DllExport QRSCOL : public COLBLK { ...@@ -231,7 +231,7 @@ class DllExport QRSCOL : public COLBLK {
// Methods // Methods
virtual void ReadColumn(PGLOBAL g); virtual void ReadColumn(PGLOBAL g);
virtual void Print(PGLOBAL g, FILE *, UINT); virtual void Print(PGLOBAL g, FILE *, uint);
protected: protected:
QRSCOL(void) {} // Default constructor not to be used QRSCOL(void) {} // Default constructor not to be used
......
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