mariadb/storage/innobase/row/row0umod.c
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

762 lines
19 KiB
C

/******************************************************
Undo modify of a row
(c) 1997 Innobase Oy
Created 2/27/1997 Heikki Tuuri
*******************************************************/
#include "row0umod.h"
#ifdef UNIV_NONINL
#include "row0umod.ic"
#endif
#include "dict0dict.h"
#include "dict0boot.h"
#include "trx0undo.h"
#include "trx0roll.h"
#include "btr0btr.h"
#include "mach0data.h"
#include "row0undo.h"
#include "row0vers.h"
#include "trx0trx.h"
#include "trx0rec.h"
#include "row0row.h"
#include "row0upd.h"
#include "que0que.h"
#include "log0log.h"
/* Considerations on undoing a modify operation.
(1) Undoing a delete marking: all index records should be found. Some of
them may have delete mark already FALSE, if the delete mark operation was
stopped underway, or if the undo operation ended prematurely because of a
system crash.
(2) Undoing an update of a delete unmarked record: the newer version of
an updated secondary index entry should be removed if no prior version
of the clustered index record requires its existence. Otherwise, it should
be delete marked.
(3) Undoing an update of a delete marked record. In this kind of update a
delete marked clustered index record was delete unmarked and possibly also
some of its fields were changed. Now, it is possible that the delete marked
version has become obsolete at the time the undo is started. */
/***************************************************************
Checks if also the previous version of the clustered index record was
modified or inserted by the same transaction, and its undo number is such
that it should be undone in the same rollback. */
UNIV_INLINE
ibool
row_undo_mod_undo_also_prev_vers(
/*=============================*/
/* out: TRUE if also previous modify or
insert of this row should be undone */
undo_node_t* node, /* in: row undo node */
dulint* undo_no)/* out: the undo number */
{
trx_undo_rec_t* undo_rec;
trx_t* trx;
trx = node->trx;
if (0 != ut_dulint_cmp(node->new_trx_id, trx->id)) {
*undo_no = ut_dulint_zero;
return(FALSE);
}
undo_rec = trx_undo_get_undo_rec_low(node->new_roll_ptr, node->heap);
*undo_no = trx_undo_rec_get_undo_no(undo_rec);
return(ut_dulint_cmp(trx->roll_limit, *undo_no) <= 0);
}
/***************************************************************
Undoes a modify in a clustered index record. */
static
ulint
row_undo_mod_clust_low(
/*===================*/
/* out: DB_SUCCESS, DB_FAIL, or error code:
we may run out of file space */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr, /* in: query thread */
mtr_t* mtr, /* in: mtr */
ulint mode) /* in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */
{
big_rec_t* dummy_big_rec;
btr_pcur_t* pcur;
btr_cur_t* btr_cur;
ulint err;
ibool success;
pcur = &(node->pcur);
btr_cur = btr_pcur_get_btr_cur(pcur);
success = btr_pcur_restore_position(mode, pcur, mtr);
ut_ad(success);
if (mode == BTR_MODIFY_LEAF) {
err = btr_cur_optimistic_update(BTR_NO_LOCKING_FLAG
| BTR_NO_UNDO_LOG_FLAG
| BTR_KEEP_SYS_FLAG,
btr_cur, node->update,
node->cmpl_info, thr, mtr);
} else {
ut_ad(mode == BTR_MODIFY_TREE);
err = btr_cur_pessimistic_update(
BTR_NO_LOCKING_FLAG
| BTR_NO_UNDO_LOG_FLAG
| BTR_KEEP_SYS_FLAG,
btr_cur, &dummy_big_rec, node->update,
node->cmpl_info, thr, mtr);
}
return(err);
}
/***************************************************************
Removes a clustered index record after undo if possible. */
static
ulint
row_undo_mod_remove_clust_low(
/*==========================*/
/* out: DB_SUCCESS, DB_FAIL, or error code:
we may run out of file space */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr __attribute__((unused)), /* in: query thread */
mtr_t* mtr, /* in: mtr */
ulint mode) /* in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */
{
btr_pcur_t* pcur;
btr_cur_t* btr_cur;
ulint err;
ibool success;
pcur = &(node->pcur);
btr_cur = btr_pcur_get_btr_cur(pcur);
success = btr_pcur_restore_position(mode, pcur, mtr);
if (!success) {
return(DB_SUCCESS);
}
/* Find out if we can remove the whole clustered index record */
if (node->rec_type == TRX_UNDO_UPD_DEL_REC
&& !row_vers_must_preserve_del_marked(node->new_trx_id, mtr)) {
/* Ok, we can remove */
} else {
return(DB_SUCCESS);
}
if (mode == BTR_MODIFY_LEAF) {
success = btr_cur_optimistic_delete(btr_cur, mtr);
if (success) {
err = DB_SUCCESS;
} else {
err = DB_FAIL;
}
} else {
ut_ad(mode == BTR_MODIFY_TREE);
/* Note that since this operation is analogous to purge,
we can free also inherited externally stored fields:
hence the last FALSE in the call below */
btr_cur_pessimistic_delete(&err, FALSE, btr_cur, FALSE, mtr);
/* The delete operation may fail if we have little
file space left: TODO: easiest to crash the database
and restart with more file space */
}
return(err);
}
/***************************************************************
Undoes a modify in a clustered index record. Sets also the node state for the
next round of undo. */
static
ulint
row_undo_mod_clust(
/*===============*/
/* out: DB_SUCCESS or error code: we may run
out of file space */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr) /* in: query thread */
{
btr_pcur_t* pcur;
mtr_t mtr;
ulint err;
ibool success;
ibool more_vers;
dulint new_undo_no;
ut_ad(node && thr);
/* Check if also the previous version of the clustered index record
should be undone in this same rollback operation */
more_vers = row_undo_mod_undo_also_prev_vers(node, &new_undo_no);
pcur = &(node->pcur);
mtr_start(&mtr);
/* Try optimistic processing of the record, keeping changes within
the index page */
err = row_undo_mod_clust_low(node, thr, &mtr, BTR_MODIFY_LEAF);
if (err != DB_SUCCESS) {
btr_pcur_commit_specify_mtr(pcur, &mtr);
/* We may have to modify tree structure: do a pessimistic
descent down the index tree */
mtr_start(&mtr);
err = row_undo_mod_clust_low(node, thr, &mtr, BTR_MODIFY_TREE);
}
btr_pcur_commit_specify_mtr(pcur, &mtr);
if (err == DB_SUCCESS && node->rec_type == TRX_UNDO_UPD_DEL_REC) {
mtr_start(&mtr);
err = row_undo_mod_remove_clust_low(node, thr, &mtr,
BTR_MODIFY_LEAF);
if (err != DB_SUCCESS) {
btr_pcur_commit_specify_mtr(pcur, &mtr);
/* We may have to modify tree structure: do a
pessimistic descent down the index tree */
mtr_start(&mtr);
err = row_undo_mod_remove_clust_low(node, thr, &mtr,
BTR_MODIFY_TREE);
}
btr_pcur_commit_specify_mtr(pcur, &mtr);
}
node->state = UNDO_NODE_FETCH_NEXT;
trx_undo_rec_release(node->trx, node->undo_no);
if (more_vers && err == DB_SUCCESS) {
/* Reserve the undo log record to the prior version after
committing &mtr: this is necessary to comply with the latching
order, as &mtr may contain the fsp latch which is lower in
the latch hierarchy than trx->undo_mutex. */
success = trx_undo_rec_reserve(node->trx, new_undo_no);
if (success) {
node->state = UNDO_NODE_PREV_VERS;
}
}
return(err);
}
/***************************************************************
Delete marks or removes a secondary index entry if found. */
static
ulint
row_undo_mod_del_mark_or_remove_sec_low(
/*====================================*/
/* out: DB_SUCCESS, DB_FAIL, or
DB_OUT_OF_FILE_SPACE */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr, /* in: query thread */
dict_index_t* index, /* in: index */
dtuple_t* entry, /* in: index entry */
ulint mode) /* in: latch mode BTR_MODIFY_LEAF or
BTR_MODIFY_TREE */
{
ibool found;
btr_pcur_t pcur;
btr_cur_t* btr_cur;
ibool success;
ibool old_has;
ulint err;
mtr_t mtr;
mtr_t mtr_vers;
log_free_check();
mtr_start(&mtr);
found = row_search_index_entry(index, entry, mode, &pcur, &mtr);
btr_cur = btr_pcur_get_btr_cur(&pcur);
if (!found) {
/* Not found */
btr_pcur_close(&pcur);
mtr_commit(&mtr);
return(DB_SUCCESS);
}
/* We should remove the index record if no prior version of the row,
which cannot be purged yet, requires its existence. If some requires,
we should delete mark the record. */
mtr_start(&mtr_vers);
success = btr_pcur_restore_position(BTR_SEARCH_LEAF, &(node->pcur),
&mtr_vers);
ut_a(success);
old_has = row_vers_old_has_index_entry(FALSE,
btr_pcur_get_rec(&(node->pcur)),
&mtr_vers, index, entry);
if (old_has) {
err = btr_cur_del_mark_set_sec_rec(BTR_NO_LOCKING_FLAG,
btr_cur, TRUE, thr, &mtr);
ut_ad(err == DB_SUCCESS);
} else {
/* Remove the index record */
if (mode == BTR_MODIFY_LEAF) {
success = btr_cur_optimistic_delete(btr_cur, &mtr);
if (success) {
err = DB_SUCCESS;
} else {
err = DB_FAIL;
}
} else {
ut_ad(mode == BTR_MODIFY_TREE);
btr_cur_pessimistic_delete(&err, FALSE, btr_cur,
TRUE, &mtr);
/* The delete operation may fail if we have little
file space left: TODO: easiest to crash the database
and restart with more file space */
}
}
btr_pcur_commit_specify_mtr(&(node->pcur), &mtr_vers);
btr_pcur_close(&pcur);
mtr_commit(&mtr);
return(err);
}
/***************************************************************
Delete marks or removes a secondary index entry if found.
NOTE that if we updated the fields of a delete-marked secondary index record
so that alphabetically they stayed the same, e.g., 'abc' -> 'aBc', we cannot
return to the original values because we do not know them. But this should
not cause problems because in row0sel.c, in queries we always retrieve the
clustered index record or an earlier version of it, if the secondary index
record through which we do the search is delete-marked. */
static
ulint
row_undo_mod_del_mark_or_remove_sec(
/*================================*/
/* out: DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr, /* in: query thread */
dict_index_t* index, /* in: index */
dtuple_t* entry) /* in: index entry */
{
ulint err;
err = row_undo_mod_del_mark_or_remove_sec_low(node, thr, index,
entry, BTR_MODIFY_LEAF);
if (err == DB_SUCCESS) {
return(err);
}
err = row_undo_mod_del_mark_or_remove_sec_low(node, thr, index,
entry, BTR_MODIFY_TREE);
return(err);
}
/***************************************************************
Delete unmarks a secondary index entry which must be found. It might not be
delete-marked at the moment, but it does not harm to unmark it anyway. We also
need to update the fields of the secondary index record if we updated its
fields but alphabetically they stayed the same, e.g., 'abc' -> 'aBc'. */
static
ulint
row_undo_mod_del_unmark_sec_and_undo_update(
/*========================================*/
/* out: DB_FAIL or DB_SUCCESS or
DB_OUT_OF_FILE_SPACE */
ulint mode, /* in: search mode: BTR_MODIFY_LEAF or
BTR_MODIFY_TREE */
que_thr_t* thr, /* in: query thread */
dict_index_t* index, /* in: index */
dtuple_t* entry) /* in: index entry */
{
mem_heap_t* heap;
btr_pcur_t pcur;
upd_t* update;
ulint err = DB_SUCCESS;
ibool found;
big_rec_t* dummy_big_rec;
mtr_t mtr;
trx_t* trx = thr_get_trx(thr);
log_free_check();
mtr_start(&mtr);
found = row_search_index_entry(index, entry, mode, &pcur, &mtr);
if (!found) {
fputs("InnoDB: error in sec index entry del undo in\n"
"InnoDB: ", stderr);
dict_index_name_print(stderr, trx, index);
fputs("\n"
"InnoDB: tuple ", stderr);
dtuple_print(stderr, entry);
fputs("\n"
"InnoDB: record ", stderr);
rec_print(stderr, btr_pcur_get_rec(&pcur), index);
putc('\n', stderr);
trx_print(stderr, trx, 0);
fputs("\n"
"InnoDB: Submit a detailed bug report"
" to http://bugs.mysql.com\n", stderr);
} else {
btr_cur_t* btr_cur = btr_pcur_get_btr_cur(&pcur);
err = btr_cur_del_mark_set_sec_rec(BTR_NO_LOCKING_FLAG,
btr_cur, FALSE, thr, &mtr);
ut_a(err == DB_SUCCESS);
heap = mem_heap_create(100);
update = row_upd_build_sec_rec_difference_binary(
index, entry, btr_cur_get_rec(btr_cur), trx, heap);
if (upd_get_n_fields(update) == 0) {
/* Do nothing */
} else if (mode == BTR_MODIFY_LEAF) {
/* Try an optimistic updating of the record, keeping
changes within the page */
err = btr_cur_optimistic_update(
BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG,
btr_cur, update, 0, thr, &mtr);
if (err == DB_OVERFLOW || err == DB_UNDERFLOW) {
err = DB_FAIL;
}
} else {
ut_a(mode == BTR_MODIFY_TREE);
err = btr_cur_pessimistic_update(
BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG,
btr_cur, &dummy_big_rec,
update, 0, thr, &mtr);
}
mem_heap_free(heap);
}
btr_pcur_close(&pcur);
mtr_commit(&mtr);
return(err);
}
/***************************************************************
Undoes a modify in secondary indexes when undo record type is UPD_DEL. */
static
ulint
row_undo_mod_upd_del_sec(
/*=====================*/
/* out: DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr) /* in: query thread */
{
mem_heap_t* heap;
dtuple_t* entry;
dict_index_t* index;
ulint err;
heap = mem_heap_create(1024);
while (node->index != NULL) {
index = node->index;
entry = row_build_index_entry(node->row, index, heap);
err = row_undo_mod_del_mark_or_remove_sec(node, thr, index,
entry);
if (err != DB_SUCCESS) {
mem_heap_free(heap);
return(err);
}
node->index = dict_table_get_next_index(node->index);
}
mem_heap_free(heap);
return(DB_SUCCESS);
}
/***************************************************************
Undoes a modify in secondary indexes when undo record type is DEL_MARK. */
static
ulint
row_undo_mod_del_mark_sec(
/*======================*/
/* out: DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr) /* in: query thread */
{
mem_heap_t* heap;
dtuple_t* entry;
dict_index_t* index;
ulint err;
heap = mem_heap_create(1024);
while (node->index != NULL) {
index = node->index;
entry = row_build_index_entry(node->row, index, heap);
err = row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_LEAF, thr, index, entry);
if (err == DB_FAIL) {
err = row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_TREE, thr, index, entry);
}
if (err != DB_SUCCESS) {
mem_heap_free(heap);
return(err);
}
node->index = dict_table_get_next_index(node->index);
}
mem_heap_free(heap);
return(DB_SUCCESS);
}
/***************************************************************
Undoes a modify in secondary indexes when undo record type is UPD_EXIST. */
static
ulint
row_undo_mod_upd_exist_sec(
/*=======================*/
/* out: DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr) /* in: query thread */
{
mem_heap_t* heap;
dtuple_t* entry;
dict_index_t* index;
ulint err;
if (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE) {
/* No change in secondary indexes */
return(DB_SUCCESS);
}
heap = mem_heap_create(1024);
while (node->index != NULL) {
index = node->index;
if (row_upd_changes_ord_field_binary(node->row, node->index,
node->update)) {
/* Build the newest version of the index entry */
entry = row_build_index_entry(node->row, index, heap);
/* NOTE that if we updated the fields of a
delete-marked secondary index record so that
alphabetically they stayed the same, e.g.,
'abc' -> 'aBc', we cannot return to the original
values because we do not know them. But this should
not cause problems because in row0sel.c, in queries
we always retrieve the clustered index record or an
earlier version of it, if the secondary index record
through which we do the search is delete-marked. */
err = row_undo_mod_del_mark_or_remove_sec(node, thr,
index,
entry);
if (err != DB_SUCCESS) {
mem_heap_free(heap);
return(err);
}
/* We may have to update the delete mark in the
secondary index record of the previous version of
the row. We also need to update the fields of
the secondary index record if we updated its fields
but alphabetically they stayed the same, e.g.,
'abc' -> 'aBc'. */
row_upd_index_replace_new_col_vals(entry, index,
node->update, NULL);
err = row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_LEAF, thr, index, entry);
if (err == DB_FAIL) {
err = row_undo_mod_del_unmark_sec_and_undo_update(
BTR_MODIFY_TREE, thr, index, entry);
}
if (err != DB_SUCCESS) {
mem_heap_free(heap);
return(err);
}
}
node->index = dict_table_get_next_index(node->index);
}
mem_heap_free(heap);
return(DB_SUCCESS);
}
/***************************************************************
Parses the row reference and other info in a modify undo log record. */
static
void
row_undo_mod_parse_undo_rec(
/*========================*/
undo_node_t* node, /* in: row undo node */
que_thr_t* thr) /* in: query thread */
{
dict_index_t* clust_index;
byte* ptr;
dulint undo_no;
dulint table_id;
dulint trx_id;
dulint roll_ptr;
ulint info_bits;
ulint type;
ulint cmpl_info;
ibool dummy_extern;
trx_t* trx;
ut_ad(node && thr);
trx = thr_get_trx(thr);
ptr = trx_undo_rec_get_pars(node->undo_rec, &type, &cmpl_info,
&dummy_extern, &undo_no, &table_id);
node->rec_type = type;
node->table = dict_table_get_on_id(table_id, trx);
/* TODO: other fixes associated with DROP TABLE + rollback in the
same table by another user */
if (node->table == NULL) {
/* Table was dropped */
return;
}
if (node->table->ibd_file_missing) {
/* We skip undo operations to missing .ibd files */
node->table = NULL;
return;
}
clust_index = dict_table_get_first_index(node->table);
ptr = trx_undo_update_rec_get_sys_cols(ptr, &trx_id, &roll_ptr,
&info_bits);
ptr = trx_undo_rec_get_row_ref(ptr, clust_index, &(node->ref),
node->heap);
trx_undo_update_rec_get_update(ptr, clust_index, type, trx_id,
roll_ptr, info_bits, trx,
node->heap, &(node->update));
node->new_roll_ptr = roll_ptr;
node->new_trx_id = trx_id;
node->cmpl_info = cmpl_info;
}
/***************************************************************
Undoes a modify operation on a row of a table. */
ulint
row_undo_mod(
/*=========*/
/* out: DB_SUCCESS or error code */
undo_node_t* node, /* in: row undo node */
que_thr_t* thr) /* in: query thread */
{
ibool found;
ulint err;
ut_ad(node && thr);
ut_ad(node->state == UNDO_NODE_MODIFY);
row_undo_mod_parse_undo_rec(node, thr);
if (node->table == NULL) {
found = FALSE;
} else {
found = row_undo_search_clust_to_pcur(node);
}
if (!found) {
/* It is already undone, or will be undone by another query
thread, or table was dropped */
trx_undo_rec_release(node->trx, node->undo_no);
node->state = UNDO_NODE_FETCH_NEXT;
return(DB_SUCCESS);
}
node->index = dict_table_get_next_index(
dict_table_get_first_index(node->table));
if (node->rec_type == TRX_UNDO_UPD_EXIST_REC) {
err = row_undo_mod_upd_exist_sec(node, thr);
} else if (node->rec_type == TRX_UNDO_DEL_MARK_REC) {
err = row_undo_mod_del_mark_sec(node, thr);
} else {
ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
err = row_undo_mod_upd_del_sec(node, thr);
}
if (err != DB_SUCCESS) {
return(err);
}
err = row_undo_mod_clust(node, thr);
return(err);
}