Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13860

CONNECT engine does not build with JDBC without ODBC

Details

    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.

      Attachments

        Activity

          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.

          serg Sergei Golubchik added a comment - 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.
          elenst Elena Stepanova added a comment - - edited

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

          elenst Elena Stepanova added a comment - - edited It's there again. I've re-applied the same patch on top of all merges. https://github.com/MariaDB/server/commit/eadcf09bc48eb573316c01382cff2be1b91c8ce4
          bertrandop Olivier Bertrand added a comment - - edited

          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.

          bertrandop Olivier Bertrand added a comment - - edited 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.

          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.

          elenst Elena Stepanova added a comment - 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 .

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

          bertrandop Olivier Bertrand added a comment - Elena, Thanks, it is now applied into my code. Any other?

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

          elenst Elena Stepanova added a comment - bertrandop , not that I know of, maybe serg does.

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.