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

Add Type_handler::cast_to_int_type

    XMLWordPrintable

Details

    Description

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

      @@ -512,6 +514,11 @@ class Item_func_hybrid_field_type :publi
           cached_field_type(MYSQL_TYPE_DOUBLE)
         {}
         enum_field_types field_type() const { return cached_field_type; }
      +  Item_result cast_to_int_type() const
      +  {
      +    const Type_handler *handler= Type_handlers.handler(field_type());
      +    return handler ? handler->cast_to_int_type() : cmp_type();
      +  }

      @@ -1071,9 +1080,15 @@ class Item_func_min_max :public Item_fun
      +  Item_result cast_to_int_type() const
      +  {
      +    const Type_handler *handler= Type_handlers.handler(field_type());
      +    return handler ? handler->cast_to_int_type() : Item_func::cmp_type();
      +  }
       };

      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.