Details

    Description

      This method in item.cc:

      int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
      {
      ..
      }

      depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

      For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().

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

      -int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
      +int Item_hex_hybrid::save_in_field_as_string(Field *field)
       {
         field->set_notnull();
      -  if (field->result_type() == STRING_RESULT)
      -    return field->store(str_value.ptr(), str_value.length(), 
      -                        collation.collation);
      +  return field->store(str_value.ptr(), str_value.length(), 
      +                      collation.collation);
      +}
       
      +
      +int Item_hex_hybrid::save_in_field_as_number(Field *field)
      +{
      +  field->set_notnull();
       
      @@ -6413,6 +6466,15 @@ int Item_hex_hybrid::save_in_field(Field
       }
      +int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
      +{
      +  if (const Type_handler *handler= Type_handlers.handler(field->type()))
      +    return handler->save_in_field(this, field);
      +  return field->result_type() == STRING_RESULT ?
      +         save_in_field_as_string(field) : save_in_field_as_number(field);
      +}
      +

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            Description This method in item.cc:
            {code}
             int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.
            This method in item.cc:
            {code}
             int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

            For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().
            bar Alexander Barkov made changes -
            Description This method in item.cc:
            {code}
             int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

            For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().
            This method in item.cc:
            {code}
            int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

            For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().
            bar Alexander Barkov made changes -
            Labels refactoring
            bar Alexander Barkov made changes -
            Description This method in item.cc:
            {code}
            int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

            For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().
            This method in item.cc:
            {code}
            int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

            For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().

            The relevant pieces of the code in the original type handler patch:
            {code}
            +int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            +{
            + if (const Type_handler *handler= Type_handlers.handler(field->type()))
            + return handler->save_in_field(this, field);
            + return field->result_type() == STRING_RESULT ?
            + save_in_field_as_string(field) : save_in_field_as_number(field);
            +}
            +
            {code}
            bar Alexander Barkov made changes -
            Description This method in item.cc:
            {code}
            int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

            For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().

            The relevant pieces of the code in the original type handler patch:
            {code}
            +int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            +{
            + if (const Type_handler *handler= Type_handlers.handler(field->type()))
            + return handler->save_in_field(this, field);
            + return field->result_type() == STRING_RESULT ?
            + save_in_field_as_string(field) : save_in_field_as_number(field);
            +}
            +
            {code}
            This method in item.cc:
            {code}
            int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            {
            ..
            }
            {code}
            depends on the data type. It should be split apart into virtual methods in Field, so the user-defined data types and the standard data types look similar.

            For example, the INET6 data type will need its own conversion, which is not compatible with the current behavior of Item_hex_hybrid::save_in_field().

            The relevant pieces of the code in the original type handler patch:
            {code}
            -int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            +int Item_hex_hybrid::save_in_field_as_string(Field *field)
             {
               field->set_notnull();
            - if (field->result_type() == STRING_RESULT)
            - return field->store(str_value.ptr(), str_value.length(),
            - collation.collation);
            + return field->store(str_value.ptr(), str_value.length(),
            + collation.collation);
            +}
             
            +
            +int Item_hex_hybrid::save_in_field_as_number(Field *field)
            +{
            + field->set_notnull();

            @@ -6413,6 +6466,15 @@ int Item_hex_hybrid::save_in_field(Field
             }
            +int Item_hex_hybrid::save_in_field(Field *field, bool no_conversions)
            +{
            + if (const Type_handler *handler= Type_handlers.handler(field->type()))
            + return handler->save_in_field(this, field);
            + return field->result_type() == STRING_RESULT ?
            + save_in_field_as_string(field) : save_in_field_as_number(field);
            +}
            +
            {code}
            bar Alexander Barkov made changes -
            Fix Version/s 10.2.0 [ 20700 ]
            Fix Version/s 10.2 [ 14601 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 73310 ] MariaDB v4 [ 132760 ]

            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.