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

Add Type_handler::Item_func_{plus|minus|mul|div|mod}_fix_length_and_dec()

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3.0
    • OTHER
    • None
    • 10.2.6-2, 10.2.6-3

    Description

      The following methods:

      Item_func_plus::fix_length_and_dec()
      Item_func_minus::fix_length_and_dec()
      Item_func_mul::fix_length_and_dec()
      Item_func_div::fix_length_and_dec()
      Item_func_mod::fix_length_and_dec()
      

      use methods cmp_type() and result_type() of their arguments.
      This is not friendly to pluggable data types, as only covers the built-in data types.

      Under term of this task we'll split implementations of these methods into new methods in Type_handler:

      virtual bool Item_func_plus_fix_length_and_dec(Item_func_plus *) const;
      virtual bool Item_func_minus_fix_length_and_dec(Item_func_minus *) const;
      virtual bool Item_func_mul_fix_length_and_dec(Item_func_mul *) const;
      virtual bool Item_func_div_fix_length_and_dec(Item_func_div *) const;
      virtual bool Item_func_mod_fix_length_and_dec(Item_func_mod *) const;
      

      Pluggable data types should be able to define their own fix_length_and_dec() logic.

      We'll also make the server return an error when a GOMETRY type expression appears as an argument of the affected operations.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.