![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
SQL data field and tuple. More...
Functions | |
| static dtype_t * | dfield_get_type (const dfield_t *field) | 
| Gets pointer to the type struct of SQL data field.  More... | |
| static void | dfield_set_type (dfield_t *field, const dtype_t *type) | 
| Sets the type struct of SQL data field.  More... | |
| static void * | dfield_get_data (const dfield_t *field) | 
| Gets pointer to the data in a field.  More... | |
| static uint32_t | dfield_get_len (const dfield_t *field) | 
| Gets length of field data.  More... | |
| static void | dfield_set_len (dfield_t *field, ulint len) | 
| Sets length in a field.  More... | |
| static ulint | dfield_is_null (const dfield_t *field) | 
| Determines if a field is SQL NULL.  More... | |
| static bool | dfield_is_ext (const dfield_t *field) | 
| Determines if a field is externally stored.  More... | |
| static void | dfield_set_ext (dfield_t *field) | 
| Sets the "external storage" flag.  More... | |
| static spatial_status_t | dfield_get_spatial_status (const dfield_t *field) | 
| Gets spatial status for "external storage".  More... | |
| static void | dfield_set_spatial_status (dfield_t *field, spatial_status_t spatial_status) | 
| Sets spatial status for "external storage".  More... | |
| static void | dfield_set_data (dfield_t *field, const void *data, ulint len) | 
| Sets pointer to the data and length in a field.  More... | |
| static void | dfield_write_mbr (dfield_t *field, const double *mbr) | 
| Sets pointer to the data and length in a field.  More... | |
| static void | dfield_set_null (dfield_t *field) | 
| Sets a data field to SQL NULL.  More... | |
| static void | dfield_copy_data (dfield_t *field1, const dfield_t *field2) | 
| Copies the data and len fields.  More... | |
| static void | dfield_copy (dfield_t *field1, const dfield_t *field2) | 
| Copies a data field to another.  More... | |
| static void | dfield_dup (dfield_t *field, mem_heap_t *heap) | 
| Copies the data pointed to by a data field.  More... | |
| static bool | dfield_is_multi_value (const dfield_t *field) | 
| static void | dfield_multi_value_dup (dfield_t *field, mem_heap_t *heap) | 
| Copies the data pointed to by a data field.  More... | |
| bool | dfield_datas_are_binary_equal (const dfield_t *field1, const dfield_t *field2, ulint len) | 
| Tests if two data fields are equal.  More... | |
| static bool | dfield_data_is_binary_equal (const dfield_t *field, ulint len, const byte *data) | 
| static ulint | dtuple_get_info_bits (const dtuple_t *tuple) | 
| Gets info bits in a data tuple.  More... | |
| static void | dtuple_set_info_bits (dtuple_t *tuple, ulint info_bits) | 
| Sets info bits in a data tuple.  More... | |
| static ulint | dtuple_get_n_fields_cmp (const dtuple_t *tuple) | 
| Gets number of fields used in record comparisons.  More... | |
| static void | dtuple_set_n_fields_cmp (dtuple_t *tuple, ulint n_fields_cmp) | 
| static ulint | dtuple_get_n_fields (const dtuple_t *tuple) | 
| Gets number of fields in a data tuple.  More... | |
| static ulint | dtuple_get_n_v_fields (const dtuple_t *tuple) | 
| Gets the number of virtual fields in a data tuple.  More... | |
| static dfield_t * | dtuple_get_nth_field (const dtuple_t *tuple, ulint n) | 
| static dfield_t * | dtuple_get_nth_v_field (const dtuple_t *tuple, ulint n) | 
| static dtuple_t * | dtuple_create_from_mem (void *buf, ulint buf_size, ulint n_fields, ulint n_v_fields) | 
| Creates a data tuple from an already allocated chunk of memory.  More... | |
| static void | dtuple_dup_v_fld (const dtuple_t *vrow, mem_heap_t *heap) | 
| Duplicate the virtual field data in a dtuple_t.  More... | |
| static void | dtuple_init_v_fld (const dtuple_t *vrow) | 
| Initialize the virtual field data in a dtuple_t.  More... | |
| static dtuple_t * | dtuple_create (mem_heap_t *heap, ulint n_fields) | 
| Creates a data tuple to a memory heap.  More... | |
| static dtuple_t * | dtuple_create_with_vcol (mem_heap_t *heap, ulint n_fields, ulint n_v_fields) | 
| Creates a data tuple with virtual columns to a memory heap.  More... | |
| static void | dtuple_copy_v_fields (dtuple_t *d_tuple, const dtuple_t *s_tuple) | 
| Copies a data tuple's virtual fields to another.  More... | |
| static dtuple_t * | dtuple_copy (const dtuple_t *tuple, mem_heap_t *heap) | 
| Copies a data tuple to another.  More... | |
| static ulint | dtuple_get_data_size (const dtuple_t *tuple, ulint comp) | 
| The following function returns the sum of data lengths of a tuple.  More... | |
| static void | dtuple_set_types_binary (dtuple_t *tuple, ulint n) | 
| Sets types of fields binary in a tuple.  More... | |
| static uint64_t | dtuple_hash (const dtuple_t *tuple, ulint n_fields, ulint n_bytes, uint64_t hash_value) | 
| static void | data_write_sql_null (byte *data, ulint len) | 
| static bool | dtuple_contains_null (const dtuple_t *tuple) | 
| void | dtuple_big_rec_free (big_rec_t *vector) | 
| Frees the memory in a big rec vector.  More... | |
Variables | |
| byte | data_error | 
| Dummy variable to catch access to uninitialized fields.  More... | |
SQL data field and tuple.
Created 5/30/1994 Heikki Tuuri
Copies a data field to another.
| field1 | out: field to copy to | 
| field2 | in: field to copy from | 
Copies the data and len fields.
| field1 | out: field to copy to | 
| field2 | in: field to copy from | 
      
  | 
  inlinestatic | 
      
  | 
  inline | 
Tests if two data fields are equal.
If len==0, tests the data length and content for equality. If len>0, tests the first len bytes of the content for equality.
| [in] | field1 | first field to compare | 
| [in] | field2 | second field to compare | 
| [in] | len | maximum prefix to compare, or 0 to compare the whole field length. This works only if !multi_val | 
      
  | 
  inlinestatic | 
Copies the data pointed to by a data field.
| field | in/out: data field | 
| heap | in: memory heap where allocated | 
      
  | 
  inlinestatic | 
Gets pointer to the data in a field.
| field | in: field | 
      
  | 
  inlinestatic | 
Gets length of field data.
| field | in: field | 
      
  | 
  inlinestatic | 
Gets spatial status for "external storage".
| [in,out] | field | field | 
Gets pointer to the type struct of SQL data field.
| field | in: SQL data field | 
      
  | 
  inlinestatic | 
Determines if a field is externally stored.
| field | in: field | 
      
  | 
  inlinestatic | 
Determines if a field is SQL NULL.
| field | in: field | 
      
  | 
  inlinestatic | 
Copies the data pointed to by a data field.
This function works for multi-value fields only.
| [in,out] | field | data field | 
| [in] | heap | memory heap where allocated | 
Sets pointer to the data and length in a field.
| field | in: field | 
| data | in: data | 
| len | in: length or UNIV_SQL_NULL | 
      
  | 
  inlinestatic | 
Sets the "external storage" flag.
| field | in/out: field | 
Sets length in a field.
| field | in: field | 
| len | in: length or UNIV_SQL_NULL | 
      
  | 
  inlinestatic | 
Sets a data field to SQL NULL.
| field | in/out: field | 
      
  | 
  inlinestatic | 
Sets spatial status for "external storage".
| [in,out] | field | field | 
| [in] | spatial_status | spatial status | 
Sets the type struct of SQL data field.
| field | in: SQL data field | 
| type | in: pointer to data type struct | 
      
  | 
  inlinestatic | 
Sets pointer to the data and length in a field.
| field | in: field | 
| mbr | in: data | 
      
  | 
  inline | 
Frees the memory in a big rec vector.
in, own: big rec vector; it is freed in this function
      
  | 
  inlinestatic | 
      
  | 
  inlinestatic | 
Copies a data tuple to another.
This is a shallow copy; if a deep copy is desired, dfield_dup() will have to be invoked on each field.
| tuple | in: tuple to copy from | 
| heap | in: memory heap where the tuple is created | 
Copies a data tuple's virtual fields to another.
This is a shallow copy;
| [in,out] | d_tuple | destination tuple | 
| [in] | s_tuple | source tuple | 
      
  | 
  inlinestatic | 
Creates a data tuple to a memory heap.
The default value for number of fields used in record comparisons for this tuple is n_fields.
| heap | in: memory heap where the tuple is created, DTUPLE_EST_ALLOC(n_fields) bytes will be allocated from this heap | 
| n_fields | in: number of fields | 
      
  | 
  inlinestatic | 
Creates a data tuple from an already allocated chunk of memory.
The size of the chunk must be at least DTUPLE_EST_ALLOC(n_fields). The default value for number of fields used in record comparisons for this tuple is n_fields.
| [in,out] | buf | buffer to use | 
| [in] | buf_size | buffer size | 
| [in] | n_fields | number of field | 
| [in] | n_v_fields | number of fields on virtual columns | 
      
  | 
  inlinestatic | 
Creates a data tuple with virtual columns to a memory heap.
| [in] | heap | memory heap where the tuple is created | 
| [in] | n_fields | number of fields | 
| [in] | n_v_fields | number of fields on virtual col | 
      
  | 
  inlinestatic | 
Duplicate the virtual field data in a dtuple_t.
| [in,out] | vrow | dtuple contains the virtual fields | 
| [in] | heap | heap memory to use | 
The following function returns the sum of data lengths of a tuple.
The space occupied by the field structs or the tuple struct is not counted. Neither is possible space in externally stored parts of the field.
| tuple | in: typed data tuple | 
| comp | in: nonzero=ROW_FORMAT=COMPACT | 
Gets info bits in a data tuple.
| tuple | in: tuple | 
Gets number of fields in a data tuple.
| tuple | in: tuple | 
Gets number of fields used in record comparisons.
| tuple | in: tuple | 
Gets the number of virtual fields in a data tuple.
| [in] | tuple | dtuple to check | 
      
  | 
  inlinestatic | 
      
  | 
  inlinestatic | 
Initialize the virtual field data in a dtuple_t.
| [in,out] | vrow | dtuple contains the virtual fields | 
Sets info bits in a data tuple.
| tuple | in: tuple | 
| info_bits | in: info bits | 
Sets types of fields binary in a tuple.
| tuple | in: data tuple | 
| n | in: number of fields to set | 
      
  | 
  extern | 
Dummy variable to catch access to uninitialized fields.
In the debug version, dtuple_create() will make all fields of dtuple_t point to data_error.