37 #ifndef UNIV_HOTBACKUP
84 if (log_ptr == NULL) {
108 if (end_ptr < ptr + 1) {
118 if (end_ptr < ptr + 2) {
155 if (end_ptr < ptr + 2) {
163 if (offset >= UNIV_PAGE_SIZE) {
198 if (UNIV_UNLIKELY(val > 0xFFUL)) {
211 if (UNIV_UNLIKELY(val > 0xFFFFUL)) {
269 byte* log_ptr =
mlog_open(mtr, 11 + 2 + 5);
276 ptr, type, log_ptr, mtr);
302 byte* log_ptr =
mlog_open(mtr, 11 + 2 + 9);
320 #ifndef UNIV_HOTBACKUP
334 ut_a(len < UNIV_PAGE_SIZE);
336 memcpy(ptr, str, len);
355 ut_ad(len <= UNIV_PAGE_SIZE);
360 if (log_ptr == NULL) {
396 if (end_ptr < ptr + 4) {
406 if (UNIV_UNLIKELY(offset >= UNIV_PAGE_SIZE)
407 || UNIV_UNLIKELY(len + offset > UNIV_PAGE_SIZE)) {
413 if (end_ptr < ptr + len) {
423 memcpy(page + offset, ptr, len);
429 #ifndef UNIV_HOTBACKUP
447 const byte* log_start;
453 log_start = log_ptr =
mlog_open(mtr, 11 + size);
459 log_end = log_ptr + 11 +
size;
464 ulint total = 11 + size + (n + 2) * 2;
470 log_start = log_ptr =
mlog_open(mtr, alloc);
474 log_end = log_ptr + alloc;
482 for (i = 0; i <
n; i++) {
487 field = dict_index_get_nth_field(index, i);
492 && (col->
len > 255 || col->
mtype == DATA_BLOB)) {
497 if (col->
prtype & DATA_NOT_NULL) {
500 if (log_ptr + 2 > log_end) {
502 ut_a(total > (ulint) (log_ptr - log_start));
503 total -= log_ptr - log_start;
508 log_start = log_ptr =
mlog_open(mtr, alloc);
512 log_end = log_ptr + alloc;
521 }
else if (log_ptr + size > log_end) {
545 ut_ad(comp == FALSE || comp == TRUE);
548 if (end_ptr < ptr + 4) {
556 if (end_ptr < ptr + n * 2) {
565 DICT_HDR_SPACE, 0, n);
567 ind->
n_uniq = (
unsigned int) n_uniq;
569 ut_a(n_uniq + DATA_ROLL_PTR <= n);
573 for (i = 0; i <
n; i++) {
581 ((len + 1) & 0x7fff) <= 1
582 ? DATA_BINARY : DATA_FIXBINARY,
583 len & 0x8000 ? DATA_NOT_NULL : 0,
587 dict_table_get_nth_col(table, i),
596 ut_a(DATA_ROLL_PTR_LEN
599 ind->
fields[DATA_TRX_ID - 1 + n_uniq].
col
600 = &table->
cols[n + DATA_TRX_ID];
601 ind->
fields[DATA_ROLL_PTR - 1 + n_uniq].
col
602 = &table->
cols[n + DATA_ROLL_PTR];