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

Add a helper class Record_addr

    XMLWordPrintable

Details

    Description

      These three parameters:

        uchar *ptr_arg,
        uchar *null_ptr_arg,
        uchar null_bit_arg

      are always passed to Field_xxx constructor.

      Under terms of MDEV-4912 we'll introduce a few methods in Type_handler which will do "new Field_xxx". Before doing this, to make the Type_handler API look simpler, we'll introduce a new class:

      Record_addr
      {
      public:
        uchar         *ptr;                   // Position to field in record
        /**
           Byte where the @c NULL bit is stored inside a record. If this Field is a
           @c NOT @c NULL field, this member is @c NULL.
        */
        uchar         *null_ptr;
        uchar         null_bit;               // Bit used to test null bit
      };

      Then:

      • Derive Field from Record_addr
      • Change Field constructors to accept a "const Record_addr &addr" parameter instead of the three separate parameters ptr_arg, null_ptr_arg, null_bit_arg.

      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.