|
InnoDB Plugin
1.0
|


Functions | |
| UNIV_INLINE dtype_t * | dfield_get_type (const dfield_t *field) |
| UNIV_INLINE void | dfield_set_type (dfield_t *field, const dtype_t *type) |
| UNIV_INLINE void * | dfield_get_data (const dfield_t *field) |
| UNIV_INLINE ulint | dfield_get_len (const dfield_t *field) |
| UNIV_INLINE void | dfield_set_len (dfield_t *field, ulint len) |
| UNIV_INLINE ulint | dfield_is_null (const dfield_t *field) |
| UNIV_INLINE ulint | dfield_is_ext (const dfield_t *field) |
| UNIV_INLINE void | dfield_set_ext (dfield_t *field) |
| UNIV_INLINE void | dfield_set_data (dfield_t *field, const void *data, ulint len) |
| UNIV_INLINE void | dfield_set_null (dfield_t *field) |
| UNIV_INLINE void | dfield_copy_data (dfield_t *field1, const dfield_t *field2) |
| UNIV_INLINE void | dfield_copy (dfield_t *field1, const dfield_t *field2) |
| UNIV_INLINE void | dfield_dup (dfield_t *field, mem_heap_t *heap) |
| UNIV_INLINE ibool | dfield_datas_are_binary_equal (const dfield_t *field1, const dfield_t *field2, ulint len) |
| UNIV_INLINE ibool | dfield_data_is_binary_equal (const dfield_t *field, ulint len, const byte *data) |
| UNIV_INLINE ulint | dtuple_get_info_bits (const dtuple_t *tuple) |
| UNIV_INLINE void | dtuple_set_info_bits (dtuple_t *tuple, ulint info_bits) |
| UNIV_INLINE ulint | dtuple_get_n_fields_cmp (const dtuple_t *tuple) |
| UNIV_INLINE void | dtuple_set_n_fields_cmp (dtuple_t *tuple, ulint n_fields_cmp) |
| UNIV_INLINE ulint | dtuple_get_n_fields (const dtuple_t *tuple) |
| UNIV_INLINE dfield_t * | dtuple_get_nth_field (const dtuple_t *tuple, ulint n) |
| UNIV_INLINE dtuple_t * | dtuple_create_from_mem (void *buf, ulint buf_size, ulint n_fields) |
| UNIV_INLINE dtuple_t * | dtuple_create (mem_heap_t *heap, ulint n_fields) |
| UNIV_INLINE dtuple_t * | dtuple_copy (const dtuple_t *tuple, mem_heap_t *heap) |
| UNIV_INLINE ulint | dtuple_get_data_size (const dtuple_t *tuple, ulint comp) |
| UNIV_INLINE ulint | dtuple_get_n_ext (const dtuple_t *tuple) |
| UNIV_INLINE void | dtuple_set_types_binary (dtuple_t *tuple, ulint n) |
| UNIV_INLINE ulint | dtuple_fold (const dtuple_t *tuple, ulint n_fields, ulint n_bytes, index_id_t tree_id) |
| UNIV_INLINE void | data_write_sql_null (byte *data, ulint len) |
| UNIV_INLINE ibool | dtuple_contains_null (const dtuple_t *tuple) |
| UNIV_INLINE void | dtuple_big_rec_free (big_rec_t *vector) |
Variables | |
| byte | data_error |
SQL data field and tuple
Created 5/30/1994 Heikki Tuuri
| UNIV_INLINE void data_write_sql_null | ( | byte * | data, |
| ulint | len | ||
| ) |
Writes an SQL null field full of zeros.
| data | in: pointer to a buffer of size len |
| len | in: SQL null size in bytes |
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 |
| UNIV_INLINE ibool dfield_data_is_binary_equal | ( | const dfield_t * | field, |
| ulint | len, | ||
| const byte * | data | ||
| ) |
Tests if dfield data length and content is equal to the given.
| field | in: field |
| len | in: data length or UNIV_SQL_NULL |
| data | in: data |
| UNIV_INLINE ibool dfield_datas_are_binary_equal | ( | const dfield_t * | field1, |
| const dfield_t * | field2, | ||
| ulint | len | ||
| ) |
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.
| field1 | in: field |
| field2 | in: field |
| len | in: maximum prefix to compare, or 0 to compare the whole field length |
| UNIV_INLINE void dfield_dup | ( | dfield_t * | field, |
| mem_heap_t * | heap | ||
| ) |
Copies the data pointed to by a data field.
| field | in/out: data field |
| heap | in: memory heap where allocated |
| UNIV_INLINE void* dfield_get_data | ( | const dfield_t * | field | ) |
Gets pointer to the data in a field.
| field | in: field |
| UNIV_INLINE ulint dfield_get_len | ( | const dfield_t * | field | ) |
Gets length of field data.
| field | in: field |
Gets pointer to the type struct of SQL data field.
| field | in: SQL data field |
| UNIV_INLINE ulint dfield_is_ext | ( | const dfield_t * | field | ) |
Determines if a field is externally stored
| field | in: field |
| UNIV_INLINE ulint dfield_is_null | ( | const dfield_t * | field | ) |
Determines if a field is SQL NULL
| field | in: field |
| UNIV_INLINE void dfield_set_data | ( | dfield_t * | field, |
| const void * | data, | ||
| ulint | len | ||
| ) |
Sets pointer to the data and length in a field.
| field | in: field |
| data | in: data |
| len | in: length or UNIV_SQL_NULL |
| UNIV_INLINE void dfield_set_ext | ( | dfield_t * | field | ) |
Sets the "external storage" flag
| field | in/out: field |
| UNIV_INLINE void dfield_set_len | ( | dfield_t * | field, |
| ulint | len | ||
| ) |
Sets length in a field.
| field | in: field |
| len | in: length or UNIV_SQL_NULL |
| UNIV_INLINE void dfield_set_null | ( | dfield_t * | field | ) |
Sets a data field to SQL NULL.
| field | in/out: field |
Sets the type struct of SQL data field.
| field | in: SQL data field |
| type | in: pointer to data type struct |
| UNIV_INLINE void dtuple_big_rec_free | ( | big_rec_t * | vector | ) |
Frees the memory in a big rec vector.
| vector | in, own: big rec vector; it is freed in this function |
Checks if a dtuple contains an SQL null value.
| tuple | in: dtuple |
| UNIV_INLINE dtuple_t* dtuple_copy | ( | const dtuple_t * | tuple, |
| mem_heap_t * | heap | ||
| ) |
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 |
| UNIV_INLINE dtuple_t* dtuple_create | ( | mem_heap_t * | heap, |
| ulint | n_fields | ||
| ) |
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 |
| UNIV_INLINE dtuple_t* dtuple_create_from_mem | ( | void * | buf, |
| ulint | buf_size, | ||
| ulint | n_fields | ||
| ) |
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.
| buf | in, out: buffer to use |
| buf_size | in: buffer size |
| n_fields | in: number of fields |
| UNIV_INLINE ulint dtuple_fold | ( | const dtuple_t * | tuple, |
| ulint | n_fields, | ||
| ulint | n_bytes, | ||
| index_id_t | tree_id | ||
| ) |
Folds a prefix given as the number of fields of a tuple.
| tuple | in: the tuple |
| n_fields | in: number of complete fields to fold |
| n_bytes | in: number of bytes to fold in an incomplete last field |
| tree_id | in: index tree id |
| UNIV_INLINE ulint dtuple_get_data_size | ( | const dtuple_t * | tuple, |
| ulint | comp | ||
| ) |
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 |
| UNIV_INLINE ulint dtuple_get_info_bits | ( | const dtuple_t * | tuple | ) |
Gets info bits in a data tuple.
| tuple | in: tuple |
| UNIV_INLINE ulint dtuple_get_n_ext | ( | const dtuple_t * | tuple | ) |
Computes the number of externally stored fields in a data tuple.
| tuple | in: tuple |
| UNIV_INLINE ulint dtuple_get_n_fields | ( | const dtuple_t * | tuple | ) |
Gets number of fields in a data tuple.
| tuple | in: tuple |
| UNIV_INLINE ulint dtuple_get_n_fields_cmp | ( | const dtuple_t * | tuple | ) |
Gets number of fields used in record comparisons.
| tuple | in: tuple |
Gets nth field of a tuple.
| tuple | in: tuple |
| n | in: index of field |
| UNIV_INLINE void dtuple_set_info_bits | ( | dtuple_t * | tuple, |
| ulint | info_bits | ||
| ) |
Sets info bits in a data tuple.
| tuple | in: tuple |
| info_bits | in: info bits |
| UNIV_INLINE void dtuple_set_n_fields_cmp | ( | dtuple_t * | tuple, |
| ulint | n_fields_cmp | ||
| ) |
Sets number of fields used in record comparisons.
| tuple | in: tuple |
| n_fields_cmp | in: number of fields used in comparisons in rem0cmp.* |
| UNIV_INLINE void dtuple_set_types_binary | ( | dtuple_t * | tuple, |
| ulint | n | ||
| ) |
Sets types of fields binary in a tuple.
| tuple | in: data tuple |
| n | in: number of fields to set |
| byte data_error |
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.
1.8.1.2