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

Split Item::save_in_field() into virtual methods in Type_handler

    XMLWordPrintable

Details

    Description

      Under terms of this task we'll get rid of the code testing result_type() against STRING_RESULT, REAL_RESULT, DECIMAL_RESULT and move this code into a new virtual method in Type_handler

       virtual int Item_save_in_field(Item *item, Field *field,
                                      bool no_conversions) const= 0;
      

      The method Item::save_in_field() will turn into simple two lines:

      int Item::save_in_field(Field *field, bool no_conversions)
      {
        int error= type_handler()->Item_save_in_field(this, field, no_conversions);
        return error ? error : (field->table->in_use->is_error() ? 1 : 0);
      }
      

      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.