#include "univ.i"#include "data0data.h"#include "rem0types.h"#include "mtr0types.h"Include dependency graph for rem0rec.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Defines | |
| #define | REC_MAX_N_FIELDS (1024 - 1) |
| #define | REC_MAX_HEAP_NO (2 * 8192 - 1) |
| #define | REC_MAX_N_OWNED (16 - 1) |
| #define | REC_INFO_MIN_REC_FLAG 0x10UL |
| #define | REC_N_OLD_EXTRA_BYTES 6 |
| #define | REC_N_NEW_EXTRA_BYTES 5 |
| #define | REC_STATUS_ORDINARY 0 |
| #define | REC_STATUS_NODE_PTR 1 |
| #define | REC_STATUS_INFIMUM 2 |
| #define | REC_STATUS_SUPREMUM 3 |
| #define | REC_OFFS_NORMAL_SIZE 100 |
| #define | REC_OFFS_SMALL_SIZE 10 |
| #define | rec_get_offsets(rec, index, offsets, n, heap) rec_get_offsets_func(rec,index,offsets,n,heap,__FILE__,__LINE__) |
| #define | REC_INFO_BITS 6 |
| #define | REC_1BYTE_OFFS_LIMIT 0x7FUL |
| #define | REC_2BYTE_OFFS_LIMIT 0x7FFFUL |
| #define | REC_MAX_DATA_SIZE (16 * 1024) |
Functions | |
| UNIV_INLINE ulint | rec_get_next_offs (rec_t *rec, ulint comp) |
| UNIV_INLINE void | rec_set_next_offs (rec_t *rec, ulint comp, ulint next) |
| UNIV_INLINE ulint | rec_get_n_fields_old (rec_t *rec) |
| UNIV_INLINE ulint | rec_get_n_fields (rec_t *rec, dict_index_t *index) |
| UNIV_INLINE ulint | rec_get_n_owned (rec_t *rec, ulint comp) |
| UNIV_INLINE void | rec_set_n_owned (rec_t *rec, ulint comp, ulint n_owned) |
| UNIV_INLINE ulint | rec_get_info_bits (rec_t *rec, ulint comp) |
| UNIV_INLINE void | rec_set_info_bits (rec_t *rec, ulint comp, ulint bits) |
| UNIV_INLINE ulint | rec_get_status (rec_t *rec) |
| UNIV_INLINE void | rec_set_status (rec_t *rec, ulint bits) |
| UNIV_INLINE ulint | rec_get_info_and_status_bits (rec_t *rec, ulint comp) |
| UNIV_INLINE void | rec_set_info_and_status_bits (rec_t *rec, ulint comp, ulint bits) |
| UNIV_INLINE ulint | rec_get_deleted_flag (rec_t *rec, ulint comp) |
| UNIV_INLINE void | rec_set_deleted_flag (rec_t *rec, ulint comp, ulint flag) |
| UNIV_INLINE ibool | rec_get_node_ptr_flag (rec_t *rec) |
| UNIV_INLINE ulint | rec_get_heap_no (rec_t *rec, ulint comp) |
| UNIV_INLINE void | rec_set_heap_no (rec_t *rec, ulint comp, ulint heap_no) |
| UNIV_INLINE ibool | rec_get_1byte_offs_flag (rec_t *rec) |
| ulint * | rec_get_offsets_func (rec_t *rec, dict_index_t *index, ulint *offsets, ulint n_fields, mem_heap_t **heap, const char *file, ulint line) |
| UNIV_INLINE ibool | rec_offs_validate (rec_t *rec, dict_index_t *index, const ulint *offsets) |
| UNIV_INLINE void | rec_offs_make_valid (rec_t *rec, dict_index_t *index, ulint *offsets) |
| byte * | rec_get_nth_field_old (rec_t *rec, ulint n, ulint *len) |
| UNIV_INLINE ulint | rec_get_nth_field_size (rec_t *rec, ulint n) |
| UNIV_INLINE byte * | rec_get_nth_field (rec_t *rec, const ulint *offsets, ulint n, ulint *len) |
| UNIV_INLINE ulint | rec_offs_comp (const ulint *offsets) |
| UNIV_INLINE ulint | rec_offs_nth_extern (const ulint *offsets, ulint n) |
| UNIV_INLINE ulint | rec_offs_nth_sql_null (const ulint *offsets, ulint n) |
| UNIV_INLINE ulint | rec_offs_nth_size (const ulint *offsets, ulint n) |
| UNIV_INLINE ibool | rec_offs_any_extern (const ulint *offsets) |
| UNIV_INLINE void | rec_set_nth_field_extern_bit (rec_t *rec, dict_index_t *index, ulint i, ibool val, mtr_t *mtr) |
| void | rec_set_field_extern_bits (rec_t *rec, dict_index_t *index, const ulint *vec, ulint n_fields, mtr_t *mtr) |
| UNIV_INLINE void | rec_set_nth_field (rec_t *rec, const ulint *offsets, ulint n, const void *data, ulint len) |
| UNIV_INLINE ulint | rec_get_data_size_old (rec_t *rec) |
| UNIV_INLINE ulint | rec_offs_n_fields (const ulint *offsets) |
| UNIV_INLINE ulint | rec_offs_data_size (const ulint *offsets) |
| UNIV_INLINE ulint | rec_offs_extra_size (const ulint *offsets) |
| UNIV_INLINE ulint | rec_offs_size (const ulint *offsets) |
| UNIV_INLINE byte * | rec_get_start (rec_t *rec, const ulint *offsets) |
| UNIV_INLINE byte * | rec_get_end (rec_t *rec, const ulint *offsets) |
| UNIV_INLINE rec_t * | rec_copy (void *buf, const rec_t *rec, const ulint *offsets) |
| rec_t * | rec_copy_prefix_to_buf (rec_t *rec, dict_index_t *index, ulint n_fields, byte **buf, ulint *buf_size) |
| UNIV_INLINE ulint | rec_fold (rec_t *rec, const ulint *offsets, ulint n_fields, ulint n_bytes, dulint tree_id) |
| rec_t * | rec_convert_dtuple_to_rec (byte *buf, dict_index_t *index, dtuple_t *dtuple) |
| UNIV_INLINE ulint | rec_get_converted_extra_size (ulint data_size, ulint n_fields) __attribute__((const )) |
| UNIV_INLINE ulint | rec_get_converted_size (dict_index_t *index, dtuple_t *dtuple) |
| void | rec_copy_prefix_to_dtuple (dtuple_t *tuple, rec_t *rec, dict_index_t *index, ulint n_fields, mem_heap_t *heap) |
| ibool | rec_validate (rec_t *rec, const ulint *offsets) |
| void | rec_print_old (FILE *file, rec_t *rec) |
| void | rec_print_new (FILE *file, rec_t *rec, const ulint *offsets) |
| void | rec_print (FILE *file, rec_t *rec, dict_index_t *index) |
| #define REC_1BYTE_OFFS_LIMIT 0x7FUL |
| #define rec_get_offsets | ( | rec, | |||
| index, | |||||
| offsets, | |||||
| n, | |||||
| heap | ) | rec_get_offsets_func(rec,index,offsets,n,heap,__FILE__,__LINE__) |
Definition at line 238 of file rem0rec.h.
Referenced by btr_attach_half_pages(), btr_compress(), btr_cur_del_mark_set_clust_rec(), btr_cur_open_at_index_side(), btr_cur_open_at_rnd_pos(), btr_cur_optimistic_delete(), btr_cur_optimistic_update(), btr_cur_parse_del_mark_set_clust_rec(), btr_cur_parse_update_in_place(), btr_cur_pessimistic_delete(), btr_cur_pessimistic_update(), btr_cur_search_to_nth_level(), btr_cur_upd_lock_and_undo(), btr_cur_update_in_place(), btr_estimate_number_of_different_key_vals(), btr_index_rec_validate(), btr_page_get_father_for_rec(), btr_page_get_sure_split_rec(), btr_page_insert_fits(), btr_page_split_and_insert(), btr_pcur_restore_position(), btr_search_build_page_hash_index(), btr_search_check_guess(), btr_search_drop_page_hash_index(), btr_search_update_hash_on_delete(), btr_search_update_hash_on_insert(), btr_search_update_hash_ref(), btr_search_validate(), btr_validate_level(), lock_clust_rec_read_check_and_lock_alt(), lock_rec_insert_check_and_lock(), lock_rec_print(), lock_rec_validate_page(), lock_sec_rec_modify_check_and_lock(), page_copy_rec_list_end_no_locks(), page_copy_rec_list_end_to_created_page(), page_copy_rec_list_start(), page_create(), page_cur_insert_rec_low(), page_cur_insert_rec_write_log(), page_cur_parse_delete_rec(), page_cur_parse_insert_rec(), page_cur_search_with_match(), page_delete_rec_list_end(), page_delete_rec_list_start(), page_mem_alloc(), page_print_list(), page_validate(), rec_convert_dtuple_to_rec(), rec_copy_prefix_to_dtuple(), rec_print(), row_build(), row_build_row_ref(), row_build_row_ref_in_tuple(), row_ins_duplicate_error_in_clust(), row_ins_index_entry_low(), row_ins_scan_sec_index_for_duplicate(), row_purge_remove_clust_if_poss_low(), row_rec_to_index_entry(), row_scan_and_check_index(), row_search_for_mysql(), row_sel(), row_sel_get_clust_rec(), row_sel_get_clust_rec_for_mysql(), row_sel_sec_rec_is_for_clust_rec(), row_sel_try_search_shortcut(), row_sel_try_search_shortcut_for_mysql(), row_undo_search_clust_to_pcur(), row_upd_build_difference_binary(), row_upd_build_sec_rec_difference_binary(), row_upd_clust_rec(), row_upd_clust_rec_by_insert(), row_upd_clust_step(), row_upd_in_place_in_select(), row_upd_store_row(), row_vers_build_for_consistent_read(), row_vers_build_for_semi_consistent_read(), row_vers_impl_x_locked_off_kernel(), row_vers_old_has_index_entry(), and trx_undo_report_row_operation().
| #define REC_INFO_MIN_REC_FLAG 0x10UL |
Definition at line 26 of file rem0rec.h.
Referenced by btr_set_min_rec_mark(), btr_validate_level(), cmp_dtuple_rec_with_match(), and cmp_rec_rec_with_match().
| #define REC_MAX_DATA_SIZE (16 * 1024) |
Definition at line 584 of file rem0rec.h.
Referenced by btr_cur_optimistic_insert(), btr_cur_pessimistic_insert(), btr_cur_pessimistic_update(), and dtuple_convert_big_rec().
| #define REC_MAX_N_FIELDS (1024 - 1) |
Definition at line 18 of file rem0rec.h.
Referenced by dtuple_check_typed_no_assert(), rec_get_nth_field_old(), rec_validate(), and rec_validate_old().
| #define REC_N_NEW_EXTRA_BYTES 5 |
Definition at line 33 of file rem0rec.h.
Referenced by dict_index_calc_min_rec_len(), page_cur_insert_rec_write_log(), rec_convert_dtuple_to_rec_new(), rec_copy_prefix_to_buf(), rec_get_converted_size_new(), rec_init_offsets(), and rec_set_nth_field_extern_bit_new().
| #define REC_N_OLD_EXTRA_BYTES 6 |
Definition at line 30 of file rem0rec.h.
Referenced by dict_index_calc_min_rec_len(), page_cur_insert_rec_write_log(), rec_copy_prefix_to_buf_old(), rec_init_offsets(), and rec_set_nth_field_extern_bit_old().
| #define REC_OFFS_NORMAL_SIZE 100 |
Definition at line 43 of file rem0rec.h.
Referenced by btr_compress(), btr_cur_del_mark_set_clust_rec(), btr_cur_open_at_index_side(), btr_cur_open_at_rnd_pos(), btr_cur_optimistic_delete(), btr_cur_parse_del_mark_set_clust_rec(), btr_cur_search_to_nth_level(), btr_cur_upd_lock_and_undo(), btr_cur_update_in_place(), btr_estimate_number_of_different_key_vals(), btr_index_rec_validate(), btr_page_get_father_for_rec(), btr_search_build_page_hash_index(), btr_search_check_guess(), btr_search_update_hash_on_delete(), btr_search_update_hash_on_insert(), btr_search_update_hash_ref(), btr_search_validate(), lock_clust_rec_read_check_and_lock_alt(), lock_rec_insert_check_and_lock(), lock_rec_print(), lock_rec_validate_page(), lock_sec_rec_modify_check_and_lock(), page_copy_rec_list_end_no_locks(), page_copy_rec_list_end_to_created_page(), page_copy_rec_list_start(), page_cur_insert_rec_write_log(), page_cur_parse_delete_rec(), page_cur_parse_insert_rec(), page_cur_search_with_match(), page_delete_rec_list_end(), page_delete_rec_list_start(), page_mem_alloc(), page_print_list(), rec_convert_dtuple_to_rec(), rec_copy_prefix_to_dtuple(), rec_print(), row_build(), row_build_row_ref(), row_build_row_ref_in_tuple(), row_ins_check_foreign_constraint(), row_ins_duplicate_error_in_clust(), row_ins_index_entry_low(), row_ins_scan_sec_index_for_duplicate(), row_purge_remove_clust_if_poss_low(), row_rec_to_index_entry(), row_scan_and_check_index(), row_search_for_mysql(), row_sel(), row_sel_get_clust_rec(), row_sel_sec_rec_is_for_clust_rec(), row_sel_try_search_shortcut(), row_undo_search_clust_to_pcur(), row_upd_build_difference_binary(), row_upd_clust_rec(), row_upd_clust_rec_by_insert(), row_upd_clust_step(), row_upd_in_place_in_select(), row_upd_store_row(), and trx_undo_report_row_operation().
| #define REC_OFFS_SMALL_SIZE 10 |
Definition at line 44 of file rem0rec.h.
Referenced by row_sel_sec_rec_is_for_clust_rec(), and row_upd_build_sec_rec_difference_binary().
| #define REC_STATUS_INFIMUM 2 |
Definition at line 38 of file rem0rec.h.
Referenced by page_create(), page_cur_insert_rec_low(), rec_convert_dtuple_to_rec_new(), rec_copy_prefix_to_buf(), rec_get_converted_size_new(), rec_get_offsets_func(), and rec_init_offsets().
| #define REC_STATUS_NODE_PTR 1 |
Definition at line 37 of file rem0rec.h.
Referenced by btr_compress(), dict_tree_build_node_ptr(), rec_convert_dtuple_to_rec_new(), rec_copy_prefix_to_buf(), rec_get_converted_size_new(), rec_get_offsets_func(), and rec_init_offsets().
| #define REC_STATUS_ORDINARY 0 |
Definition at line 36 of file rem0rec.h.
Referenced by rec_convert_dtuple_to_rec_new(), rec_copy_prefix_to_buf(), rec_get_converted_size_new(), rec_get_offsets_func(), rec_init_offsets(), and rec_set_nth_field_extern_bit_new().
| #define REC_STATUS_SUPREMUM 3 |
Definition at line 39 of file rem0rec.h.
Referenced by page_create(), rec_convert_dtuple_to_rec_new(), rec_copy_prefix_to_buf(), rec_get_converted_size_new(), rec_get_offsets_func(), and rec_init_offsets().
| rec_t* rec_convert_dtuple_to_rec | ( | byte * | buf, | |
| dict_index_t * | index, | |||
| dtuple_t * | dtuple | |||
| ) |
Definition at line 989 of file rem0rec.c.
References dict_table_is_comp(), dtuple_check_typed(), index(), mem_heap_free, NULL, rec_convert_dtuple_to_rec_new(), rec_convert_dtuple_to_rec_old(), rec_get_offsets, REC_OFFS_NORMAL_SIZE, rec_validate(), and ut_ad.
Referenced by btr_page_split_and_insert(), page_create(), page_cur_insert_rec_low(), and trx_undo_prev_version_build().
00991 : pointer to the origin 00992 of physical record */ 00993 byte* buf, /* in: start address of the 00994 physical record */ 00995 dict_index_t* index, /* in: record descriptor */ 00996 dtuple_t* dtuple) /* in: data tuple */ 00997 { 00998 rec_t* rec; 00999 01000 ut_ad(buf && index && dtuple); 01001 ut_ad(dtuple_validate(dtuple)); 01002 ut_ad(dtuple_check_typed(dtuple)); 01003 01004 if (dict_table_is_comp(index->table)) { 01005 rec = rec_convert_dtuple_to_rec_new(buf, index, dtuple); 01006 } else { 01007 rec = rec_convert_dtuple_to_rec_old(buf, dtuple); 01008 } 01009 01010 #ifdef UNIV_DEBUG 01011 { 01012 mem_heap_t* heap = NULL; 01013 ulint offsets_[REC_OFFS_NORMAL_SIZE]; 01014 const ulint* offsets; 01015 *offsets_ = (sizeof offsets_) / sizeof *offsets_; 01016 01017 offsets = rec_get_offsets(rec, index, 01018 offsets_, ULINT_UNDEFINED, &heap); 01019 ut_ad(rec_validate(rec, offsets)); 01020 if (UNIV_LIKELY_NULL(heap)) { 01021 mem_heap_free(heap); 01022 } 01023 } 01024 #endif /* UNIV_DEBUG */ 01025 return(rec); 01026 }
Here is the call graph for this function:

Here is the caller graph for this function:

Referenced by page_copy_rec_list_end_to_created_page(), page_cur_insert_rec_low(), row_build(), row_build_row_ref(), row_rec_to_index_entry(), row_vers_build_for_consistent_read(), row_vers_build_for_semi_consistent_read(), trx_purge_get_next_rec(), and trx_undo_prev_version_build().
Here is the caller graph for this function:

| rec_t* rec_copy_prefix_to_buf | ( | rec_t * | rec, | |
| dict_index_t * | index, | |||
| ulint | n_fields, | |||
| byte ** | buf, | |||
| ulint * | buf_size | |||
| ) |
Definition at line 1123 of file rem0rec.c.
References DATA_BLOB, DATA_NOT_NULL, dict_col_get_type(), dict_field_get_col(), dict_index_get_n_fields(), dict_index_get_n_unique_in_tree(), dict_index_get_nth_field(), dict_table_is_comp(), dtype_get_len(), dtype_get_mtype(), dtype_get_prtype(), dict_field_struct::fixed_len, index(), mem_alloc, mem_free, memcpy, NULL, rec_copy_prefix_to_buf_old(), rec_get_status(), REC_N_NEW_EXTRA_BYTES, REC_STATUS_INFIMUM, REC_STATUS_NODE_PTR, REC_STATUS_ORDINARY, REC_STATUS_SUPREMUM, rec_validate_old(), status, ut_ad, and ut_error.
Referenced by dict_tree_copy_rec_order_prefix().
01125 : copied record */ 01126 rec_t* rec, /* in: physical record */ 01127 dict_index_t* index, /* in: record descriptor */ 01128 ulint n_fields, /* in: number of fields to copy */ 01129 byte** buf, /* in/out: memory buffer 01130 for the copied prefix, or NULL */ 01131 ulint* buf_size) /* in/out: buffer size */ 01132 { 01133 byte* nulls; 01134 byte* lens; 01135 dict_field_t* field; 01136 dtype_t* type; 01137 ulint i; 01138 ulint prefix_len; 01139 ulint null_mask; 01140 ulint status; 01141 01142 UNIV_PREFETCH_RW(*buf); 01143 01144 if (!dict_table_is_comp(index->table)) { 01145 ut_ad(rec_validate_old(rec)); 01146 return(rec_copy_prefix_to_buf_old(rec, n_fields, 01147 rec_get_field_start_offs(rec, n_fields), 01148 buf, buf_size)); 01149 } 01150 01151 status = rec_get_status(rec); 01152 01153 switch (status) { 01154 case REC_STATUS_ORDINARY: 01155 ut_ad(n_fields <= dict_index_get_n_fields(index)); 01156 break; 01157 case REC_STATUS_NODE_PTR: 01158 /* it doesn't make sense to copy the child page number field */ 01159 ut_ad(n_fields <= dict_index_get_n_unique_in_tree(index)); 01160 break; 01161 case REC_STATUS_INFIMUM: 01162 case REC_STATUS_SUPREMUM: 01163 /* infimum or supremum record: no sense to copy anything */ 01164 default: 01165 ut_error; 01166 return(NULL); 01167 } 01168 01169 nulls = rec - (REC_N_NEW_EXTRA_BYTES + 1); 01170 lens = nulls - (index->n_nullable + 7) / 8; 01171 UNIV_PREFETCH_R(lens); 01172 prefix_len = 0; 01173 null_mask = 1; 01174 01175 /* read the lengths of fields 0..n */ 01176 for (i = 0; i < n_fields; i++) { 01177 field = dict_index_get_nth_field(index, i); 01178 type = dict_col_get_type(dict_field_get_col(field)); 01179 if (!(dtype_get_prtype(type) & DATA_NOT_NULL)) { 01180 /* nullable field => read the null flag */ 01181 if (UNIV_UNLIKELY(!(byte) null_mask)) { 01182 nulls--; 01183 null_mask = 1; 01184 } 01185 01186 if (*nulls & null_mask) { 01187 null_mask <<= 1; 01188 continue; 01189 } 01190 01191 null_mask <<= 1; 01192 } 01193 01194 if (field->fixed_len) { 01195 prefix_len += field->fixed_len; 01196 } else { 01197 ulint len = *lens--; 01198 if (dtype_get_len(type) > 255 01199 || dtype_get_mtype(type) == DATA_BLOB) { 01200 if (len & 0x80) { 01201 /* 1exxxxxx */ 01202 len &= 0x3f; 01203 len <<= 8; 01204 len |= *lens--; 01205 UNIV_PREFETCH_R(lens); 01206 } 01207 } 01208 prefix_len += len; 01209 } 01210 } 01211 01212 UNIV_PREFETCH_R(rec + prefix_len); 01213 01214 prefix_len += rec - (lens + 1); 01215 01216 if ((*buf == NULL) || (*buf_size < prefix_len)) { 01217 if (*buf != NULL) { 01218 mem_free(*buf); 01219 } 01220 01221 *buf = mem_alloc(prefix_len); 01222 *buf_size = prefix_len; 01223 } 01224 01225 memcpy(*buf, lens + 1, prefix_len); 01226 01227 return(*buf + (rec - (lens + 1))); 01228 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void rec_copy_prefix_to_dtuple | ( | dtuple_t * | tuple, | |
| rec_t * | rec, | |||
| dict_index_t * | index, | |||
| ulint | n_fields, | |||
| mem_heap_t * | heap | |||
| ) |
Definition at line 1033 of file rem0rec.c.
References buf, data, dfield_set_data(), dict_table_is_comp(), dtuple_check_typed(), dtuple_get_nth_field(), dtuple_set_info_bits(), index(), mem_heap_alloc(), NULL, rec_get_info_bits(), rec_get_nth_field(), rec_get_offsets, REC_OFFS_NORMAL_SIZE, rec_validate(), ut_ad, and ut_memcpy().
Referenced by dict_tree_build_data_tuple(), and dict_tree_build_node_ptr().
01035 : data tuple */ 01036 rec_t* rec, /* in: physical record */ 01037 dict_index_t* index, /* in: record descriptor */ 01038 ulint n_fields, /* in: number of fields to copy */ 01039 mem_heap_t* heap) /* in: memory heap */ 01040 { 01041 dfield_t* field; 01042 byte* data; 01043 ulint len; 01044 byte* buf = NULL; 01045 ulint i; 01046 ulint offsets_[REC_OFFS_NORMAL_SIZE]; 01047 ulint* offsets = offsets_; 01048 *offsets_ = (sizeof offsets_) / sizeof *offsets_; 01049 01050 offsets = rec_get_offsets(rec, index, offsets, n_fields, &heap); 01051 01052 ut_ad(rec_validate(rec, offsets)); 01053 ut_ad(dtuple_check_typed(tuple)); 01054 01055 dtuple_set_info_bits(tuple, 01056 rec_get_info_bits(rec, dict_table_is_comp(index->table))); 01057 01058 for (i = 0; i < n_fields; i++) { 01059 01060 field = dtuple_get_nth_field(tuple, i); 01061 data = rec_get_nth_field(rec, offsets, i, &len); 01062 01063 if (len != UNIV_SQL_NULL) { 01064 buf = mem_heap_alloc(heap, len); 01065 01066 ut_memcpy(buf, data, len); 01067 } 01068 01069 dfield_set_data(field, buf, len); 01070 } 01071 }
Here is the call graph for this function:

Here is the caller graph for this function:

| UNIV_INLINE ulint rec_fold | ( | rec_t * | rec, | |
| const ulint * | offsets, | |||
| ulint | n_fields, | |||
| ulint | n_bytes, | |||
| dulint | tree_id | |||
| ) |
Referenced by btr_search_build_page_hash_index(), btr_search_drop_page_hash_index(), btr_search_update_hash_on_delete(), btr_search_update_hash_on_insert(), btr_search_update_hash_ref(), and btr_search_validate().
Here is the caller graph for this function:

| UNIV_INLINE ibool rec_get_1byte_offs_flag | ( | rec_t * | rec | ) |
Referenced by btr_cur_pessimistic_delete(), rec_copy_prefix_to_buf_old(), rec_get_nth_field_old(), rec_init_offsets(), rec_print_old(), rec_set_nth_field_extern_bit_old(), and rec_set_nth_field_null_bit().
Here is the caller graph for this function:

Referenced by ibuf_rec_get_volume(), and rec_convert_dtuple_to_rec_old().
Here is the caller graph for this function:

| UNIV_INLINE ulint rec_get_converted_size | ( | dict_index_t * | index, | |
| dtuple_t * | dtuple | |||
| ) |
Referenced by btr_cur_optimistic_insert(), btr_cur_optimistic_update(), btr_cur_pessimistic_insert(), btr_cur_pessimistic_update(), btr_page_get_sure_split_rec(), btr_page_insert_fits(), btr_page_split_and_insert(), dtuple_convert_big_rec(), ibuf_insert(), ibuf_insert_low(), ibuf_insert_to_index_page(), ibuf_merge_or_delete_for_page(), ibuf_rec_get_volume(), page_cur_insert_rec_low(), and trx_undo_prev_version_build().
Here is the caller graph for this function:

Referenced by lock_move_rec_list_end(), lock_move_rec_list_start(), lock_move_reorganize_page(), and rec_validate_old().
Here is the caller graph for this function:

Referenced by btr_cur_del_mark_set_clust_rec(), btr_cur_optimistic_update(), btr_cur_pessimistic_update(), btr_cur_update_in_place(), dict_check_tablespaces_and_store_max_id(), dict_get_first_table_name_in_db(), dict_load_columns(), dict_load_fields(), dict_load_foreign(), dict_load_foreign_cols(), dict_load_foreigns(), dict_load_indexes(), dict_load_table(), dict_load_table_on_id(), dict_print(), row_ins_clust_index_entry_by_modify(), row_ins_dupl_error_with_rec(), row_ins_foreign_check_on_constraint(), row_ins_sec_index_entry_by_modify(), row_search_for_mysql(), row_sel(), row_sel_get_clust_rec(), row_sel_get_clust_rec_for_mysql(), row_sel_try_search_shortcut(), row_sel_try_search_shortcut_for_mysql(), row_truncate_table_for_mysql(), row_upd_clust_rec(), row_upd_in_place_in_select(), row_upd_sec_index_entry(), row_vers_impl_x_locked_off_kernel(), row_vers_old_has_index_entry(), and trx_undo_page_report_modify().
Here is the caller graph for this function:

Referenced by lock_move_rec_list_end(), lock_move_rec_list_start(), lock_move_reorganize_page(), lock_rec_add_to_queue(), lock_rec_create(), lock_rec_enqueue_waiting(), lock_rec_find_similar_on_page(), lock_rec_get_first(), lock_rec_get_next(), lock_rec_lock_fast(), lock_rec_move(), lock_rec_reset_and_release_wait(), lock_rec_unlock(), page_find_rec_with_heap_no(), page_mem_alloc(), page_rec_print(), and page_rec_validate().
Here is the caller graph for this function:

Referenced by page_cur_insert_rec_write_log(), and page_cur_parse_insert_rec().
Here is the caller graph for this function:

Referenced by btr_set_min_rec_mark(), btr_validate_level(), cmp_dtuple_rec_with_match(), cmp_rec_rec_with_match(), rec_copy_prefix_to_dtuple(), rec_print_new(), rec_print_old(), row_build(), row_rec_to_index_entry(), and trx_undo_page_report_modify().
Here is the caller graph for this function:

| UNIV_INLINE ulint rec_get_n_fields | ( | rec_t * | rec, | |
| dict_index_t * | index | |||
| ) |
Referenced by ibuf_insert_to_index_page(), and row_ins_index_entry_low().
Here is the caller graph for this function:

Referenced by btr_index_rec_validate(), dict_tree_build_data_tuple(), dict_tree_build_node_ptr(), dict_tree_copy_rec_order_prefix(), ibuf_build_entry_from_ibuf_rec(), ibuf_rec_get_page_no(), ibuf_rec_get_space(), ibuf_rec_get_volume(), rec_get_nth_field_old(), rec_get_offsets_func(), rec_print_old(), rec_set_nth_field_extern_bit_old(), rec_validate(), and rec_validate_old().
Here is the caller graph for this function:

Referenced by page_cur_insert_rec_low(), page_delete_rec_list_end(), page_dir_find_owner_slot(), page_dir_slot_check(), page_rec_get_n_recs_before(), page_rec_print(), page_rec_validate(), page_simple_validate(), and page_validate().
Here is the caller graph for this function:

Referenced by page_dir_find_owner_slot(), page_rec_print(), page_simple_validate(), page_validate(), and row_search_for_mysql().
Here is the caller graph for this function:

| UNIV_INLINE ibool rec_get_node_ptr_flag | ( | rec_t * | rec | ) |
Referenced by btr_cur_mark_extern_inherited_fields(), btr_cur_pessimistic_delete(), btr_cur_pessimistic_update(), btr_cur_unmark_extern_fields(), btr_node_ptr_set_child_page_no(), btr_rec_get_externally_stored_len(), page_cur_insert_rec_low(), and page_validate().
Here is the caller graph for this function:

Referenced by btr_cur_set_ownership_of_extern_field(), btr_index_rec_validate(), btr_node_ptr_set_child_page_no(), btr_rec_copy_externally_stored_field(), btr_rec_free_externally_stored_fields(), btr_rec_free_updated_extern_fields(), btr_rec_get_externally_stored_len(), btr_store_big_rec_extern_fields(), cmp_dtuple_rec_with_match(), cmp_rec_rec_with_match(), rec_copy_prefix_to_dtuple(), rec_print_new(), rec_validate(), row_build(), row_build_row_ref(), row_build_row_ref_in_tuple(), row_get_rec_sys_field(), row_rec_to_index_entry(), row_sel_fetch_columns(), row_sel_sec_rec_is_for_clust_rec(), row_sel_store_row_id_to_prebuilt(), row_set_rec_sys_field(), row_upd_build_difference_binary(), row_upd_build_sec_rec_difference_binary(), row_upd_copy_columns(), row_upd_rec_sys_fields_in_recovery(), and trx_undo_page_report_modify().
Here is the caller graph for this function:

Definition at line 372 of file rem0rec.c.
References NULL, rec_get_1byte_offs_flag(), rec_get_n_fields_old(), REC_MAX_N_FIELDS, UNIV_PAGE_SIZE, ut_ad, and ut_error.
Referenced by dict_check_tablespaces_and_store_max_id(), dict_drop_index_tree(), dict_get_first_table_name_in_db(), dict_load_columns(), dict_load_fields(), dict_load_foreign(), dict_load_foreign_cols(), dict_load_foreigns(), dict_load_indexes(), dict_load_table(), dict_load_table_on_id(), dict_print(), dict_truncate_index_tree(), ibuf_build_entry_from_ibuf_rec(), ibuf_rec_get_page_no(), ibuf_rec_get_space(), ibuf_rec_get_volume(), ibuf_update_max_tablespace_id(), page_rec_write_index_page_no(), rec_print_old(), rec_validate_old(), and row_truncate_table_for_mysql().
00374 : pointer to the field */ 00375 rec_t* rec, /* in: record */ 00376 ulint n, /* in: index of the field */ 00377 ulint* len) /* out: length of the field; UNIV_SQL_NULL if SQL 00378 null */ 00379 { 00380 ulint os; 00381 ulint next_os; 00382 00383 ut_ad(rec && len); 00384 ut_ad(n < rec_get_n_fields_old(rec)); 00385 00386 if (n > REC_MAX_N_FIELDS) { 00387 fprintf(stderr, "Error: trying to access field %lu in rec\n", 00388 (ulong) n); 00389 ut_error; 00390 } 00391 00392 if (rec == NULL) { 00393 fputs("Error: rec is NULL pointer\n", stderr); 00394 ut_error; 00395 } 00396 00397 if (rec_get_1byte_offs_flag(rec)) { 00398 os = rec_1_get_field_start_offs(rec, n); 00399 00400 next_os = rec_1_get_field_end_info(rec, n); 00401 00402 if (next_os & REC_1BYTE_SQL_NULL_MASK) { 00403 *len = UNIV_SQL_NULL; 00404 00405 return(rec + os); 00406 } 00407 00408 next_os = next_os & ~REC_1BYTE_SQL_NULL_MASK; 00409 } else { 00410 os = rec_2_get_field_start_offs(rec, n); 00411 00412 next_os = rec_2_get_field_end_info(rec, n); 00413 00414 if (next_os & REC_2BYTE_SQL_NULL_MASK) { 00415 *len = UNIV_SQL_NULL; 00416 00417 return(rec + os); 00418 } 00419 00420 next_os = next_os & ~(REC_2BYTE_SQL_NULL_MASK 00421 | REC_2BYTE_EXTERN_MASK); 00422 } 00423 00424 *len = next_os - os; 00425 00426 ut_ad(*len < UNIV_PAGE_SIZE); 00427 00428 return(rec + os); 00429 }
Here is the call graph for this function:

Here is the caller graph for this function:

Referenced by rec_print_old(), rec_set_nth_field_sql_null(), rec_validate(), and rec_validate_old().
Here is the caller graph for this function:

| ulint* rec_get_offsets_func | ( | rec_t * | rec, | |
| dict_index_t * | index, | |||
| ulint * | offsets, | |||
| ulint | n_fields, | |||
| mem_heap_t ** | heap, | |||
| const char * | file, | |||
| ulint | line | |||
| ) |
Definition at line 303 of file rem0rec.c.
References dict_index_get_n_fields(), dict_index_get_n_unique_in_tree(), dict_table_is_comp(), index(), mem_heap_alloc(), mem_heap_create_func(), MEM_HEAP_DYNAMIC, n, NULL, rec_get_n_fields_old(), rec_get_status(), rec_init_offsets(), REC_STATUS_INFIMUM, REC_STATUS_NODE_PTR, REC_STATUS_ORDINARY, REC_STATUS_SUPREMUM, ut_ad, and ut_error.
00305 : the new offsets */ 00306 rec_t* rec, /* in: physical record */ 00307 dict_index_t* index, /* in: record descriptor */ 00308 ulint* offsets,/* in: array consisting of offsets[0] 00309 allocated elements, or an array from 00310 rec_get_offsets(), or NULL */ 00311 ulint n_fields,/* in: maximum number of initialized fields 00312 (ULINT_UNDEFINED if all fields) */ 00313 mem_heap_t** heap, /* in/out: memory heap */ 00314 const char* file, /* in: file name where called */ 00315 ulint line) /* in: line number where called */ 00316 { 00317 ulint n; 00318 ulint size; 00319 00320 ut_ad(rec); 00321 ut_ad(index); 00322 ut_ad(heap); 00323 00324 if (dict_table_is_comp(index->table)) { 00325 switch (UNIV_EXPECT(rec_get_status(rec), 00326 REC_STATUS_ORDINARY)) { 00327 case REC_STATUS_ORDINARY: 00328 n = dict_index_get_n_fields(index); 00329 break; 00330 case REC_STATUS_NODE_PTR: 00331 n = dict_index_get_n_unique_in_tree(index) + 1; 00332 break; 00333 case REC_STATUS_INFIMUM: 00334 case REC_STATUS_SUPREMUM: 00335 /* infimum or supremum record */ 00336 n = 1; 00337 break; 00338 default: 00339 ut_error; 00340 return(NULL); 00341 } 00342 } else { 00343 n = rec_get_n_fields_old(rec); 00344 } 00345 00346 if (UNIV_UNLIKELY(n_fields < n)) { 00347 n = n_fields; 00348 } 00349 00350 size = n + (1 + REC_OFFS_HEADER_SIZE); 00351 00352 if (UNIV_UNLIKELY(!offsets) || 00353 UNIV_UNLIKELY(rec_offs_get_n_alloc(offsets) < size)) { 00354 if (!*heap) { 00355 *heap = mem_heap_create_func(size * sizeof(ulint), 00356 NULL, MEM_HEAP_DYNAMIC, file, line); 00357 } 00358 offsets = mem_heap_alloc(*heap, size * sizeof(ulint)); 00359 rec_offs_set_n_alloc(offsets, size); 00360 } 00361 00362 rec_offs_set_n_fields(offsets, n); 00363 rec_init_offsets(rec, index, offsets); 00364 return(offsets); 00365 }
Here is the call graph for this function:

Referenced by page_cur_parse_insert_rec(), page_mem_alloc(), and page_validate().
Here is the caller graph for this function:

Referenced by btr_compress(), page_cur_insert_rec_low(), rec_copy_prefix_to_buf(), rec_get_offsets_func(), rec_init_offsets(), and rec_set_nth_field_extern_bit_new().
Here is the caller graph for this function:

| UNIV_INLINE ibool rec_offs_any_extern | ( | const ulint * | offsets | ) |
Referenced by btr_cur_optimistic_delete(), and btr_cur_optimistic_update().
Here is the caller graph for this function:

Referenced by btr_cur_del_mark_set_clust_rec(), btr_cur_mark_extern_inherited_fields(), btr_cur_pessimistic_update(), btr_cur_unmark_extern_fields(), btr_node_ptr_set_child_page_no(), btr_page_insert_fits(), btr_rec_free_externally_stored_fields(), btr_rec_get_externally_stored_len(), cmp_dtuple_rec_with_match(), cmp_rec_rec_with_match(), lock_rec_convert_impl_to_expl(), lock_rec_queue_validate(), page_rec_print(), page_rec_validate(), rec_print_new(), rec_validate(), row_ins_dupl_error_with_rec(), row_rec_to_index_entry(), row_upd_changes_field_size_or_external(), and row_upd_rec_in_place().
Here is the caller graph for this function:

Referenced by page_cur_insert_rec_write_log(), page_cur_parse_insert_rec(), page_delete_rec_list_end(), and row_search_for_mysql().
Here is the caller graph for this function:

| UNIV_INLINE void rec_offs_make_valid | ( | rec_t * | rec, | |
| dict_index_t * | index, | |||
| ulint * | offsets | |||
| ) |
Referenced by page_cur_insert_rec_low(), rec_init_offsets(), row_build(), row_build_row_ref(), row_rec_to_index_entry(), row_vers_build_for_consistent_read(), row_vers_build_for_semi_consistent_read(), and trx_undo_prev_version_build().
Here is the caller graph for this function:

Referenced by btr_cur_mark_extern_inherited_fields(), btr_cur_unmark_extern_fields(), btr_node_ptr_set_child_page_no(), btr_push_update_extern_fields(), btr_rec_free_externally_stored_fields(), btr_rec_get_externally_stored_len(), btr_search_build_page_hash_index(), btr_search_drop_page_hash_index(), cmp_dtuple_is_prefix_of_rec(), cmp_dtuple_rec_with_match(), cmp_rec_rec_with_match(), rec_init_offsets(), rec_print_new(), rec_validate(), row_build(), row_rec_to_index_entry(), row_upd_store_row(), and trx_undo_prev_version_build().
Here is the caller graph for this function:

Referenced by btr_cur_mark_extern_inherited_fields(), btr_cur_unmark_extern_fields(), btr_push_update_extern_fields(), btr_rec_copy_externally_stored_field(), btr_rec_free_externally_stored_fields(), btr_rec_free_updated_extern_fields(), btr_rec_get_externally_stored_len(), cmp_dtuple_rec_with_match(), cmp_rec_rec_with_match(), row_build(), row_sel_fetch_columns(), row_sel_store_mysql_rec(), row_upd_build_difference_binary(), row_upd_changes_field_size_or_external(), and trx_undo_page_report_modify().
Here is the caller graph for this function:

Referenced by btr_cur_optimistic_delete(), btr_cur_optimistic_update(), btr_page_get_sure_split_rec(), btr_page_insert_fits(), page_copy_rec_list_end_to_created_page(), page_cur_insert_rec_low(), page_cur_insert_rec_write_log(), page_cur_parse_insert_rec(), page_delete_rec_list_end(), page_mem_alloc(), page_validate(), row_build(), row_build_row_ref(), row_rec_to_index_entry(), row_search_for_mysql(), row_vers_build_for_consistent_read(), row_vers_build_for_semi_consistent_read(), and trx_undo_prev_version_build().
Here is the caller graph for this function:

| UNIV_INLINE ibool rec_offs_validate | ( | rec_t * | rec, | |
| dict_index_t * | index, | |||
| const ulint * | offsets | |||
| ) |
Referenced by btr_cur_mark_extern_inherited_fields(), btr_node_ptr_get_child(), btr_node_ptr_set_child_page_no(), btr_page_insert_fits(), btr_rec_copy_externally_stored_field(), btr_rec_free_externally_stored_fields(), btr_rec_free_updated_extern_fields(), btr_store_big_rec_extern_fields(), cmp_dtuple_is_prefix_of_rec(), cmp_dtuple_rec(), cmp_dtuple_rec_with_match(), cmp_rec_rec_with_match(), lock_check_trx_id_sanity(), lock_clust_rec_cons_read_sees(), lock_clust_rec_modify_check_and_lock(), lock_clust_rec_read_check_and_lock(), lock_rec_convert_impl_to_expl(), lock_rec_queue_validate(), lock_sec_rec_read_check_and_lock(), lock_sec_rec_some_has_impl_off_kernel(), page_cur_delete_rec(), page_cur_insert_rec_low(), rec_print_new(), row_build(), row_ins_dupl_error_with_rec(), row_ins_set_exclusive_rec_lock(), row_ins_set_shared_rec_lock(), row_search_for_mysql(), row_sel_fetch_columns(), row_sel_push_cache_row_for_mysql(), row_sel_store_mysql_rec(), row_sel_store_row_id_to_prebuilt(), row_set_rec_sys_field(), row_upd_changes_field_size_or_external(), row_upd_rec_in_place(), row_vers_build_for_consistent_read(), row_vers_build_for_semi_consistent_read(), trx_undo_page_report_modify(), and trx_undo_prev_version_build().
Here is the caller graph for this function:

| void rec_print | ( | FILE * | file, | |
| rec_t * | rec, | |||
| dict_index_t * | index | |||
| ) |
Definition at line 1464 of file rem0rec.c.
References dict_table_is_comp(), index(), mem_heap_free, NULL, rec_get_offsets, REC_OFFS_NORMAL_SIZE, rec_print_new(), rec_print_old(), and ut_ad.
Referenced by btr_cur_del_mark_set_sec_rec(), btr_validate_level(), row_ins_foreign_check_on_constraint(), row_ins_foreign_report_add_err(), row_ins_foreign_report_err(), row_sel_get_clust_rec_for_mysql(), row_undo_mod_del_unmark_sec_and_undo_update(), row_upd_sec_index_entry(), and trx_undo_prev_version_build().
01466 : file where to print */ 01467 rec_t* rec, /* in: physical record */ 01468 dict_index_t* index) /* in: record descriptor */ 01469 { 01470 ut_ad(index); 01471 01472 if (!dict_table_is_comp(index->table)) { 01473 rec_print_old(file, rec); 01474 return; 01475 } else { 01476 mem_heap_t* heap = NULL; 01477 ulint offsets_[REC_OFFS_NORMAL_SIZE]; 01478 *offsets_ = (sizeof offsets_) / sizeof *offsets_; 01479 01480 rec_print_new(file, rec, rec_get_offsets(rec, index, offsets_, 01481 ULINT_UNDEFINED, &heap)); 01482 if (UNIV_LIKELY_NULL(heap)) { 01483 mem_heap_free(heap); 01484 } 01485 } 01486 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1410 of file rem0rec.c.
References data, NULL, rec_get_info_bits(), rec_get_nth_field(), rec_offs_comp(), rec_offs_n_fields(), rec_offs_validate(), rec_print_old(), rec_validate(), TRUE, ut_ad, and ut_print_buf().
Referenced by btr_cur_del_mark_set_clust_rec(), btr_cur_optimistic_update(), btr_cur_update_in_place(), btr_index_rec_validate(), btr_search_validate(), btr_validate_level(), lock_check_trx_id_sanity(), lock_rec_print(), page_rec_print(), page_validate(), rec_print(), row_scan_and_check_index(), row_sel_store_row_id_to_prebuilt(), and trx_undo_prev_version_build().
01412 : file where to print */ 01413 rec_t* rec, /* in: physical record */ 01414 const ulint* offsets)/* in: array returned by rec_get_offsets() */ 01415 { 01416 const byte* data; 01417 ulint len; 01418 ulint i; 01419 01420 ut_ad(rec_offs_validate(rec, NULL, offsets)); 01421 01422 if (!rec_offs_comp(offsets)) { 01423 rec_print_old(file, rec); 01424 return; 01425 } 01426 01427 ut_ad(rec); 01428 01429 fprintf(file, "PHYSICAL RECORD: n_fields %lu;" 01430 " compact format; info bits %lu\n", 01431 (ulong) rec_offs_n_fields(offsets), 01432 (ulong) rec_get_info_bits(rec, TRUE)); 01433 01434 for (i = 0; i < rec_offs_n_fields(offsets); i++) { 01435 01436 data = rec_get_nth_field(rec, offsets, i, &len); 01437 01438 fprintf(file, " %lu:", (ulong) i); 01439 01440 if (len != UNIV_SQL_NULL) { 01441 if (len <= 30) { 01442 01443 ut_print_buf(file, data, len); 01444 } else { 01445 ut_print_buf(file, data, 30); 01446 01447 fputs("...(truncated)", file); 01448 } 01449 } else { 01450 fputs(" SQL NULL", file); 01451 } 01452 putc(';', file); 01453 } 01454 01455 putc('\n', file); 01456 01457 rec_validate(rec, offsets); 01458 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void rec_print_old | ( | FILE * | file, | |
| rec_t * | rec | |||
| ) |
Definition at line 1359 of file rem0rec.c.
References data, FALSE, n, rec_get_1byte_offs_flag(), rec_get_info_bits(), rec_get_n_fields_old(), rec_get_nth_field_old(), rec_get_nth_field_size(), rec_validate_old(), ut_ad, and ut_print_buf().
Referenced by btr_index_rec_validate(), ibuf_delete_rec(), ibuf_merge_or_delete_for_page(), page_dir_find_owner_slot(), rec_print(), and rec_print_new().
01361 : file where to print */ 01362 rec_t* rec) /* in: physical record */ 01363 { 01364 const byte* data; 01365 ulint len; 01366 ulint n; 01367 ulint i; 01368 01369 ut_ad(rec); 01370 01371 n = rec_get_n_fields_old(rec); 01372 01373 fprintf(file, "PHYSICAL RECORD: n_fields %lu;" 01374 " %u-byte offsets; info bits %lu\n", 01375 (ulong) n, 01376 rec_get_1byte_offs_flag(rec) ? 1 : 2, 01377 (ulong) rec_get_info_bits(rec, FALSE)); 01378 01379 for (i = 0; i < n; i++) { 01380 01381 data = rec_get_nth_field_old(rec, i, &len); 01382 01383 fprintf(file, " %lu:", (ulong) i); 01384 01385 if (len != UNIV_SQL_NULL) { 01386 if (len <= 30) { 01387 01388 ut_print_buf(file, data, len); 01389 } else { 01390 ut_print_buf(file, data, 30); 01391 01392 fputs("...(truncated)", file); 01393 } 01394 } else { 01395 fprintf(file, " SQL NULL, size %lu ", 01396 rec_get_nth_field_size(rec, i)); 01397 } 01398 putc(';', file); 01399 } 01400 01401 putc('\n', file); 01402 01403 rec_validate_old(rec); 01404 }
Here is the call graph for this function:

Here is the caller graph for this function:

Referenced by btr_cur_del_mark_set_clust_rec(), btr_cur_del_mark_set_sec_rec(), btr_cur_del_unmark_for_ibuf(), btr_cur_parse_del_mark_set_clust_rec(), and btr_cur_parse_del_mark_set_sec_rec().
Here is the caller graph for this function:

| void rec_set_field_extern_bits | ( | rec_t * | rec, | |
| dict_index_t * | index, | |||
| const ulint * | vec, | |||
| ulint | n_fields, | |||
| mtr_t * | mtr | |||
| ) |
Definition at line 664 of file rem0rec.c.
References dict_table_is_comp(), index(), rec_set_nth_field_extern_bit_new(), rec_set_nth_field_extern_bit_old(), and TRUE.
Referenced by btr_cur_pessimistic_update(), row_ins_index_entry_low(), and trx_undo_prev_version_build().
00666 : record */ 00667 dict_index_t* index, /* in: record descriptor */ 00668 const ulint* vec, /* in: array of field numbers */ 00669 ulint n_fields,/* in: number of fields numbers */ 00670 mtr_t* mtr) /* in: mtr holding an X-latch to the 00671 page where rec is, or NULL; 00672 in the NULL case we do not write 00673 to log about the change */ 00674 { 00675 ulint i; 00676 00677 if (dict_table_is_comp(index->table)) { 00678 for (i = 0; i < n_fields; i++) { 00679 rec_set_nth_field_extern_bit_new(rec, index, vec[i], 00680 TRUE, mtr); 00681 } 00682 } else { 00683 for (i = 0; i < n_fields; i++) { 00684 rec_set_nth_field_extern_bit_old(rec, vec[i], 00685 TRUE, mtr); 00686 } 00687 } 00688 }
Here is the call graph for this function:

Here is the caller graph for this function:

Referenced by page_copy_rec_list_end_to_created_page(), page_create(), and page_cur_insert_rec_low().
Here is the caller graph for this function:

Referenced by btr_set_min_rec_mark(), rec_convert_dtuple_to_rec_new(), rec_convert_dtuple_to_rec_old(), and row_upd_rec_in_place().
Here is the caller graph for this function:

Referenced by page_copy_rec_list_end_to_created_page(), page_create(), page_cur_insert_rec_low(), and page_dir_balance_slot().
Here is the caller graph for this function:

Referenced by page_copy_rec_list_end_to_created_page(), and page_create().
Here is the caller graph for this function:

| UNIV_INLINE void rec_set_nth_field_extern_bit | ( | rec_t * | rec, | |
| dict_index_t * | index, | |||
| ulint | i, | |||
| ibool | val, | |||
| mtr_t * | mtr | |||
| ) |
Definition at line 1293 of file rem0rec.c.
References data, FALSE, rec_dummy, rec_get_end(), rec_get_n_fields_old(), rec_get_nth_field(), rec_get_nth_field_size(), REC_MAX_N_FIELDS, rec_offs_comp(), rec_offs_n_fields(), rec_validate_old(), TRUE, UNIV_PAGE_SIZE, and ut_a.
Referenced by page_rec_print(), page_rec_validate(), rec_convert_dtuple_to_rec(), rec_copy_prefix_to_dtuple(), rec_print_new(), and row_search_for_mysql().
01295 : TRUE if ok */ 01296 rec_t* rec, /* in: physical record */ 01297 const ulint* offsets)/* in: array returned by rec_get_offsets() */ 01298 { 01299 const byte* data; 01300 ulint len; 01301 ulint n_fields; 01302 ulint len_sum = 0; 01303 ulint sum = 0; 01304 ulint i; 01305 01306 ut_a(rec); 01307 n_fields = rec_offs_n_fields(offsets); 01308 01309 if ((n_fields == 0) || (n_fields > REC_MAX_N_FIELDS)) { 01310 fprintf(stderr, "InnoDB: Error: record has %lu fields\n", 01311 (ulong) n_fields); 01312 return(FALSE); 01313 } 01314 01315 ut_a(rec_offs_comp(offsets) || n_fields <= rec_get_n_fields_old(rec)); 01316 01317 for (i = 0; i < n_fields; i++) { 01318 data = rec_get_nth_field(rec, offsets, i, &len); 01319 01320 if (!((len < UNIV_PAGE_SIZE) || (len == UNIV_SQL_NULL))) { 01321 fprintf(stderr, 01322 "InnoDB: Error: record field %lu len %lu\n", (ulong) i, 01323 (ulong) len); 01324 return(FALSE); 01325 } 01326 01327 if (len != UNIV_SQL_NULL) { 01328 len_sum += len; 01329 sum += *(data + len -1); /* dereference the 01330 end of the field to 01331 cause a memory trap 01332 if possible */ 01333 } else if (!rec_offs_comp(offsets)) { 01334 len_sum += rec_get_nth_field_size(rec, i); 01335 } 01336 } 01337 01338 if (len_sum != (ulint)(rec_get_end(rec, offsets) - rec)) { 01339 fprintf(stderr, 01340 "InnoDB: Error: record len should be %lu, len %lu\n", 01341 (ulong) len_sum, 01342 (ulong) (rec_get_end(rec, offsets) - rec)); 01343 return(FALSE); 01344 } 01345 01346 rec_dummy = sum; /* This is here only to fool the compiler */ 01347 01348 if (!rec_offs_comp(offsets)) { 01349 ut_a(rec_validate_old(rec)); 01350 } 01351 01352 return(TRUE); 01353 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.4.7

