[MDEV-19785] Storage CONNECT compilation error: unknown type name 'UNZFAM' Created: 2019-06-17  Updated: 2019-08-01  Resolved: 2019-07-08

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.4
Fix Version/s: 10.2.26, 10.3.17, 10.4.7

Type: Bug Priority: Trivial
Reporter: Aleksey Midenkov Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

FAILED: storage/connect/CMakeFiles/connect.dir/tabfmt.cpp.o
ccache /usr/bin/clang++-7  -DFORCE_INIT_OF_VARS -DGZ_SUPPORT -DHAVE_CONFIG_H -DHUGE_SUPPORT -DLINUX -DMARIADB -DMYSQL_DYNAMIC_PLUGIN -DUBUNTU -DUNIX -D_FILE_OFFSET_BITS=64 -Dconnect_EXPORTS -Iinclude -I/home/midenok/src/mariadb/trunk/src/include -I/home/midenok/src/mariadb/trunk/src/sql -fPIC -Wall -Wmissing-declarations -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-value -Wno-error=parentheses -Wno-error=strict-aliasing -Wno-error=implicit-fallthrough -Wno-error=type-limits -fpermissive -fexceptions -fPIC  -g -O0 -Werror=overloaded-virtual -Werror=return-type -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-function -Wno-deprecated-register -fdebug-macro -DENABLED_DEBUG_SYNC -ggdb3 -DSAFE_MUTEX -DTRASH_FREED_MEMORY -Wno-unused-function -Wno-unused-variable -Wno-unused-value -Wno-parentheses -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-type-limits -fPIC   -std=gnu++11 -MD -MT storage/connect/CMakeFiles/connect.dir/tabfmt.cpp.o -MF storage/connect/CMakeFiles/connect.dir/tabfmt.cpp.o.d -o storage/connect/CMakeFiles/connect.dir/tabfmt.cpp.o -c /home/midenok/src/mariadb/trunk/src/storage/connect/tabfmt.cpp
/home/midenok/src/mariadb/trunk/src/storage/connect/tabfmt.cpp:193:34: error: unknown type name 'UNZFAM'
                tcvp = new(g)TDBCSV(tdp, new(g)UNZFAM(tdp));
                                               ^

Fix

--- a/storage/connect/tabfmt.cpp
+++ b/storage/connect/tabfmt.cpp
@@ -189,9 +189,11 @@ PQRYRES CSVColumns(PGLOBAL g, PCSZ dp, PTOS topt, bool info)
                htrc("File %s Sep=%c Qot=%c Header=%d maxerr=%d\n",
                SVP(tdp->Fn), tdp->Sep, tdp->Qot, tdp->Header, tdp->Maxerr);
 
+#if defined(ZIP_SUPPORT)
        if (tdp->Zipped)
                tcvp = new(g)TDBCSV(tdp, new(g)UNZFAM(tdp));
        else
+#endif
                tcvp = new(g) TDBCSV(tdp, new(g) DOSFAM(tdp));
 
        tcvp->SetMode(MODE_READ);



 Comments   
Comment by Aleksey Midenkov [ 2019-06-17 ]

Another fail when CONNECT is compiled into mysqld:

/usr/bin/ld: storage/connect/libconnect.a(ha_connect.cc.o): in function `ha_connect::create(char const*, TABLE*, HA_CREATE_INFO*)':
/home/midenok/src/mariadb/trunk/src/storage/connect/ha_connect.cc:6703: undefined reference to `ZipLoadFile(_global*, char const*, char const*, char const*, bool, bool)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Comment by Alexander Barkov [ 2019-06-18 ]

OK to push

Comment by Olivier Bertrand [ 2019-08-01 ]

Please inform me when doing such fixes so I can include them in my local source code.

Generated at Thu Feb 08 08:54:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.