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

Add Type_handler::Item_decimal_scale() and Item_divisor_precision_increment()

    XMLWordPrintable

Details

    Description

      These pieces of the code are not friendly to pluggable data types:

      uint decimal_scale() const
      {
        return decimals < NOT_FIXED_DEC ? decimals :
               is_temporal_type_with_time(field_type()) ?
               TIME_SECOND_PART_DIGITS :
               MY_MIN(max_length, DECIMAL_MAX_SCALE);
      }
      

      uint divisor_precision_increment() const
      {
        return decimals <  NOT_FIXED_DEC ? decimals :
               is_temporal_type_with_time(field_type()) ?
               TIME_SECOND_PART_DIGITS :
               decimals;
      }
      

      We'll add virtual methods in Type_handler instead:

      virtual uint Item_decimal_scale(const Item *item) const;
      virtual uint Item_divisor_precision_increment(const Item *) const;
      

      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.