diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-07-18 23:04:24 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-18 23:04:24 +0200 |
commit | 4e46d8e5bff140f2549841167dc4b65a3c0a645d (patch) | |
tree | c6612dcc1d0fbd801c084e6c36307d9e5913a293 /storage/xtradb/data | |
parent | 9a02c69f5c6766eaf552284a2a4dd0f1d26ecd2c (diff) | |
parent | d4d7a8fa62c406be73f6c0f6d75e795293db548b (diff) | |
download | mariadb-git-4e46d8e5bff140f2549841167dc4b65a3c0a645d.tar.gz |
merge with xtradb-5.5.15
fix test cases
Diffstat (limited to 'storage/xtradb/data')
-rw-r--r-- | storage/xtradb/data/data0data.c | 36 | ||||
-rw-r--r-- | storage/xtradb/data/data0type.c | 11 |
2 files changed, 21 insertions, 26 deletions
diff --git a/storage/xtradb/data/data0data.c b/storage/xtradb/data/data0data.c index 0715b49bf9c..6d07fc249fa 100644 --- a/storage/xtradb/data/data0data.c +++ b/storage/xtradb/data/data0data.c @@ -367,7 +367,7 @@ dfield_print_also_hex( prtype = dtype_get_prtype(dfield_get_type(dfield)); switch (dtype_get_mtype(dfield_get_type(dfield))) { - dulint id; + ib_id_t id; case DATA_INT: switch (len) { ulint val; @@ -417,22 +417,16 @@ dfield_print_also_hex( case 6: id = mach_read_from_6(data); - fprintf(stderr, "{%lu %lu}", - ut_dulint_get_high(id), - ut_dulint_get_low(id)); + fprintf(stderr, "%llu", (ullint) id); break; case 7: id = mach_read_from_7(data); - fprintf(stderr, "{%lu %lu}", - ut_dulint_get_high(id), - ut_dulint_get_low(id)); + fprintf(stderr, "%llu", (ullint) id); break; case 8: id = mach_read_from_8(data); - fprintf(stderr, "{%lu %lu}", - ut_dulint_get_high(id), - ut_dulint_get_low(id)); + fprintf(stderr, "%llu", (ullint) id); break; default: goto print_hex; @@ -444,29 +438,25 @@ dfield_print_also_hex( case DATA_TRX_ID: id = mach_read_from_6(data); - fprintf(stderr, "trx_id " TRX_ID_FMT, - TRX_ID_PREP_PRINTF(id)); + fprintf(stderr, "trx_id " TRX_ID_FMT, (ullint) id); break; case DATA_ROLL_PTR: id = mach_read_from_7(data); - fprintf(stderr, "roll_ptr {%lu %lu}", - ut_dulint_get_high(id), ut_dulint_get_low(id)); + fprintf(stderr, "roll_ptr " TRX_ID_FMT, (ullint) id); break; case DATA_ROW_ID: id = mach_read_from_6(data); - fprintf(stderr, "row_id {%lu %lu}", - ut_dulint_get_high(id), ut_dulint_get_low(id)); + fprintf(stderr, "row_id " TRX_ID_FMT, (ullint) id); break; default: - id = mach_dulint_read_compressed(data); + id = mach_ull_read_compressed(data); - fprintf(stderr, "mix_id {%lu %lu}", - ut_dulint_get_high(id), ut_dulint_get_low(id)); + fprintf(stderr, "mix_id " TRX_ID_FMT, (ullint) id); } break; @@ -595,7 +585,8 @@ dtuple_convert_big_rec( if (dict_table_get_format(index->table) < DICT_TF_FORMAT_ZIP) { /* up to MySQL 5.1: store a 768-byte prefix locally */ - local_len = BTR_EXTERN_FIELD_REF_SIZE + DICT_MAX_INDEX_COL_LEN; + local_len = BTR_EXTERN_FIELD_REF_SIZE + + DICT_ANTELOPE_MAX_INDEX_COL_LEN; } else { /* new-format table: do not store any BLOB prefix locally */ local_len = BTR_EXTERN_FIELD_REF_SIZE; @@ -767,7 +758,10 @@ dtuple_convert_back_big_rec( local_len -= BTR_EXTERN_FIELD_REF_SIZE; - ut_ad(local_len <= DICT_MAX_INDEX_COL_LEN); + /* Only in REDUNDANT and COMPACT format, we store + up to DICT_ANTELOPE_MAX_INDEX_COL_LEN (768) bytes + locally */ + ut_ad(local_len <= DICT_ANTELOPE_MAX_INDEX_COL_LEN); dfield_set_data(dfield, (char*) b->data - local_len, diff --git a/storage/xtradb/data/data0type.c b/storage/xtradb/data/data0type.c index e834fd2ec55..20d1f5db8d3 100644 --- a/storage/xtradb/data/data0type.c +++ b/storage/xtradb/data/data0type.c @@ -49,10 +49,8 @@ ulint dtype_get_at_most_n_mbchars( /*========================*/ ulint prtype, /*!< in: precise type */ - ulint mbminlen, /*!< in: minimum length of a - multi-byte character */ - ulint mbmaxlen, /*!< in: maximum length of a - multi-byte character */ + ulint mbminmaxlen, /*!< in: minimum and maximum length of + a multi-byte character */ ulint prefix_len, /*!< in: length of the requested prefix, in characters, multiplied by dtype_get_mbmaxlen(dtype) */ @@ -60,6 +58,9 @@ dtype_get_at_most_n_mbchars( const char* str) /*!< in: the string whose prefix length is being determined */ { + ulint mbminlen = DATA_MBMINLEN(mbminmaxlen); + ulint mbmaxlen = DATA_MBMAXLEN(mbminmaxlen); + ut_a(data_len != UNIV_SQL_NULL); ut_ad(!mbmaxlen || !(prefix_len % mbmaxlen)); @@ -180,7 +181,7 @@ dtype_validate( } #ifndef UNIV_HOTBACKUP - ut_a(type->mbminlen <= type->mbmaxlen); + ut_a(dtype_get_mbminlen(type) <= dtype_get_mbmaxlen(type)); #endif /* !UNIV_HOTBACKUP */ return(TRUE); |