From 6b63c5b2479084d5b7ead016d4d0f5cf7d28e47c Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 18 Mar 2014 19:25:50 +0100 Subject: - FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL. modified: storage/connect/ha_connect.cc - Suppress the use of connect.in by adding the connect_xtrace system variable. modified: storage/connect/ha_connect.cc - Make column length, varchar, and temporal column types recognized in discovery when using SRCDEF,or PIVOT. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/plgdbsem.h - Avoid (rare) crash when using DECIMAL type. (buf was too small) modified: storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/valblk.cpp storage/connect/value.cpp - General cleaning of unused code, standardize tracing, and update version number modified: storage/connect/block.h storage/connect/colblk.cpp storage/connect/connect.cc storage/connect/csort.h storage/connect/filamap.cpp storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/alter.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/osutil.c storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/reldef.cpp storage/connect/tabcol.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabvct.cpp storage/connect/user_connect.cc storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/xindex.cpp --- storage/connect/filamzip.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'storage/connect/filamzip.cpp') diff --git a/storage/connect/filamzip.cpp b/storage/connect/filamzip.cpp index ae4e2c33227..9d0ffab32d9 100644 --- a/storage/connect/filamzip.cpp +++ b/storage/connect/filamzip.cpp @@ -62,6 +62,7 @@ /* DB static variables. */ /***********************************************************************/ extern int num_read, num_there, num_eq[]; // Statistics +extern "C" int trace; /* ------------------------------------------------------------------- */ @@ -203,9 +204,8 @@ bool ZIPFAM::AllocateBuffer(PGLOBAL g) Buflen = Lrecl + 2; // Lrecl does not include CRLF //Buflen *= ((Mode == MODE_DELETE) ? DOS_BUFF_LEN : 1); NIY -#ifdef DEBTRACE - htrc("SubAllocating a buffer of %d bytes\n", Buflen); -#endif + if (trace) + htrc("SubAllocating a buffer of %d bytes\n", Buflen); To_Buf = (char*)PlugSubAlloc(g, NULL, Buflen); @@ -331,9 +331,9 @@ int ZIPFAM::ReadBuffer(PGLOBAL g) } else rc = Zerror(g); -#ifdef DEBTRACE - htrc(" Read: '%s' rc=%d\n", To_Buf, rc); -#endif + if (trace > 1) + htrc(" Read: '%s' rc=%d\n", To_Buf, rc); + return rc; } // end of ReadBuffer @@ -373,9 +373,8 @@ void ZIPFAM::CloseTableFile(PGLOBAL g) { int rc = gzclose(Zfile); -#ifdef DEBTRACE - htrc("ZIP CloseDB: closing %s rc=%d\n", To_File, rc); -#endif + if (trace) + htrc("ZIP CloseDB: closing %s rc=%d\n", To_File, rc); Zfile = NULL; // So we can know whether table is open //To_Fb->Count = 0; // Avoid double closing by PlugCloseAll @@ -599,9 +598,8 @@ void ZBKFAM::CloseTableFile(PGLOBAL g) } else rc = gzclose(Zfile); -#ifdef DEBTRACE - htrc("ZIP CloseDB: closing %s rc=%d\n", To_File, rc); -#endif + if (trace) + htrc("ZIP CloseDB: closing %s rc=%d\n", To_File, rc); Zfile = NULL; // So we can know whether table is open //To_Fb->Count = 0; // Avoid double closing by PlugCloseAll -- cgit v1.2.1