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

Introduce Type_handler::make_in_vector() and Item_func_in_fix_comparator_compatible_types()

    XMLWordPrintable

Details

    Description

      This task will:

      1. Introduce new Type_handler methods:

      virtual in_vector *make_in_vector(THD *thd, const Item_func_in *func, uint nargs) const;
      virtual bool Item_func_in_fix_comparator_compatible_types(THD *thd, Item_func_in *) const;
      

      2. Remove these data type conditions in Item_func_in::fix_length_and_dec()

      • switch (m_comparator.cmp_type())
      • if (m_comparator.cmp_type() == STRING_RESULT
      • if (m_comparator.cmp_type() == ROW_RESULT)
      • if ... m_comparator.cmp_type() != INT_RESULT

      and use the new Type_handler methods instead.

      3. Split in_datetime (which now covers all temporal data types: DATETIME, DATE, TIME) into an abstract parent class in_temporal and two instantiable classes in_datetime (for DATETIME and DATE) and in_time (for TIME).

      After this change the behavior of the code responsible for IN bisection search will be fully handled by Type_handler.

      There will some explicit XXX_RESULT conditions be left though, in the code responsible for the cmp_items based IN search. This code will be cleaned-up in a separate patch.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.