#include "mach0data.h"Include dependency graph for mach0data.c:

Go to the source code of this file.
Functions | |
| byte * | mach_parse_compressed (byte *ptr, byte *end_ptr, ulint *val) |
| byte * | mach_dulint_parse_compressed (byte *ptr, byte *end_ptr, dulint *val) |
Definition at line 84 of file mach0data.c.
References mach_get_compressed_size(), mach_read_compressed(), mach_read_from_4(), NULL, ut_ad, and ut_dulint_create().
Referenced by mlog_parse_nbytes(), row_upd_parse_sys_vals(), and trx_undo_parse_page_header().
00086 : pointer to end of the stored field, NULL if 00087 not complete */ 00088 byte* ptr, /* in: pointer to buffer from where to read */ 00089 byte* end_ptr,/* in: pointer to end of the buffer */ 00090 dulint* val) /* out: read value */ 00091 { 00092 ulint high; 00093 ulint low; 00094 ulint size; 00095 00096 ut_ad(ptr && end_ptr && val); 00097 00098 if (end_ptr < ptr + 5) { 00099 00100 return(NULL); 00101 } 00102 00103 high = mach_read_compressed(ptr); 00104 00105 size = mach_get_compressed_size(high); 00106 00107 ptr += size; 00108 00109 if (end_ptr < ptr + 4) { 00110 00111 return(NULL); 00112 } 00113 00114 low = mach_read_from_4(ptr); 00115 00116 *val = ut_dulint_create(high, low); 00117 00118 return(ptr + 4); 00119 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 20 of file mach0data.c.
References flag, mach_read_from_1(), mach_read_from_2(), mach_read_from_3(), mach_read_from_4(), NULL, and ut_ad.
Referenced by mlog_parse_initial_log_record(), mlog_parse_nbytes(), page_cur_parse_insert_rec(), row_upd_index_parse(), row_upd_parse_sys_vals(), and trx_undo_parse_page_init().
00022 : pointer to end of the stored field, NULL if 00023 not complete */ 00024 byte* ptr, /* in: pointer to buffer from where to read */ 00025 byte* end_ptr,/* in: pointer to end of the buffer */ 00026 ulint* val) /* out: read value (< 2^32) */ 00027 { 00028 ulint flag; 00029 00030 ut_ad(ptr && end_ptr && val); 00031 00032 if (ptr >= end_ptr) { 00033 00034 return(NULL); 00035 } 00036 00037 flag = mach_read_from_1(ptr); 00038 00039 if (flag < 0x80UL) { 00040 *val = flag; 00041 return(ptr + 1); 00042 00043 } else if (flag < 0xC0UL) { 00044 if (end_ptr < ptr + 2) { 00045 return(NULL); 00046 } 00047 00048 *val = mach_read_from_2(ptr) & 0x7FFFUL; 00049 00050 return(ptr + 2); 00051 00052 } else if (flag < 0xE0UL) { 00053 if (end_ptr < ptr + 3) { 00054 return(NULL); 00055 } 00056 00057 *val = mach_read_from_3(ptr) & 0x3FFFFFUL; 00058 00059 return(ptr + 3); 00060 } else if (flag < 0xF0UL) { 00061 if (end_ptr < ptr + 4) { 00062 return(NULL); 00063 } 00064 00065 *val = mach_read_from_4(ptr) & 0x1FFFFFFFUL; 00066 00067 return(ptr + 4); 00068 } else { 00069 ut_ad(flag == 0xF0UL); 00070 00071 if (end_ptr < ptr + 5) { 00072 return(NULL); 00073 } 00074 00075 *val = mach_read_from_4(ptr + 1); 00076 return(ptr + 5); 00077 } 00078 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.4.7

