Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-5437

columnstore fails to compile to due old cs->casedn_multiply use

Details

    Description

      https://buildbot.mariadb.org/#/builders/148/builds/19518/steps/5/logs/stdio

      /home/buildbot/amd64-debian-10-deb-autobake/build/storage/columnstore/columnstore/utils/funcexp/func_lcase.cpp: In member function ‘virtual std::__cxx11::string funcexp::Func_lcase::getStrVal(rowgroup::Row&, funcexp::FunctionParm&, bool&, execplan::CalpontSystemCatalog::ColType&)’:
      /home/buildbot/amd64-debian-10-deb-autobake/build/storage/columnstore/columnstore/utils/funcexp/func_lcase.cpp:56:33: error: invalid use of member function ‘uint charset_info_st::casedn_multiply() const’ (did you forget the ‘()’ ?)
         uint64_t bufLen = inLen * cs->casedn_multiply;
                                   ~~~~^~~~~~~~~~~~~~~
      make[4]: *** [storage/columnstore/columnstore/utils/funcexp/CMakeFiles/funcexp.dir/build.make:742: storage/columnstore/columnstore/utils/funcexp/CMakeFiles/funcexp.dir/func_lcase.cpp.o] Error 1
      

      With MDEV-30661 cs->casedn_multiply became a function rather than a structure member.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov added a comment - - edited

            TheLinuxJedi, danblack, something like this should probably work:

            /* The API change happened in 10.10.4, 10.11.3, 11.0.2 */
            #if ((MYSQL_VERSION_ID >= 101004 && MYSQL_VERSION_ID < 101099) || \
                  (MYSQL_VERSION_ID >= 101103 && MYSQL_VERSION_ID < 101199) || \
                  MYSQL_VERSION_ID >= 110002)
            uint64_t bufLen = inLen * cs->casedn_multiply();
            #else
            uint64_t bufLen = inLen * cs->casedn_multiply;
            #endif
            

            bar Alexander Barkov added a comment - - edited TheLinuxJedi , danblack , something like this should probably work: /* The API change happened in 10.10.4, 10.11.3, 11.0.2 */ #if ((MYSQL_VERSION_ID >= 101004 && MYSQL_VERSION_ID < 101099) || \ (MYSQL_VERSION_ID >= 101103 && MYSQL_VERSION_ID < 101199) || \ MYSQL_VERSION_ID >= 110002) uint64_t bufLen = inLen * cs->casedn_multiply(); #else uint64_t bufLen = inLen * cs->casedn_multiply; #endif
            bar Alexander Barkov added a comment - - edited

            Another option (to avoid this cumbersome #if duplication) would be to move this code into a shared header file:

            /* The API change happened in 10.10.4, 10.11.3, 11.0.2 */
            #if ((MYSQL_VERSION_ID >= 101004 && MYSQL_VERSION_ID < 101099) || \
                  (MYSQL_VERSION_ID >= 101103 && MYSQL_VERSION_ID < 101199) || \
                  MYSQL_VERSION_ID >= 110002)
            #define CS_CASEDN_MULTIPLY(cs) ((cs)->casedn_multiply())
            #define CS_CASEUP_MULTIPLY(cs) ((cs)->caseup_multiply())
            #else
            #define CS_CASEDN_MULTIPLY(cs) ((cs)->casedn_multiply)
            #define CS_CASEUP_MULTIPLY(cs) ((cs)->caseup_multiply)
            #endif
            

            and include it from func_lcase.cpp and func_ucase.cpp.

            bar Alexander Barkov added a comment - - edited Another option (to avoid this cumbersome #if duplication) would be to move this code into a shared header file: /* The API change happened in 10.10.4, 10.11.3, 11.0.2 */ #if ((MYSQL_VERSION_ID >= 101004 && MYSQL_VERSION_ID < 101099) || \ (MYSQL_VERSION_ID >= 101103 && MYSQL_VERSION_ID < 101199) || \ MYSQL_VERSION_ID >= 110002) #define CS_CASEDN_MULTIPLY(cs) ((cs)->casedn_multiply()) #define CS_CASEUP_MULTIPLY(cs) ((cs)->caseup_multiply()) #else #define CS_CASEDN_MULTIPLY(cs) ((cs)->casedn_multiply) #define CS_CASEUP_MULTIPLY(cs) ((cs)->caseup_multiply) #endif and include it from func_lcase.cpp and func_ucase.cpp .
            danblack Daniel Black added a comment -

            There's no point over complicating it. The git submodule ties the columnstore to the server version. So if you when back to 11.0.1, the git submodule would go to a previous columnstore version that didn't have this change.

            danblack Daniel Black added a comment - There's no point over complicating it. The git submodule ties the columnstore to the server version. So if you when back to 11.0.1, the git submodule would go to a previous columnstore version that didn't have this change.
            drrtuy Roman added a comment -

            danblack TheLinuxJedi AFAIK the issue has been resolved. Am I right?

            drrtuy Roman added a comment - danblack TheLinuxJedi AFAIK the issue has been resolved. Am I right?
            danblack Daniel Black added a comment - - edited

            Yes. and serg committed the submodule update in the server with commit 5f33351f48557fa09d5ebcf9864c33bfa296cd8e.

            Thanks for the fix.

            danblack Daniel Black added a comment - - edited Yes. and serg committed the submodule update in the server with commit 5f33351f48557fa09d5ebcf9864c33bfa296cd8e . Thanks for the fix.

            People

              drrtuy Roman
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.