[MDEV-13860] CONNECT engine does not build with JDBC without ODBC Created: 2017-09-21  Updated: 2018-01-24  Resolved: 2017-10-27

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - Connect
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.0.33, 10.2.11

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

/data/src/10.0/storage/connect/ha_connect.cc: In function 'int connect_assisted_discovery(handlerton*, THD*, TABLE_SHARE*, HA_CREATE_INFO*)':
/data/src/10.0/storage/connect/ha_connect.cc:5763:38: error: 'tabtyp' was not declared in this scope
        qrp = JDBCTables(g, shm, tab, tabtyp, mxr, true, sjp);
                                      ^
storage/connect/CMakeFiles/connect.dir/build.make:54: recipe for target 'storage/connect/CMakeFiles/connect.dir/ha_connect.cc.o' failed
make[2]: *** [storage/connect/CMakeFiles/connect.dir/ha_connect.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 49%] Building CXX object storage/perfschema/CMakeFiles/perfschema.dir/table_socket_summary_by_instance.cc.o
CMakeFiles/Makefile2:4070: recipe for target 'storage/connect/CMakeFiles/connect.dir/all' failed
make[1]: *** [storage/connect/CMakeFiles/connect.dir/all] Error 2

It used to happen before, back then it was because tabtyp is defined under if defined(ODBC_SUPPORT) , but is used under if defined(JDBC_SUPPORT). I assume the reason is still the same – serg fixed it, but apparently the fix got lost after the latest merge.

It probably needs to be fixed in MariaDB main trees again (for now), but also in Olivier trees, so further merges don't make it resurface.



 Comments   
Comment by Sergei Golubchik [ 2017-09-21 ]

It wasn't lost, it was fixed only in 10.2, because it was present only in 10.2. and apparently latest connect/10.0 merge introduced that code into 10.0.

Comment by Elena Stepanova [ 2017-10-26 ]

It's there again.
I've re-applied the same patch on top of all merges.
https://github.com/MariaDB/server/commit/eadcf09bc48eb573316c01382cff2be1b91c8ce4

Comment by Olivier Bertrand [ 2017-11-01 ]

This patch should be included in my local source files. Could you please tell me what it is so you won't have to apply it on each new release?

Actually, for all patches that have to be applied to CONNECT, you should tell me about so I can include them in the CONNECT source code.

Comment by Elena Stepanova [ 2017-11-01 ]

bertrandop,
I used this one originally made by serg: https://github.com/MariaDB/server/commit/eadcf09bc48eb573316c01382cff2be1b91c8ce4

The problem was that, if one has on the machine Java but not ODBC, the Connect engine would build with JDBC support, but without ODBC support; thus, the variable wouldn't be declared, since the declaration was under ODBC_SUPPORT, but it would be attempted to be used, since the call is under JDBC_SUPPORT.

Comment by Olivier Bertrand [ 2017-11-01 ]

Elena,
Thanks, it is now applied into my code.
Any other?

Comment by Elena Stepanova [ 2017-11-01 ]

bertrandop, not that I know of, maybe serg does.

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