mariadb/storage/innobase/include/btr0cur.h
unknown bf2f50d345 Applied innodb-5.1 snapshots ss799 and ss854
Bugs fixed:
- Bug #20877: InnoDB data dictionary memory footprint is too big
- Bug #13544: Second delete of same row in transaction illustrates non-optimal locking
- Bug #20791: valgrind errors in InnoDB


storage/innobase/btr/btr0btr.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r823:
  Minor cleanup related to Bug #20877.
  
  btr_print_recursive(): Replace tree->tree_indexes with tree->index.
  This should have been done in r453.
  
  univ.i: Add UNIV_BTR_PRINT.
  
  rw_lock_t: Reduce writer_is_wait_ex to a bit and move it close to
  other bitfields.  Change the types to unsigned, in case ulint or ibool
  bitfields will not work.
  
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/btr/btr0cur.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r830:
  page_align(ptr): New utility function to replace
  ut_align_down(ptr, UNIV_PAGE_SIZE) calls.
  
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/btr/btr0pcur.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r830:
  page_align(ptr): New utility function to replace
  ut_align_down(ptr, UNIV_PAGE_SIZE) calls.
  
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/btr/btr0sea.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r824:
  Reduce the size of btr_search_t from 13 machine words to 7.  This
  structure is reserved for every index in the data dictionary cache.
  (Bug #20877)
  
  We could shrink the structure further to three 32-bit words or two
  64-bit words by turning the remaining fields to bit-fields.
  Unfortunately, the fields are not protected by any mutex, and thus we
  would better keep each field aligned to a machine word.
  
  btr_search_t, buf_block_t: Rename "ulint side" to "ibool left_side".
  Remove BTR_SEARCH_LEFT_SIDE and BTR_SEARCH_RIGHT_SIDE, and also rename
  some local variables and function parameters from "ulint side" to
  "ibool left_side".
  
  btr_search_t: Remove the unused fields last_search, n_direction, direction,
  and modify_clock.  Remove the unused constants BTR_SEA_NO_DIRECTION,
  BTR_SEA_LEFT, BTR_SEA_RIGHT, and BTR_SEA_SAME_REC.
  
  btr_search_t: Remove magic_n unless #defined UNIV_DEBUG.  Turn an assertion
  about the magic number into a debug assertion.
  
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/buf/buf0buf.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r824:
  Reduce the size of btr_search_t from 13 machine words to 7.  This
  structure is reserved for every index in the data dictionary cache.
  (Bug #20877)
  
  We could shrink the structure further to three 32-bit words or two
  64-bit words by turning the remaining fields to bit-fields.
  Unfortunately, the fields are not protected by any mutex, and thus we
  would better keep each field aligned to a machine word.
  
  btr_search_t, buf_block_t: Rename "ulint side" to "ibool left_side".
  Remove BTR_SEARCH_LEFT_SIDE and BTR_SEARCH_RIGHT_SIDE, and also rename
  some local variables and function parameters from "ulint side" to
  "ibool left_side".
  
  btr_search_t: Remove the unused fields last_search, n_direction, direction,
  and modify_clock.  Remove the unused constants BTR_SEA_NO_DIRECTION,
  BTR_SEA_LEFT, BTR_SEA_RIGHT, and BTR_SEA_SAME_REC.
  
  btr_search_t: Remove magic_n unless #defined UNIV_DEBUG.  Turn an assertion
  about the magic number into a debug assertion.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/buf/buf0flu.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/buf/buf0lru.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/buf/buf0rea.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/data/data0data.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/data/data0type.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
storage/innobase/dict/dict0boot.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r827:
  Make dict_index_find_cols() always succeed.
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/dict/dict0crea.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r827:
  Make dict_index_find_cols() always succeed.
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r833:
  Tweak the bit-field definitions introduced since r813 to address Bug #20877.
  
  rw_lock_t: Do not make writer_is_wait_ex a bit-field.  There are no fields
  yet that could be fused to the same machine word, but we play it safe,
  because the field writer_is_wait_ex may be modified by several threads
  simultaneously.  Such fields should always be allocated an own machine
  word.
  
  dict_table_t: Change the type of all bit-fields to "unsigned".  Make
  "space" a bit-field of 32 bits.  Move name_hash and id_hash after all
  bit-fields, so that the bit-fields can be allocated together.  Do not
  make autoinc_inited a bit-field, as we cannot allocate any field
  from the same machine word.
  
  dict_build_table_def_step(): Pass a local variable to
  fil_create_new_single_table_tablespace() and initialize table->space
  from it after the call, now that table->space is a bit-field.
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/dict/dict0dict.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r818:
  Remove dict_col_t::hash, dict_col_t::table,
  dict_sys->col_hash, and DICT_POOL_PER_COL_HASH.  (Bug #20877)
  
  The col->table pointer was only needed for maintaining a hash table of
  all defined columns in all tables.  The hash table was only looked up
  in dict_index_find_cols().  Removing the col->hash and col->table
  pointers reduces the size of a table column by two machine words
  (usually 8 or 16 bytes).
  
  dict_col_add_to_cache(), dict_col_reposition_in_cache(),
  dict_col_remove_from_cache(): Remove.  These only updated dict_sys->col_hash.
  
  dict_index_find_cols(): Use a linear search instead of the hash table.
  The time complexity is affected, but this function is only invoked by
  dict_index_add_to_cache(), and we only search the columns of a single
  table (typically at most a few dozen) as opposed to all columns of all
  tables.
  
  
  Revision r819:
  dict_col_t: Reduce ord_part to one bit.
  
  dict_index_add_to_cache(): Instead of incrementing ord_part, set it.
  
  dict_index_remove_from_cache(): Do not touch ord_part.
  
  dtype_t: Reduce mbminlen from 3 to 2 bits.
  
  row_upd(): Add a UNIV_LIKELY hint around node->in_mysql_interface.
  
  
  Revision r820:
  Remove dict_col_t::clust_pos.
  
  dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
  look-up with a linear search of all columns in the clustered index.
  
  row_upd_index_replace_new_col_vals(): Compute clust_index outside
  the loops.  Compute clust_pos outside the inner loop.
  
  row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
  Compute clust_index outside the loops.  Declare the auxiliary variables
  inside the loop scope.
  
  
  Revision r821:
  dict_table_t: Rename the integer field max_row_size
  to the Boolean field big_rows.  (Bug #20877)
  
  BIG_ROW_SIZE: Move the definition from row0sel.c to dict_table_add_to_cache().
  
  
  Revision r826:
  The code base was reindented in r763 and automatic .emacs indentation
  settings introduced. Some problems were found, so from this commit on one
  additional indentation rule is introduced:
  
   (add-to-list 'c-offsets-alist '(arglist-intro . +))
  
  Note that fixing some of the unfortunate line-splits done in r764 will be
  done in a future change.
  
  Revision r827:
  Make dict_index_find_cols() always succeed.
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r831:
  Add dict_col_get_clust_pos_noninline(), which was forgotten from r820.
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r836:
  Remove dict_col_t::name, replace it with a packed array of column names in
  dict_table_t. This saves 8-15+ bytes of memory per column on 64-bit
  machines.
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
  
  Revision r845:
  Split long lines with [] operators better.
storage/innobase/dict/dict0load.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/dict/dict0mem.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r818:
  Remove dict_col_t::hash, dict_col_t::table,
  dict_sys->col_hash, and DICT_POOL_PER_COL_HASH.  (Bug #20877)
  
  The col->table pointer was only needed for maintaining a hash table of
  all defined columns in all tables.  The hash table was only looked up
  in dict_index_find_cols().  Removing the col->hash and col->table
  pointers reduces the size of a table column by two machine words
  (usually 8 or 16 bytes).
  
  dict_col_add_to_cache(), dict_col_reposition_in_cache(),
  dict_col_remove_from_cache(): Remove.  These only updated dict_sys->col_hash.
  
  dict_index_find_cols(): Use a linear search instead of the hash table.
  The time complexity is affected, but this function is only invoked by
  dict_index_add_to_cache(), and we only search the columns of a single
  table (typically at most a few dozen) as opposed to all columns of all
  tables.
  
  
  Revision r820:
  Remove dict_col_t::clust_pos.
  
  dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
  look-up with a linear search of all columns in the clustered index.
  
  row_upd_index_replace_new_col_vals(): Compute clust_index outside
  the loops.  Compute clust_pos outside the inner loop.
  
  row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
  Compute clust_index outside the loops.  Declare the auxiliary variables
  inside the loop scope.
  
  
  Revision r821:
  dict_table_t: Rename the integer field max_row_size
  to the Boolean field big_rows.  (Bug #20877)
  
  BIG_ROW_SIZE: Move the definition from row0sel.c to dict_table_add_to_cache().
  
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r836:
  Remove dict_col_t::name, replace it with a packed array of column names in
  dict_table_t. This saves 8-15+ bytes of memory per column on 64-bit
  machines.
storage/innobase/eval/eval0eval.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r826:
  The code base was reindented in r763 and automatic .emacs indentation
  settings introduced. Some problems were found, so from this commit on one
  additional indentation rule is introduced:
  
   (add-to-list 'c-offsets-alist '(arglist-intro . +))
  
  Note that fixing some of the unfortunate line-splits done in r764 will be
  done in a future change.
storage/innobase/eval/eval0proc.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/fil/fil0fil.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/fsp/fsp0fsp.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
  
  Revision r845:
  Split long lines with [] operators better.
storage/innobase/handler/ha_innodb.cc:
  Applied innodb-5.1 snapshots ss799 and ss854
storage/innobase/handler/ha_innodb.h:
  Applied innodb-5.1 snapshots ss799 and ss854
storage/innobase/ibuf/ibuf0ibuf.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/include/btr0btr.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
storage/innobase/include/btr0btr.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
storage/innobase/include/btr0cur.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
storage/innobase/include/btr0cur.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
storage/innobase/include/btr0pcur.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r817:
  btr0pcur.h: Change FIXME to TODO.
storage/innobase/include/btr0sea.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r824:
  Reduce the size of btr_search_t from 13 machine words to 7.  This
  structure is reserved for every index in the data dictionary cache.
  (Bug #20877)
  
  We could shrink the structure further to three 32-bit words or two
  64-bit words by turning the remaining fields to bit-fields.
  Unfortunately, the fields are not protected by any mutex, and thus we
  would better keep each field aligned to a machine word.
  
  btr_search_t, buf_block_t: Rename "ulint side" to "ibool left_side".
  Remove BTR_SEARCH_LEFT_SIDE and BTR_SEARCH_RIGHT_SIDE, and also rename
  some local variables and function parameters from "ulint side" to
  "ibool left_side".
  
  btr_search_t: Remove the unused fields last_search, n_direction, direction,
  and modify_clock.  Remove the unused constants BTR_SEA_NO_DIRECTION,
  BTR_SEA_LEFT, BTR_SEA_RIGHT, and BTR_SEA_SAME_REC.
  
  btr_search_t: Remove magic_n unless #defined UNIV_DEBUG.  Turn an assertion
  about the magic number into a debug assertion.
storage/innobase/include/buf0buf.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r824:
  Reduce the size of btr_search_t from 13 machine words to 7.  This
  structure is reserved for every index in the data dictionary cache.
  (Bug #20877)
  
  We could shrink the structure further to three 32-bit words or two
  64-bit words by turning the remaining fields to bit-fields.
  Unfortunately, the fields are not protected by any mutex, and thus we
  would better keep each field aligned to a machine word.
  
  btr_search_t, buf_block_t: Rename "ulint side" to "ibool left_side".
  Remove BTR_SEARCH_LEFT_SIDE and BTR_SEARCH_RIGHT_SIDE, and also rename
  some local variables and function parameters from "ulint side" to
  "ibool left_side".
  
  btr_search_t: Remove the unused fields last_search, n_direction, direction,
  and modify_clock.  Remove the unused constants BTR_SEA_NO_DIRECTION,
  BTR_SEA_LEFT, BTR_SEA_RIGHT, and BTR_SEA_SAME_REC.
  
  btr_search_t: Remove magic_n unless #defined UNIV_DEBUG.  Turn an assertion
  about the magic number into a debug assertion.
storage/innobase/include/data0data.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
storage/innobase/include/data0type.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r819:
  dict_col_t: Reduce ord_part to one bit.
  
  dict_index_add_to_cache(): Instead of incrementing ord_part, set it.
  
  dict_index_remove_from_cache(): Do not touch ord_part.
  
  dtype_t: Reduce mbminlen from 3 to 2 bits.
  
  row_upd(): Add a UNIV_LIKELY hint around node->in_mysql_interface.
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
storage/innobase/include/data0type.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/include/dict0boot.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r816:
  Remove more remnants of mixed indexes.
storage/innobase/include/dict0dict.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r816:
  Remove more remnants of mixed indexes.
  
  Revision r818:
  Remove dict_col_t::hash, dict_col_t::table,
  dict_sys->col_hash, and DICT_POOL_PER_COL_HASH.  (Bug #20877)
  
  The col->table pointer was only needed for maintaining a hash table of
  all defined columns in all tables.  The hash table was only looked up
  in dict_index_find_cols().  Removing the col->hash and col->table
  pointers reduces the size of a table column by two machine words
  (usually 8 or 16 bytes).
  
  dict_col_add_to_cache(), dict_col_reposition_in_cache(),
  dict_col_remove_from_cache(): Remove.  These only updated dict_sys->col_hash.
  
  dict_index_find_cols(): Use a linear search instead of the hash table.
  The time complexity is affected, but this function is only invoked by
  dict_index_add_to_cache(), and we only search the columns of a single
  table (typically at most a few dozen) as opposed to all columns of all
  tables.
  
  
  Revision r820:
  Remove dict_col_t::clust_pos.
  
  dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
  look-up with a linear search of all columns in the clustered index.
  
  row_upd_index_replace_new_col_vals(): Compute clust_index outside
  the loops.  Compute clust_pos outside the inner loop.
  
  row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
  Compute clust_index outside the loops.  Declare the auxiliary variables
  inside the loop scope.
  
  
  Revision r827:
  Make dict_index_find_cols() always succeed.
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r831:
  Add dict_col_get_clust_pos_noninline(), which was forgotten from r820.
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r836:
  Remove dict_col_t::name, replace it with a packed array of column names in
  dict_table_t. This saves 8-15+ bytes of memory per column on 64-bit
  machines.
storage/innobase/include/dict0dict.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r820:
  Remove dict_col_t::clust_pos.
  
  dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
  look-up with a linear search of all columns in the clustered index.
  
  row_upd_index_replace_new_col_vals(): Compute clust_index outside
  the loops.  Compute clust_pos outside the inner loop.
  
  row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
  Compute clust_index outside the loops.  Declare the auxiliary variables
  inside the loop scope.
  
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
storage/innobase/include/dict0mem.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r815:
  dict_index_t: Remove tree_indexes.  It should have been removed in r453
  when the list in dict_tree_t was replaced with the pointer tree_index.
  
  
  Revision r818:
  Remove dict_col_t::hash, dict_col_t::table,
  dict_sys->col_hash, and DICT_POOL_PER_COL_HASH.  (Bug #20877)
  
  The col->table pointer was only needed for maintaining a hash table of
  all defined columns in all tables.  The hash table was only looked up
  in dict_index_find_cols().  Removing the col->hash and col->table
  pointers reduces the size of a table column by two machine words
  (usually 8 or 16 bytes).
  
  dict_col_add_to_cache(), dict_col_reposition_in_cache(),
  dict_col_remove_from_cache(): Remove.  These only updated dict_sys->col_hash.
  
  dict_index_find_cols(): Use a linear search instead of the hash table.
  The time complexity is affected, but this function is only invoked by
  dict_index_add_to_cache(), and we only search the columns of a single
  table (typically at most a few dozen) as opposed to all columns of all
  tables.
  
  
  Revision r819:
  dict_col_t: Reduce ord_part to one bit.
  
  dict_index_add_to_cache(): Instead of incrementing ord_part, set it.
  
  dict_index_remove_from_cache(): Do not touch ord_part.
  
  dtype_t: Reduce mbminlen from 3 to 2 bits.
  
  row_upd(): Add a UNIV_LIKELY hint around node->in_mysql_interface.
  
  
  Revision r820:
  Remove dict_col_t::clust_pos.
  
  dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
  look-up with a linear search of all columns in the clustered index.
  
  row_upd_index_replace_new_col_vals(): Compute clust_index outside
  the loops.  Compute clust_pos outside the inner loop.
  
  row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
  Compute clust_index outside the loops.  Declare the auxiliary variables
  inside the loop scope.
  
  
  Revision r821:
  dict_table_t: Rename the integer field max_row_size
  to the Boolean field big_rows.  (Bug #20877)
  
  BIG_ROW_SIZE: Move the definition from row0sel.c to dict_table_add_to_cache().
  
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r833:
  Tweak the bit-field definitions introduced since r813 to address Bug #20877.
  
  rw_lock_t: Do not make writer_is_wait_ex a bit-field.  There are no fields
  yet that could be fused to the same machine word, but we play it safe,
  because the field writer_is_wait_ex may be modified by several threads
  simultaneously.  Such fields should always be allocated an own machine
  word.
  
  dict_table_t: Change the type of all bit-fields to "unsigned".  Make
  "space" a bit-field of 32 bits.  Move name_hash and id_hash after all
  bit-fields, so that the bit-fields can be allocated together.  Do not
  make autoinc_inited a bit-field, as we cannot allocate any field
  from the same machine word.
  
  dict_build_table_def_step(): Pass a local variable to
  fil_create_new_single_table_tablespace() and initialize table->space
  from it after the call, now that table->space is a bit-field.
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r835:
  Change the recently introduced ulint bit-fields to unsigned.
  
  
  Revision r836:
  Remove dict_col_t::name, replace it with a packed array of column names in
  dict_table_t. This saves 8-15+ bytes of memory per column on 64-bit
  machines.
storage/innobase/include/dict0types.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
storage/innobase/include/ibuf0ibuf.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/include/page0page.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r830:
  page_align(ptr): New utility function to replace
  ut_align_down(ptr, UNIV_PAGE_SIZE) calls.
  
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
storage/innobase/include/page0page.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r830:
  page_align(ptr): New utility function to replace
  ut_align_down(ptr, UNIV_PAGE_SIZE) calls.
  
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/include/read0read.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/include/rem0cmp.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
storage/innobase/include/rem0cmp.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
storage/innobase/include/rem0rec.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
storage/innobase/include/rem0rec.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/include/rem0types.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
storage/innobase/include/row0upd.ic:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
storage/innobase/include/sync0rw.h:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r823:
  Minor cleanup related to Bug #20877.
  
  btr_print_recursive(): Replace tree->tree_indexes with tree->index.
  This should have been done in r453.
  
  univ.i: Add UNIV_BTR_PRINT.
  
  rw_lock_t: Reduce writer_is_wait_ex to a bit and move it close to
  other bitfields.  Change the types to unsigned, in case ulint or ibool
  bitfields will not work.
  
  
  Revision r833:
  Tweak the bit-field definitions introduced since r813 to address Bug #20877.
  
  rw_lock_t: Do not make writer_is_wait_ex a bit-field.  There are no fields
  yet that could be fused to the same machine word, but we play it safe,
  because the field writer_is_wait_ex may be modified by several threads
  simultaneously.  Such fields should always be allocated an own machine
  word.
  
  dict_table_t: Change the type of all bit-fields to "unsigned".  Make
  "space" a bit-field of 32 bits.  Move name_hash and id_hash after all
  bit-fields, so that the bit-fields can be allocated together.  Do not
  make autoinc_inited a bit-field, as we cannot allocate any field
  from the same machine word.
  
  dict_build_table_def_step(): Pass a local variable to
  fil_create_new_single_table_tablespace() and initialize table->space
  from it after the call, now that table->space is a bit-field.
storage/innobase/include/univ.i:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r823:
  Minor cleanup related to Bug #20877.
  
  btr_print_recursive(): Replace tree->tree_indexes with tree->index.
  This should have been done in r453.
  
  univ.i: Add UNIV_BTR_PRINT.
  
  rw_lock_t: Reduce writer_is_wait_ex to a bit and move it close to
  other bitfields.  Change the types to unsigned, in case ulint or ibool
  bitfields will not work.
storage/innobase/lock/lock0lock.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/log/log0log.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/log/log0recv.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/mem/mem0dbg.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/mem/mem0pool.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/mtr/mtr0log.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/mtr/mtr0mtr.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/os/os0file.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/os/os0thread.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/page/page0cur.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/page/page0page.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
storage/innobase/pars/pars0opt.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/pars/pars0pars.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/pars/pars0sym.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
storage/innobase/read/read0read.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/rem/rem0cmp.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/rem/rem0rec.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/row/row0ins.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/row/row0mysql.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/row/row0purge.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r828:
  Remove dict_tree_t, which should have been removed in r453.
  There always was a one-to-one mapping between dict_tree_t and dict_index_t.
  
  This saves 6 machine words per B-tree index in the data dictionary
  cache plus the memory allocation overhead.  We save one mem_heap_t
  object per index (15 machine words).  Considering the internal
  fragmentation of the buddy allocator in mem_area_alloc(), this should
  save 32 machine words per index (128 bytes on 32-bit systems and 256
  bytes on 64-bit systems).  (Bug #20877)
  
  struct dict_tree_struct, dict_tree_t: Remove.
  
  struct dict_index_struct: Add page and lock.
  
  dict_tree_create(): Remove.  Replace the invocation with
  assignment to index->page and a call to rw_lock_create(&index->lock).
  
  dict_tree_free(): Remove.  Replace the invocation wtih
  a call to rw_lock_free(&index->lock).
  
  dict_index_get_tree(): Remove.
  
  dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
  and remove the parameter, which was unused.
  
  btr_level_list_remove(): Remove the unused parameter "tree".
  
  Replace the occurrences of "tree" with "index" in names of variables,
  functions and data types, e.g. "dict_tree_t tree" becomes
  "dict_index_t index".  Remove local variables "tree" or "index" of
  functions that needed both "tree" and "index".
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/row/row0row.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/row/row0sel.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r820:
  Remove dict_col_t::clust_pos.
  
  dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
  look-up with a linear search of all columns in the clustered index.
  
  row_upd_index_replace_new_col_vals(): Compute clust_index outside
  the loops.  Compute clust_pos outside the inner loop.
  
  row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
  Compute clust_index outside the loops.  Declare the auxiliary variables
  inside the loop scope.
  
  
  Revision r821:
  dict_table_t: Rename the integer field max_row_size
  to the Boolean field big_rows.  (Bug #20877)
  
  BIG_ROW_SIZE: Move the definition from row0sel.c to dict_table_add_to_cache().
  
  
  Revision r825:
  row_search_for_mysql(): Skip setting the next-key lock on an already 
  delete-marked record in a clustered index where the search criteria is 
  unique, within the same transaction (Bug #13544).
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r837:
  page_offset(): New function to replace many ut_align_offset(., UNIV_PAGE_SIZE)
  calls.
  
  dict_index_build_node_ptr(): Correct a typo in a comment.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
  
  Revision r845:
  Split long lines with [] operators better.
storage/innobase/row/row0uins.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/row/row0umod.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/row/row0upd.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r819:
  dict_col_t: Reduce ord_part to one bit.
  
  dict_index_add_to_cache(): Instead of incrementing ord_part, set it.
  
  dict_index_remove_from_cache(): Do not touch ord_part.
  
  dtype_t: Reduce mbminlen from 3 to 2 bits.
  
  row_upd(): Add a UNIV_LIKELY hint around node->in_mysql_interface.
  
  
  Revision r820:
  Remove dict_col_t::clust_pos.
  
  dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
  look-up with a linear search of all columns in the clustered index.
  
  row_upd_index_replace_new_col_vals(): Compute clust_index outside
  the loops.  Compute clust_pos outside the inner loop.
  
  row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
  Compute clust_index outside the loops.  Declare the auxiliary variables
  inside the loop scope.
  
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
  
  Revision r851:
  row_upd_sec_step(): Fix false comment.
storage/innobase/row/row0vers.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/srv/srv0srv.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
  
  
  Revision r832:
  Add dict_table_get_col_name() in preparation for getting rid of
  dict_col_t::name, and use it instead of col->name everywhere.
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/srv/srv0start.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/sync/sync0arr.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/sync/sync0rw.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r813:
  Reduce the size of the data dictionary cache.  (Bug #20877)
  
  dtype_t: Remove unused field "prec", which was supposed to be used for
  the precision of decimal columns in stand-alone InnoDB.
  
  dtype_get_prec(): Remove.
  
  dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".
  
  dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
  into bit-fields.
  
  dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.
  
  dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.
  
  Replace the default clust_pos value ULINT_UNDEFINED with
  REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
  the accessor function dict_col_get_clust_pos().
  
  dict_field_t: Turn prefix_len and fixed_len into bit-fields.
  
  dict_tree_t: Remove pad[64].
  
  dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
  cached, flags, stat_initialized, and autoinc_inited into bit-fields.
  Remove does_not_fit_in_memory from non-debug builds.
  
  dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
  n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.
  
  dict_foreign_struct: Turn n_fields and type into bit-fields.
  
  rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
  Omit level unless #defined UNIV_SYNC_DEBUG.
  
  Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
  from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
  dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
storage/innobase/sync/sync0sync.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/trx/trx0purge.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/trx/trx0rec.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r834:
  dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
  so that all integer fields can be packed into 64 bits.  (Bug #20877)
  
  dtype_t: Change the type of all bit-fields to unsigned.
  
  dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
  dict_table_get_sys_col(), dict_field_get_col(): Return const
  dict_col_t*, so that changes to dict_col_t can be detected more
  easily.  Add const to many dict_col_t* declarations.
  
  dict_index_get_nth_type(): Replace with dict_index_get_nth_col().
  
  dict_col_get_type(): Replace with dict_col_copy_type().
  
  dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
  dict_col_get_sql_null_size(): New functions.
  
  dtype_get_at_most_n_mbchars(): Replace the parameter dtype
  with the parameters prtype, mbminlen, mbmaxlen.
  
  dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
  cmp_whole_field(): Replace the dtype_t* parameter with the ulint
  parameters mtype, prtype.
  
  dtype_copy(): Add a const qualifier to type2 (the one being copied from).
  
  dtype_set_mblen(): Replaced with dtype_get_mblen().
  
  dtype_get_fixed_size_low(), dtype_get_min_size_low(),
  dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
  dtype_get_min_size(), and dtype_get_max_size().  These are used by the
  dict_col_get_{fixed,min,max}_size() functions.
  
  cmp_types_are_equal(): Replace with cmp_cols_are_equal().
  
  dict_table_get_col_name(): Add a const qualifier parameter to the
  parameter "table".
  
  dtype_binary, dtype_binary_val: Remove.
  
  dtype_is_fixed_size(): Remove.
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/trx/trx0rseg.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/trx/trx0sys.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r829:
  Erase the magic number in the trx sys header using a redo-logged write;
  it should be redo-logged because the data structure is file-based;
  this patch does not fix any bug; the original erase operation was added
  in r781 to fix Valgrind Bug #20791
  
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/trx/trx0trx.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
storage/innobase/trx/trx0undo.c:
  Applied innodb-5.1 snapshots ss799 and ss854
  
  Revision r838:
  Revamp the line splits done in r763 and r764 that can now be done better,
  thanks to r826.
2006-09-21 01:39:09 -06:00

706 lines
27 KiB
C

/******************************************************
The index tree cursor
(c) 1994-1996 Innobase Oy
Created 10/16/1994 Heikki Tuuri
*******************************************************/
#ifndef btr0cur_h
#define btr0cur_h
#include "univ.i"
#include "dict0dict.h"
#include "data0data.h"
#include "page0cur.h"
#include "btr0types.h"
#include "que0types.h"
#include "row0types.h"
#include "ha0ha.h"
/* Mode flags for btr_cur operations; these can be ORed */
#define BTR_NO_UNDO_LOG_FLAG 1 /* do no undo logging */
#define BTR_NO_LOCKING_FLAG 2 /* do no record lock checking */
#define BTR_KEEP_SYS_FLAG 4 /* sys fields will be found from the
update vector or inserted entry */
#define BTR_CUR_ADAPT
#define BTR_CUR_HASH_ADAPT
/*************************************************************
Returns the page cursor component of a tree cursor. */
UNIV_INLINE
page_cur_t*
btr_cur_get_page_cur(
/*=================*/
/* out: pointer to page cursor component */
btr_cur_t* cursor);/* in: tree cursor */
/*************************************************************
Returns the record pointer of a tree cursor. */
UNIV_INLINE
rec_t*
btr_cur_get_rec(
/*============*/
/* out: pointer to record */
btr_cur_t* cursor);/* in: tree cursor */
/*************************************************************
Invalidates a tree cursor by setting record pointer to NULL. */
UNIV_INLINE
void
btr_cur_invalidate(
/*===============*/
btr_cur_t* cursor);/* in: tree cursor */
/*************************************************************
Returns the page of a tree cursor. */
UNIV_INLINE
page_t*
btr_cur_get_page(
/*=============*/
/* out: pointer to page */
btr_cur_t* cursor);/* in: tree cursor */
/*************************************************************
Returns the index of a cursor. */
UNIV_INLINE
dict_index_t*
btr_cur_get_index(
/*==============*/
/* out: index */
btr_cur_t* cursor);/* in: B-tree cursor */
/*************************************************************
Positions a tree cursor at a given record. */
UNIV_INLINE
void
btr_cur_position(
/*=============*/
dict_index_t* index, /* in: index */
rec_t* rec, /* in: record in tree */
btr_cur_t* cursor);/* in: cursor */
/************************************************************************
Searches an index tree and positions a tree cursor on a given level.
NOTE: n_fields_cmp in tuple must be set so that it cannot be compared
to node pointer page number fields on the upper levels of the tree!
Note that if mode is PAGE_CUR_LE, which is used in inserts, then
cursor->up_match and cursor->low_match both will have sensible values.
If mode is PAGE_CUR_GE, then up_match will a have a sensible value. */
void
btr_cur_search_to_nth_level(
/*========================*/
dict_index_t* index, /* in: index */
ulint level, /* in: the tree level of search */
dtuple_t* tuple, /* in: data tuple; NOTE: n_fields_cmp in
tuple must be set so that it cannot get
compared to the node ptr page number field! */
ulint mode, /* in: PAGE_CUR_L, ...;
NOTE that if the search is made using a unique
prefix of a record, mode should be PAGE_CUR_LE,
not PAGE_CUR_GE, as the latter may end up on
the previous page of the record! Inserts
should always be made using PAGE_CUR_LE to
search the position! */
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ..., ORed with
BTR_INSERT and BTR_ESTIMATE;
cursor->left_page is used to store a pointer
to the left neighbor page, in the cases
BTR_SEARCH_PREV and BTR_MODIFY_PREV;
NOTE that if has_search_latch
is != 0, we maybe do not have a latch set
on the cursor page, we assume
the caller uses his search latch
to protect the record! */
btr_cur_t* cursor, /* in/out: tree cursor; the cursor page is
s- or x-latched, but see also above! */
ulint has_search_latch,/* in: latch mode the caller
currently has on btr_search_latch:
RW_S_LATCH, or 0 */
mtr_t* mtr); /* in: mtr */
/*********************************************************************
Opens a cursor at either end of an index. */
void
btr_cur_open_at_index_side(
/*=======================*/
ibool from_left, /* in: TRUE if open to the low end,
FALSE if to the high end */
dict_index_t* index, /* in: index */
ulint latch_mode, /* in: latch mode */
btr_cur_t* cursor, /* in: cursor */
mtr_t* mtr); /* in: mtr */
/**************************************************************************
Positions a cursor at a randomly chosen position within a B-tree. */
void
btr_cur_open_at_rnd_pos(
/*====================*/
dict_index_t* index, /* in: index */
ulint latch_mode, /* in: BTR_SEARCH_LEAF, ... */
btr_cur_t* cursor, /* in/out: B-tree cursor */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Tries to perform an insert to a page in an index tree, next to cursor.
It is assumed that mtr holds an x-latch on the page. The operation does
not succeed if there is too little space on the page. If there is just
one record on the page, the insert will always succeed; this is to
prevent trying to split a page with just one record. */
ulint
btr_cur_optimistic_insert(
/*======================*/
/* out: DB_SUCCESS, DB_WAIT_LOCK,
DB_FAIL, or error number */
ulint flags, /* in: undo logging and locking flags: if not
zero, the parameters index and thr should be
specified */
btr_cur_t* cursor, /* in: cursor on page after which to insert;
cursor stays valid */
dtuple_t* entry, /* in: entry to insert */
rec_t** rec, /* out: pointer to inserted record if
succeed */
big_rec_t** big_rec,/* out: big rec vector whose fields have to
be stored externally by the caller, or
NULL */
que_thr_t* thr, /* in: query thread or NULL */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Performs an insert on a page of an index tree. It is assumed that mtr
holds an x-latch on the tree and on the cursor page. If the insert is
made on the leaf level, to avoid deadlocks, mtr must also own x-latches
to brothers of page, if those brothers exist. */
ulint
btr_cur_pessimistic_insert(
/*=======================*/
/* out: DB_SUCCESS or error number */
ulint flags, /* in: undo logging and locking flags: if not
zero, the parameter thr should be
specified; if no undo logging is specified,
then the caller must have reserved enough
free extents in the file space so that the
insertion will certainly succeed */
btr_cur_t* cursor, /* in: cursor after which to insert;
cursor stays valid */
dtuple_t* entry, /* in: entry to insert */
rec_t** rec, /* out: pointer to inserted record if
succeed */
big_rec_t** big_rec,/* out: big rec vector whose fields have to
be stored externally by the caller, or
NULL */
que_thr_t* thr, /* in: query thread or NULL */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Updates a record when the update causes no size changes in its fields. */
ulint
btr_cur_update_in_place(
/*====================*/
/* out: DB_SUCCESS or error number */
ulint flags, /* in: undo logging and locking flags */
btr_cur_t* cursor, /* in: cursor on the record to update;
cursor stays valid and positioned on the
same record */
upd_t* update, /* in: update vector */
ulint cmpl_info,/* in: compiler info on secondary index
updates */
que_thr_t* thr, /* in: query thread */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Tries to update a record on a page in an index tree. It is assumed that mtr
holds an x-latch on the page. The operation does not succeed if there is too
little space on the page or if the update would result in too empty a page,
so that tree compression is recommended. */
ulint
btr_cur_optimistic_update(
/*======================*/
/* out: DB_SUCCESS, or DB_OVERFLOW if the
updated record does not fit, DB_UNDERFLOW
if the page would become too empty */
ulint flags, /* in: undo logging and locking flags */
btr_cur_t* cursor, /* in: cursor on the record to update;
cursor stays valid and positioned on the
same record */
upd_t* update, /* in: update vector; this must also
contain trx id and roll ptr fields */
ulint cmpl_info,/* in: compiler info on secondary index
updates */
que_thr_t* thr, /* in: query thread */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Performs an update of a record on a page of a tree. It is assumed
that mtr holds an x-latch on the tree and on the cursor page. If the
update is made on the leaf level, to avoid deadlocks, mtr must also
own x-latches to brothers of page, if those brothers exist. */
ulint
btr_cur_pessimistic_update(
/*=======================*/
/* out: DB_SUCCESS or error code */
ulint flags, /* in: undo logging, locking, and rollback
flags */
btr_cur_t* cursor, /* in: cursor on the record to update */
big_rec_t** big_rec,/* out: big rec vector whose fields have to
be stored externally by the caller, or NULL */
upd_t* update, /* in: update vector; this is allowed also
contain trx id and roll ptr fields, but
the values in update vector have no effect */
ulint cmpl_info,/* in: compiler info on secondary index
updates */
que_thr_t* thr, /* in: query thread */
mtr_t* mtr); /* in: mtr */
/***************************************************************
Marks a clustered index record deleted. Writes an undo log record to
undo log on this delete marking. Writes in the trx id field the id
of the deleting transaction, and in the roll ptr field pointer to the
undo log record created. */
ulint
btr_cur_del_mark_set_clust_rec(
/*===========================*/
/* out: DB_SUCCESS, DB_LOCK_WAIT, or error
number */
ulint flags, /* in: undo logging and locking flags */
btr_cur_t* cursor, /* in: cursor */
ibool val, /* in: value to set */
que_thr_t* thr, /* in: query thread */
mtr_t* mtr); /* in: mtr */
/***************************************************************
Sets a secondary index record delete mark to TRUE or FALSE. */
ulint
btr_cur_del_mark_set_sec_rec(
/*=========================*/
/* out: DB_SUCCESS, DB_LOCK_WAIT, or error
number */
ulint flags, /* in: locking flag */
btr_cur_t* cursor, /* in: cursor */
ibool val, /* in: value to set */
que_thr_t* thr, /* in: query thread */
mtr_t* mtr); /* in: mtr */
/***************************************************************
Sets a secondary index record delete mark to FALSE. This function is
only used by the insert buffer insert merge mechanism. */
void
btr_cur_del_unmark_for_ibuf(
/*========================*/
rec_t* rec, /* in: record to delete unmark */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Tries to compress a page of the tree on the leaf level. It is assumed
that mtr holds an x-latch on the tree and on the cursor page. To avoid
deadlocks, mtr must also own x-latches to brothers of page, if those
brothers exist. NOTE: it is assumed that the caller has reserved enough
free extents so that the compression will always succeed if done! */
void
btr_cur_compress(
/*=============*/
btr_cur_t* cursor, /* in: cursor on the page to compress;
cursor does not stay valid */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Tries to compress a page of the tree if it seems useful. It is assumed
that mtr holds an x-latch on the tree and on the cursor page. To avoid
deadlocks, mtr must also own x-latches to brothers of page, if those
brothers exist. NOTE: it is assumed that the caller has reserved enough
free extents so that the compression will always succeed if done! */
ibool
btr_cur_compress_if_useful(
/*=======================*/
/* out: TRUE if compression occurred */
btr_cur_t* cursor, /* in: cursor on the page to compress;
cursor does not stay valid if compression
occurs */
mtr_t* mtr); /* in: mtr */
/***********************************************************
Removes the record on which the tree cursor is positioned. It is assumed
that the mtr has an x-latch on the page where the cursor is positioned,
but no latch on the whole tree. */
ibool
btr_cur_optimistic_delete(
/*======================*/
/* out: TRUE if success, i.e., the page
did not become too empty */
btr_cur_t* cursor, /* in: cursor on the record to delete;
cursor stays valid: if deletion succeeds,
on function exit it points to the successor
of the deleted record */
mtr_t* mtr); /* in: mtr */
/*****************************************************************
Removes the record on which the tree cursor is positioned. Tries
to compress the page if its fillfactor drops below a threshold
or if it is the only page on the level. It is assumed that mtr holds
an x-latch on the tree and on the cursor page. To avoid deadlocks,
mtr must also own x-latches to brothers of page, if those brothers
exist. */
ibool
btr_cur_pessimistic_delete(
/*=======================*/
/* out: TRUE if compression occurred */
ulint* err, /* out: DB_SUCCESS or DB_OUT_OF_FILE_SPACE;
the latter may occur because we may have
to update node pointers on upper levels,
and in the case of variable length keys
these may actually grow in size */
ibool has_reserved_extents, /* in: TRUE if the
caller has already reserved enough free
extents so that he knows that the operation
will succeed */
btr_cur_t* cursor, /* in: cursor on the record to delete;
if compression does not occur, the cursor
stays valid: it points to successor of
deleted record on function exit */
ibool in_rollback,/* in: TRUE if called in rollback */
mtr_t* mtr); /* in: mtr */
/***************************************************************
Parses a redo log record of updating a record in-place. */
byte*
btr_cur_parse_update_in_place(
/*==========================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
byte* end_ptr,/* in: buffer end */
page_t* page, /* in: page or NULL */
dict_index_t* index); /* in: index corresponding to page */
/********************************************************************
Parses the redo log record for delete marking or unmarking of a clustered
index record. */
byte*
btr_cur_parse_del_mark_set_clust_rec(
/*=================================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
byte* end_ptr,/* in: buffer end */
dict_index_t* index, /* in: index corresponding to page */
page_t* page); /* in: page or NULL */
/********************************************************************
Parses the redo log record for delete marking or unmarking of a secondary
index record. */
byte*
btr_cur_parse_del_mark_set_sec_rec(
/*===============================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
byte* end_ptr,/* in: buffer end */
page_t* page); /* in: page or NULL */
/***********************************************************************
Estimates the number of rows in a given index range. */
ib_longlong
btr_estimate_n_rows_in_range(
/*=========================*/
/* out: estimated number of rows */
dict_index_t* index, /* in: index */
dtuple_t* tuple1, /* in: range start, may also be empty tuple */
ulint mode1, /* in: search mode for range start */
dtuple_t* tuple2, /* in: range end, may also be empty tuple */
ulint mode2); /* in: search mode for range end */
/***********************************************************************
Estimates the number of different key values in a given index, for
each n-column prefix of the index where n <= dict_index_get_n_unique(index).
The estimates are stored in the array index->stat_n_diff_key_vals. */
void
btr_estimate_number_of_different_key_vals(
/*======================================*/
dict_index_t* index); /* in: index */
/***********************************************************************
Marks not updated extern fields as not-owned by this record. The ownership
is transferred to the updated record which is inserted elsewhere in the
index tree. In purge only the owner of externally stored field is allowed
to free the field. */
void
btr_cur_mark_extern_inherited_fields(
/*=================================*/
rec_t* rec, /* in: record in a clustered index */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
upd_t* update, /* in: update vector */
mtr_t* mtr); /* in: mtr */
/***********************************************************************
The complement of the previous function: in an update entry may inherit
some externally stored fields from a record. We must mark them as inherited
in entry, so that they are not freed in a rollback. */
void
btr_cur_mark_dtuple_inherited_extern(
/*=================================*/
dtuple_t* entry, /* in: updated entry to be inserted to
clustered index */
ulint* ext_vec, /* in: array of extern fields in the
original record */
ulint n_ext_vec, /* in: number of elements in ext_vec */
upd_t* update); /* in: update vector */
/***********************************************************************
Marks all extern fields in a dtuple as owned by the record. */
void
btr_cur_unmark_dtuple_extern_fields(
/*================================*/
dtuple_t* entry, /* in: clustered index entry */
ulint* ext_vec, /* in: array of numbers of fields
which have been stored externally */
ulint n_ext_vec); /* in: number of elements in ext_vec */
/***********************************************************************
Stores the fields in big_rec_vec to the tablespace and puts pointers to
them in rec. The fields are stored on pages allocated from leaf node
file segment of the index tree. */
ulint
btr_store_big_rec_extern_fields(
/*============================*/
/* out: DB_SUCCESS or error */
dict_index_t* index, /* in: index of rec; the index tree
MUST be X-latched */
rec_t* rec, /* in: record */
const ulint* offsets, /* in: rec_get_offsets(rec, index);
the "external storage" flags in offsets
will not correspond to rec when
this function returns */
big_rec_t* big_rec_vec, /* in: vector containing fields
to be stored externally */
mtr_t* local_mtr); /* in: mtr containing the latch to
rec and to the tree */
/***********************************************************************
Frees the space in an externally stored field to the file space
management if the field in data is owned the externally stored field,
in a rollback we may have the additional condition that the field must
not be inherited. */
void
btr_free_externally_stored_field(
/*=============================*/
dict_index_t* index, /* in: index of the data, the index
tree MUST be X-latched; if the tree
height is 1, then also the root page
must be X-latched! (this is relevant
in the case this function is called
from purge where 'data' is located on
an undo log page, not an index
page) */
byte* data, /* in: internally stored data
+ reference to the externally
stored part */
ulint local_len, /* in: length of data */
ibool do_not_free_inherited,/* in: TRUE if called in a
rollback and we do not want to free
inherited fields */
mtr_t* local_mtr); /* in: mtr containing the latch to
data an an X-latch to the index
tree */
/***************************************************************
Frees the externally stored fields for a record. */
void
btr_rec_free_externally_stored_fields(
/*==================================*/
dict_index_t* index, /* in: index of the data, the index
tree MUST be X-latched */
rec_t* rec, /* in: record */
const ulint* offsets,/* in: rec_get_offsets(rec, index) */
ibool do_not_free_inherited,/* in: TRUE if called in a
rollback and we do not want to free
inherited fields */
mtr_t* mtr); /* in: mini-transaction handle which contains
an X-latch to record page and to the index
tree */
/***********************************************************************
Copies an externally stored field of a record to mem heap. */
byte*
btr_rec_copy_externally_stored_field(
/*=================================*/
/* out: the field copied to heap */
rec_t* rec, /* in: record */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint no, /* in: field number */
ulint* len, /* out: length of the field */
mem_heap_t* heap); /* in: mem heap */
/***********************************************************************
Copies an externally stored field of a record to mem heap. Parameter
data contains a pointer to 'internally' stored part of the field:
possibly some data, and the reference to the externally stored part in
the last 20 bytes of data. */
byte*
btr_copy_externally_stored_field(
/*=============================*/
/* out: the whole field copied to heap */
ulint* len, /* out: length of the whole field */
byte* data, /* in: 'internally' stored part of the
field containing also the reference to
the external part */
ulint local_len,/* in: length of data */
mem_heap_t* heap); /* in: mem heap */
/***********************************************************************
Stores the positions of the fields marked as extern storage in the update
vector, and also those fields who are marked as extern storage in rec
and not mentioned in updated fields. We use this function to remember
which fields we must mark as extern storage in a record inserted for an
update. */
ulint
btr_push_update_extern_fields(
/*==========================*/
/* out: number of values stored in ext_vect */
ulint* ext_vect,/* in: array of ulints, must be preallocated
to have space for all fields in rec */
const ulint* offsets,/* in: array returned by rec_get_offsets() */
upd_t* update);/* in: update vector or NULL */
/*######################################################################*/
/* In the pessimistic delete, if the page data size drops below this
limit, merging it to a neighbor is tried */
#define BTR_CUR_PAGE_COMPRESS_LIMIT (UNIV_PAGE_SIZE / 2)
/* A slot in the path array. We store here info on a search path down the
tree. Each slot contains data on a single level of the tree. */
typedef struct btr_path_struct btr_path_t;
struct btr_path_struct{
ulint nth_rec; /* index of the record
where the page cursor stopped on
this level (index in alphabetical
order); value ULINT_UNDEFINED
denotes array end */
ulint n_recs; /* number of records on the page */
};
#define BTR_PATH_ARRAY_N_SLOTS 250 /* size of path array (in slots) */
/* The tree cursor: the definition appears here only for the compiler
to know struct size! */
struct btr_cur_struct {
dict_index_t* index; /* index where positioned */
page_cur_t page_cur; /* page cursor */
page_t* left_page; /* this field is used to store
a pointer to the left neighbor
page, in the cases
BTR_SEARCH_PREV and
BTR_MODIFY_PREV */
/*------------------------------*/
que_thr_t* thr; /* this field is only used when
btr_cur_search_... is called for an
index entry insertion: the calling
query thread is passed here to be
used in the insert buffer */
/*------------------------------*/
/* The following fields are used in btr_cur_search... to pass
information: */
ulint flag; /* BTR_CUR_HASH, BTR_CUR_HASH_FAIL,
BTR_CUR_BINARY, or
BTR_CUR_INSERT_TO_IBUF */
ulint tree_height; /* Tree height if the search is done
for a pessimistic insert or update
operation */
ulint up_match; /* If the search mode was PAGE_CUR_LE,
the number of matched fields to the
the first user record to the right of
the cursor record after
btr_cur_search_...;
for the mode PAGE_CUR_GE, the matched
fields to the first user record AT THE
CURSOR or to the right of it;
NOTE that the up_match and low_match
values may exceed the correct values
for comparison to the adjacent user
record if that record is on a
different leaf page! (See the note in
row_ins_duplicate_key.) */
ulint up_bytes; /* number of matched bytes to the
right at the time cursor positioned;
only used internally in searches: not
defined after the search */
ulint low_match; /* if search mode was PAGE_CUR_LE,
the number of matched fields to the
first user record AT THE CURSOR or
to the left of it after
btr_cur_search_...;
NOT defined for PAGE_CUR_GE or any
other search modes; see also the NOTE
in up_match! */
ulint low_bytes; /* number of matched bytes to the
right at the time cursor positioned;
only used internally in searches: not
defined after the search */
ulint n_fields; /* prefix length used in a hash
search if hash_node != NULL */
ulint n_bytes; /* hash prefix bytes if hash_node !=
NULL */
ulint fold; /* fold value used in the search if
flag is BTR_CUR_HASH */
/*------------------------------*/
btr_path_t* path_arr; /* in estimating the number of
rows in range, we store in this array
information of the path through
the tree */
};
/* Values for the flag documenting the used search method */
#define BTR_CUR_HASH 1 /* successful shortcut using the hash
index */
#define BTR_CUR_HASH_FAIL 2 /* failure using hash, success using
binary search: the misleading hash
reference is stored in the field
hash_node, and might be necessary to
update */
#define BTR_CUR_BINARY 3 /* success using the binary search */
#define BTR_CUR_INSERT_TO_IBUF 4 /* performed the intended insert to
the insert buffer */
/* If pessimistic delete fails because of lack of file space,
there is still a good change of success a little later: try this many times,
and sleep this many microseconds in between */
#define BTR_CUR_RETRY_DELETE_N_TIMES 100
#define BTR_CUR_RETRY_SLEEP_TIME 50000
/* The reference in a field for which data is stored on a different page.
The reference is at the end of the 'locally' stored part of the field.
'Locally' means storage in the index record.
We store locally a long enough prefix of each column so that we can determine
the ordering parts of each index record without looking into the externally
stored part. */
/*--------------------------------------*/
#define BTR_EXTERN_SPACE_ID 0 /* space id where stored */
#define BTR_EXTERN_PAGE_NO 4 /* page no where stored */
#define BTR_EXTERN_OFFSET 8 /* offset of BLOB header
on that page */
#define BTR_EXTERN_LEN 12 /* 8 bytes containing the
length of the externally
stored part of the BLOB.
The 2 highest bits are
reserved to the flags below. */
/*--------------------------------------*/
#define BTR_EXTERN_FIELD_REF_SIZE 20
/* The highest bit of BTR_EXTERN_LEN (i.e., the highest bit of the byte
at lowest address) is set to 1 if this field does not 'own' the externally
stored field; only the owner field is allowed to free the field in purge!
If the 2nd highest bit is 1 then it means that the externally stored field
was inherited from an earlier version of the row. In rollback we are not
allowed to free an inherited external field. */
#define BTR_EXTERN_OWNER_FLAG 128
#define BTR_EXTERN_INHERITED_FLAG 64
extern ulint btr_cur_n_non_sea;
extern ulint btr_cur_n_sea;
extern ulint btr_cur_n_non_sea_old;
extern ulint btr_cur_n_sea_old;
#ifndef UNIV_NONINL
#include "btr0cur.ic"
#endif
#endif