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

Split rpl_utility.cc:can_convert_field_to() into a virtual method in Type_handler

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      In order to make built-in and pluggable data types look similar inside the server code, we'll split this function:

      static bool
      can_convert_field_to(Field *field,
                           enum_field_types source_type, uint16 metadata,
                           Relay_log_info *rli, uint16 mflags,
                           int *order_var)
      {
      ...
      }

      into type-specific implementations of a new virtual method in Type_handler.

      The relevant piece of the code in the original type handler patch:

      --- sql/rpl_utility.cc  2014-05-13 09:53:30 +0000
      +++ sql/rpl_utility.cc  2014-06-27 15:48:45 +0000
      @@ -675,6 +675,9 @@ can_convert_field_to(Field *field,
         */
       
         DBUG_PRINT("debug", ("Base types are different, checking conversion"));
      +  if (Type_handlers.handler(source_type))
      +    DBUG_RETURN(false);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: