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

Move ASSERT_COLUMN_MARKED_FOR_XXX as methods to Field

    XMLWordPrintable

Details

    Description

      New data types will introduce their own Field_xxx classes which will be implemented outside of field.cc.

      To be able to do similar asserts in new Field_xxx, let's move the code from macros to methods in Field, like this:

      inline bool Field::marked_for_read() const
      {
        return !table ||
               (!table->read_set ||
                bitmap_is_set(table->read_set, field_index) ||
                (!(ptr >= table->record[0] &&
                ptr < table->record[0] + table->s->reclength)));
      }
       
       
      inline bool Field::marked_for_write_or_computed() const
      {
        return is_stat_field || !table ||
               (!table->write_set ||
                bitmap_is_set(table->write_set, field_index) ||
                (!(ptr >= table->record[0] &&
                ptr < table->record[0] + table->s->reclength)));
      }
      

      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.