[MDEV-9218] Add a helper class Record_addr Created: 2015-12-01  Updated: 2017-05-17  Resolved: 2017-05-17

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.3.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype, refactoring

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
Relates
relates to MDEV-9217 Split Item::tmp_table_field_from_fiel... Closed

 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.


 Comments   
Comment by Alexander Barkov [ 2017-05-17 ]

Record_addr was added by the patch for MDEV-9217.

Generated at Thu Feb 08 07:33:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.