Commit b965f460 authored by marko's avatar marko

branches/zip: Merge table->zip to table->flags. Add dict_table_is_zip().

parent fa97bf6e
......@@ -3525,7 +3525,7 @@ btr_store_big_rec_extern_fields(
space_id = buf_frame_get_space_id(rec);
page_zip = buf_block_get_page_zip(buf_block_align(rec));
ut_ad(!page_zip == !index->table->zip);
ut_ad(!page_zip == !dict_table_is_zip(index->table));
if (UNIV_LIKELY_NULL(page_zip)) {
int err;
......@@ -3861,7 +3861,7 @@ btr_free_externally_stored_field(
#ifdef UNIV_SYNC_DEBUG
buf_page_dbg_add_level(page, SYNC_EXTERN_STORAGE);
#endif /* UNIV_SYNC_DEBUG */
if (UNIV_UNLIKELY(index->table->zip)) {
if (dict_table_is_zip(index->table)) {
next_page_no = mach_read_from_4(page);
btr_page_free_low(index->tree, page,
......
......@@ -57,7 +57,6 @@ dict_mem_table_create(
table->space = space;
table->ibd_file_missing = FALSE;
table->tablespace_discarded = FALSE;
table->zip = 0;
table->n_def = 0;
table->n_cols = n_cols + DATA_N_SYS_COLS;
table->mem_fix = 0;
......
......@@ -2772,7 +2772,7 @@ ibuf_insert(
ut_ad(dtuple_check_typed(entry));
ut_a(!(index->type & DICT_CLUSTERED));
ut_a(!index->table->zip);
ut_a(!dict_table_is_zip(index->table));
if (rec_get_converted_size(index, entry)
>= page_get_free_space_of_empty(
......
......@@ -496,6 +496,15 @@ dict_table_is_comp(
compact page format */
const dict_table_t* table); /* in: table */
/************************************************************************
Check whether the table uses the compressed compact page format. */
UNIV_INLINE
ibool
dict_table_is_zip(
/*==============*/
/* out: TRUE if table uses the
compressed compact page format */
const dict_table_t* table); /* in: table */
/************************************************************************
Checks if a column is in the ordering columns of the clustered index of a
table. Column prefixes are treated like whole columns. */
......
......@@ -208,6 +208,21 @@ dict_table_is_comp(
return(UNIV_LIKELY(table->flags & DICT_TF_COMPACT));
}
/************************************************************************
Check whether the table uses the compressed compact page format. */
UNIV_INLINE
ibool
dict_table_is_zip(
/*==============*/
/* out: TRUE if table uses the
compressed compact page format */
const dict_table_t* table) /* in: table */
{
ut_ad(table);
return(!!UNIV_UNLIKELY(table->flags & DICT_TF_COMPRESSED));
}
/************************************************************************
Gets the number of fields in the internal representation of an index,
including fields added by the dictionary system. */
......
......@@ -41,6 +41,7 @@ combination of types */
/* Table flags */
#define DICT_TF_COMPACT 1 /* compact page format */
#define DICT_TF_COMPRESSED 2 /* compressed compact format */
/**************************************************************************
Creates a table memory object. */
......@@ -321,7 +322,6 @@ struct dict_table_struct{
ibool tablespace_discarded;/* this flag is set TRUE when the
user calls DISCARD TABLESPACE on this table,
and reset to FALSE in IMPORT TABLESPACE */
ibool zip; /* flag: TRUE=compressed page format */
hash_node_t name_hash; /* hash chain node */
hash_node_t id_hash; /* hash chain node */
ulint n_def; /* number of columns defined so far */
......
......@@ -88,7 +88,7 @@ ibuf_should_try(
decide */
{
if (!(index->type & DICT_CLUSTERED)
&& !index->table->zip
&& !dict_table_is_zip(index->table)
&& (ignore_sec_unique || !(index->type & DICT_UNIQUE))
&& ibuf->meter > IBUF_THRESHOLD) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment