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

Item_param: replace {INT|DECIMAL|REAL|STRING|TIME}_VALUE with Type_handler

    XMLWordPrintable

Details

    Description

      Item_param has two parallel systems to maintain the data type:

      • Type_handler_hybrid_field_type, which is used externally, like for a regular Item.
      • enum_item_param_state constants INT_VALUE, DECIMAL_VALUE, REAL_VALUE, STRING_VALUE, TIME_VALUE, which are used internally, to maintain the data stored inside Item_param::value.

      We'll do the following:

      • Remove the data type specific constants from enum_item_param_state
      • Add a new value SHORT_DATA_VALUE instead, for all data types.
      • Start using Type_handler_hybrid_field_type to maintain Item_param::value internally.

      After this change, enum_item_param_state will look like this:

      enum enum_item_param_state
      {
        NO_VALUE, NULL_VALUE, SHORT_DATA_VALUE, LONG_DATA_VALUE,
        DEFAULT_VALUE, IGNORE_VALUE
      } state;
      

      Note, SHORT_DATA_VALUE is needed to distinguish the state from LONG_DATA_VALUE.

      These changes are needed to simplify further work for:

      • MDEV-14270 Dynamic CREATE TABLE does not preserve the data type of SP variables with NULL value
      • MDEV-4912 Add a plugin to field types (column types)

      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.