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

A method of CASE searched/simple detection

Details

    Description

      MariaDB changed to using separate classes for simple/searched in 10.3. ColumnStore needs to figure out which is being used. We would consider something like using dynamic_cast on the item but the server has no-rtti so this fails.

      Instead can we please have a virtual function in Item_func_case similar to this?

      virtual const char* case_type()= 0;
      

      This would return something like "simple" for simple classes and "searched" for searched classes.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov added a comment - - edited

            The patch for MDEV-17411 solved this.

            Use this condition to detect simple or searched CASE:

            if (item_func->functype() == CASE_SEARCHED_FUNC)
            {
              // handle searched CASE
            }
            if (item_func->functype() == CASE_SIMPLE_FUNC)
            {
              // handle searched CASE
            }
            

            bar Alexander Barkov added a comment - - edited The patch for MDEV-17411 solved this. Use this condition to detect simple or searched CASE: if (item_func->functype() == CASE_SEARCHED_FUNC) { // handle searched CASE } if (item_func->functype() == CASE_SIMPLE_FUNC) { // handle searched CASE }

            People

              bar Alexander Barkov
              LinuxJedi Andrew Hutchings (Inactive)
              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.