2001-02-17 13:19:19 +01:00
|
|
|
/**********************************************************************
|
|
|
|
Data dictionary system
|
|
|
|
|
|
|
|
(c) 1996 Innobase Oy
|
|
|
|
|
|
|
|
Created 1/8/1996 Heikki Tuuri
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
|
|
#include "dict0load.h"
|
|
|
|
#include "trx0undo.h"
|
|
|
|
#include "trx0sys.h"
|
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 09:39:09 +02:00
|
|
|
#include "rem0types.h"
|
|
|
|
#include "data0type.h"
|
2001-02-17 13:19:19 +01:00
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the column data type. */
|
|
|
|
UNIV_INLINE
|
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 09:39:09 +02:00
|
|
|
void
|
|
|
|
dict_col_copy_type(
|
|
|
|
/*===============*/
|
|
|
|
const dict_col_t* col, /* in: column */
|
|
|
|
dtype_t* type) /* out: data type */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ut_ad(col && type);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
type->mtype = col->mtype;
|
|
|
|
type->prtype = col->prtype;
|
|
|
|
type->len = col->len;
|
|
|
|
type->mbminlen = col->mbminlen;
|
|
|
|
type->mbmaxlen = col->mbmaxlen;
|
|
|
|
}
|
|
|
|
|
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
After applying the snapshots, ensure that code conforms to the final version
of WL 3914.
It is signficant that, after these changes, InnoDB does not define MYSQL_SERVER,
and can be built as an independent storage engine plugin.
Fixes:
Bug#9709: InnoDB inconsistensy causes "Operating System Error 32/33"
Bug#18828: If InnoDB runs out of undo slots, it returns misleading 'table is full'
Bug#20090: InnoDB: Error: trying to declare trx to enter InnoDB
Bug#20352: Make ibuf_contract_for_n_pages tunable
Bug#21101: Wrong error on exceeding max row size for InnoDB table
Bug#21293: Deadlock detection prefers to kill long running FOR UPDATE queries
Bug#22819: SHOW INNODB STATUS crashes the server with an assertion failure under high load
Bug#25078: Make the replication thread to ignore innodb_thread_concurrency
Bug#25645: Assertion failure in file srv0srv.c
Bug#28138: indexing column prefixes produces corruption in InnoDB
BitKeeper/deleted/.del-Makefile.am~55504c43d99979e4:
Delete: storage/innobase/buf/Makefile.am
BitKeeper/deleted/.del-Makefile.am~79bb55303929b560:
Delete: storage/innobase/dict/Makefile.am
BitKeeper/deleted/.del-Makefile.am~7cd88e5f9a8d7ce8:
Delete: storage/innobase/data/Makefile.am
BitKeeper/deleted/.del-Makefile.am~e19a1fb29b1fe527:
Delete: storage/innobase/btr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~4ae65b009d41d1d:
Delete: storage/innobase/eval/Makefile.am
BitKeeper/deleted/.del-Makefile.am~679131a02af3f6fb:
Delete: storage/innobase/fsp/Makefile.am
BitKeeper/deleted/.del-Makefile.am~6acac9ae30eabdb3:
Delete: storage/innobase/dyn/Makefile.am
BitKeeper/deleted/.del-Makefile.am~a5e6b4385717fcb7:
Delete: storage/innobase/fil/Makefile.am
BitKeeper/deleted/.del-Makefile.am~11d601934b49c19:
Delete: storage/innobase/fut/Makefile.am
BitKeeper/deleted/.del-Makefile.am~5aab37bf3b6c430:
Delete: storage/innobase/ibuf/Makefile.am
BitKeeper/deleted/.del-Makefile.am~af2d719bb6e66986:
Delete: storage/innobase/handler/Makefile.am
BitKeeper/deleted/.del-Makefile.am~f0dbbc7a78648e18:
Delete: storage/innobase/ha/Makefile.am
BitKeeper/deleted/.del-Makefile.am~41684e54a5b0d26a:
Delete: storage/innobase/log/Makefile.am
BitKeeper/deleted/.del-Makefile.am~edd95d7290ddeff3:
Delete: storage/innobase/lock/Makefile.am
BitKeeper/deleted/.del-Makefile.i:
Delete: storage/innobase/include/Makefile.i
BitKeeper/deleted/.del-Makefile.am~2a6ccdba41b591a3:
Delete: storage/innobase/mach/Makefile.am
BitKeeper/deleted/.del-Makefile.am~2bd35bda856342:
Delete: storage/innobase/os/Makefile.am
BitKeeper/deleted/.del-Makefile.am~8448688c5ab92132:
Delete: storage/innobase/mem/Makefile.am
BitKeeper/deleted/.del-Makefile.am~b5a7a8cfa711b6de:
Delete: storage/innobase/mtr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~2cee8a309eb8eee2:
Delete: storage/innobase/page/Makefile.am
BitKeeper/deleted/.del-Makefile.am~3d0553f8aa9c456b:
Delete: storage/innobase/read/Makefile.am
BitKeeper/deleted/.del-Makefile.am~7b0c4abae6684f8c:
Delete: storage/innobase/pars/Makefile.am
BitKeeper/deleted/.del-Makefile.am~d0e0dd55cbd413f0:
Delete: storage/innobase/que/Makefile.am
BitKeeper/deleted/.del-Makefile.am~20a219ccf7825d65:
Delete: storage/innobase/row/Makefile.am
BitKeeper/deleted/.del-Makefile.am~37bdfb2973b2442b:
Delete: storage/innobase/rem/Makefile.am
BitKeeper/deleted/.del-Makefile.am~557098c4e5c01ee2:
Delete: storage/innobase/thr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~fdfe12f48c2499af:
Delete: storage/innobase/sync/Makefile.am
BitKeeper/deleted/.del-Makefile.am~feb2280a52035d8d:
Delete: storage/innobase/srv/Makefile.am
BitKeeper/deleted/.del-Makefile.am~456d34c4816dbda4:
Delete: storage/innobase/ut/Makefile.am
BitKeeper/deleted/.del-Makefile.am~5ec2ef0d2c35e138:
Delete: storage/innobase/usr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~d25c456e48393313:
Delete: storage/innobase/trx/Makefile.am
mysql-test/r/innodb.result:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1421:
Fix the innodb test by shifting some of the contents of the .result file.
Approved by: Marko
Revision r1422:
Fix for Bug#21101 - returns wrong error message when table column
defs exceed the max row size.
The fix returns a more appropriate error message. Add a test case to
innodb.test and expected output to innodb.result.
mysql-test/t/innodb.test:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1422:
Fix for Bug#21101 - returns wrong error message when table column
defs exceed the max row size.
The fix returns a more appropriate error message. Add a test case to
innodb.test and expected output to innodb.result.
storage/innobase/btr/btr0btr.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1546:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug#28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
storage/innobase/data/data0data.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1490:
Add #include <ctype.h>. Apparently, this header is no longer included by
the common headers. This may be related to WL#2936
(pluggable storage engines).
storage/innobase/data/data0type.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
storage/innobase/dict/dict0crea.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1423:
Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.
Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
storage/innobase/dict/dict0dict.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1490:
Add #include <ctype.h>. Apparently, this header is no longer included by
the common headers. This may be related to WL#2936
(pluggable storage engines).
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
Revision r1528:
Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
Revision r1529:
Revert r799, which was supposed to prevent similar cases as Bug#21638.
In reality, the patch breaks the handling of prefix indexes of
variable-length columns in ROW_FORMAT=COMPACT. Reverting the patch
is only a partial fix of Bug#28138.
Revision r1535:
Document that DICT_MAX_INDEX_COL_LEN must not be changed.
storage/innobase/fsp/fsp0fsp.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
Revision r1528:
Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
storage/innobase/ibuf/ibuf0ibuf.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1420:
Output to the error log information about the limitations of
UNIV_IBUF_DEBUG.
innobase_start_or_create_for_mysql(): Note that crash recovery is broken
when UNIV_IBUF_DEBUG is defined.
ibuf_counts[]: Make this a two-dimensional array. No need to allocate
anything from the heap. Eliminate ibuf_counts_inited, as the array
will be zero-filled by the runtime environment.
ibuf_count_check(): New function, to print out an explanation before
assertion failure.
Revision r1528:
Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
Revision r1546:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug#28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
storage/innobase/include/db0err.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1423:
Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.
Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
storage/innobase/include/dict0dict.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1546:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug#28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
storage/innobase/include/dict0dict.ic:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1546:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug#28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
storage/innobase/include/dict0mem.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1535:
Document that DICT_MAX_INDEX_COL_LEN must not be changed.
Revision r1536:
Change the comment to a more appropriate one. Discussed with Heikki on IM.
Approved by: Heikki
storage/innobase/include/ha_prototypes.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1482:
Fix Bug#25078 by always letting the replication thread on the slave
server to enter InnoDB. This can be made further customizable by the
user if we introduce a new config parameter. This will wait until
config parameters can be easily added.
Approved by: Marko
Revision r1501:
Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.
Approved by: Heikki
storage/innobase/include/os0file.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1431:
Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or
ERROR_LOCK_VIOLATION is encountered during file operation.
This is caused by backup software, so InnoDB should retry while the backup
software is done with the file.
Approved by: Heikki
storage/innobase/include/rem0rec.ic:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1569:
Fix some in:/out: comments.
Approved by: Marko
storage/innobase/include/row0mysql.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1422:
Fix for Bug#21101 - returns wrong error message when table column
defs exceed the max row size.
The fix returns a more appropriate error message. Add a test case to
innodb.test and expected output to innodb.result.
storage/innobase/include/trx0trx.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1462:
Fix typo in comment.
Revision r1486:
Improve the comment for trx_struct::undo_no.
Suggested by: Heikki
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1497:
Add the number of locks acquired by a transaction to its weight when
choosing the lightest transaction to kill when a deadlock occurs.
This fixes Bug#21293 partially.
Approved by: Heikki
Revision r1501:
Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.
Approved by: Heikki
storage/innobase/include/trx0undo.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1423:
Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.
Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
storage/innobase/include/ut0ut.h:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1528:
Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
storage/innobase/lock/lock0lock.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1457:
Fix Bug#22819, remove assertion. (http://bugs.mysql.com/bug.php?id=22819)
Revision r1497:
Add the number of locks acquired by a transaction to its weight when
choosing the lightest transaction to kill when a deadlock occurs.
This fixes Bug#21293 partially.
Approved by: Heikki
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
storage/innobase/log/log0log.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1521:
Forward port r1520 from branches/5.0
Patch to allow monitor threads to stop before proceeding with normal shutdown.
Also have a separate time counter for tablespace monitor.
reviewed by: Heikki
Revision r1524:
Undo bad space formatting introduced in earlier commit r1521
spotted by: Marko
Revision r1533:
logs_empty_and_mark_files_at_shutdown(): Remove trailing whitespace that
was added in r1521.
storage/innobase/os/os0file.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1431:
Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or
ERROR_LOCK_VIOLATION is encountered during file operation.
This is caused by backup software, so InnoDB should retry while the backup
software is done with the file.
Approved by: Heikki
storage/innobase/rem/rem0rec.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1528:
Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
Revision r1531:
rec_get_converted_size_new(): Simplify and move a debug assertion.
Revision r1546:
When buffering an insert to a prefix index of a variable-length column,
do not incorrectly mark the column as fixed-length. (Bug#28138)
ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
dtype_new_store_for_order_and_null_size(). Add debug assertions.
btr_index_rec_validate(): Correct a comment about prefix indexes.
rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
debug assertions and comments.
dict_col_type_assert_equal(): New debug function.
Revision r1555:
rec_get_converted_size_new(): The total size of the infimum and supremum
records in ROW_FORMAT=COMPACT is REC_N_NEW_EXTRA_BYTES + 8. The
REC_N_NEW_EXTRA_BYTES was accidentally omitted in r1546. This function
should never be called on those records, though.
Revision r1569:
Fix some in:/out: comments.
Approved by: Marko
storage/innobase/row/row0ins.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1485:
Minor cleanup.
row_ins_check_foreign_constraint(), row_ins_scan_sec_index_for_duplicate():
Make use of the predicates page_rec_is_infimum() and page_rec_is_supremum().
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
storage/innobase/row/row0mysql.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1422:
Fix for Bug#21101 - returns wrong error message when table column
defs exceed the max row size.
The fix returns a more appropriate error message. Add a test case to
innodb.test and expected output to innodb.result.
Revision r1423:
Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.
Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
storage/innobase/row/row0row.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
Revision r1529:
Revert r799, which was supposed to prevent similar cases as Bug#21638.
In reality, the patch breaks the handling of prefix indexes of
variable-length columns in ROW_FORMAT=COMPACT. Reverting the patch
is only a partial fix of Bug#28138.
storage/innobase/row/row0sel.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1452:
Fix phantom reads (http://bugs.mysql.com/27197) following Heikki's
patch in the bug followup.
Approved by: Heikki
Revision r1455:
Reindent with tabs instead of spaces.
Spotted by: Marko
storage/innobase/srv/srv0srv.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1424:
Bug#20352. Added variable srv_insert_buffer_batch_size. We want to make
this variable settable. Since the pluggable engine interface currently
doesn't provide a usable mechanism, we will add the latter functionality
once it's available.
Revision r1426:
Fix code indentation from r1424.
Revision r1459:
Fix typo in the comment.
Revision r1482:
Fix Bug#25078 by always letting the replication thread on the slave
server to enter InnoDB. This can be made further customizable by the
user if we introduce a new config parameter. This will wait until
config parameters can be easily added.
Approved by: Marko
Revision r1487:
Fix typo in comment.
Spotted by: Marko
Revision r1521:
Forward port r1520 from branches/5.0
Patch to allow monitor threads to stop before proceeding with normal shutdown.
Also have a separate time counter for tablespace monitor.
reviewed by: Heikki
Revision r1532:
srv_lock_timeout_and_monitor_thread(): Correct the indentation that was
broken in r1521.
Revision r1553:
Fix Bug#20090 as suggested in the bug followup by Heikki.
Approved by: Heikki
storage/innobase/srv/srv0start.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1420:
Output to the error log information about the limitations of
UNIV_IBUF_DEBUG.
innobase_start_or_create_for_mysql(): Note that crash recovery is broken
when UNIV_IBUF_DEBUG is defined.
ibuf_counts[]: Make this a two-dimensional array. No need to allocate
anything from the heap. Eliminate ibuf_counts_inited, as the array
will be zero-filled by the runtime environment.
ibuf_count_check(): New function, to print out an explanation before
assertion failure.
storage/innobase/sync/sync0arr.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
storage/innobase/trx/trx0rec.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1423:
Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.
Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
storage/innobase/trx/trx0trx.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1491:
Fix typo in comment.
Revision r1497:
Add the number of locks acquired by a transaction to its weight when
choosing the lightest transaction to kill when a deadlock occurs.
This fixes Bug#21293 partially.
Approved by: Heikki
Revision r1501:
Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.
Approved by: Heikki
Revision r1522:
trx0trx.c: Add missing #include "ha_prototypes.h".
storage/innobase/trx/trx0undo.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1423:
Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.
Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
storage/innobase/ut/ut0ut.c:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1490:
Add #include <ctype.h>. Apparently, this header is no longer included by
the common headers. This may be related to WL#2936
(pluggable storage engines).
mysql-test/r/innodb_trx_weight.result:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1498:
Add a test about the behavior introduced in r1497.
Revision r1501:
Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.
Approved by: Heikki
mysql-test/include/innodb_trx_weight.inc:
Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
Revision r1501:
Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.
Approved by: Heikki
Revision r1556:
mysql-test/innodb_trx_weight.inc: Add username root to the "connect" statement.
The Unix user running mysql-test-run usually does not have any privileges
on the MySQL test database.
mysql-test/t/innodb_trx_weight.test:
Fixes after merging InnoDB snapshots.
Revision r1498:
Add a test about the behavior introduced in r1497.
Revision r1501:
Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.
Approved by: Heikki
sql/sql_class.cc:
Fixes after merging InnoDB snapshots.
storage/innobase/Makefile.am:
Fixes after merging InnoDB snapshots.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
storage/innobase/handler/ha_innodb.cc:
Fixes after merging InnoDB snapshots.
Revision r1422:
Fix for Bug#21101 - returns wrong error message when table column
defs exceed the max row size.
The fix returns a more appropriate error message. Add a test case to
innodb.test and expected output to innodb.result.
Revision r1423:
Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
of UNDO slots in the rollback segment. This is a partial fix since the
MySQL error code requested to properly report the error condition back
to the client has not yet materialized. Currently we have #ifdef'd the
error code translation in ha_innodb.cc. This will have to be changed
as and when MySQl add the new requested code or an equivalent code
that we can then use.
Given the above, currently we will get the old behaviour, not the "fixed"
and intended behaviour.
Revision r1425:
Fixed a missing function decoration that slipped into r1422.
Revision r1434:
Fix typo.
Revision r1442:
Potential fix for Bug#25645:
"Move innobase_release_stat_resources(trx) outside the 'if' in
ha_innobase::external_lock(). That would add more safety that whatever
MySQL does at a query end, there would be no risk of a hang on the btr
search latch."
Also call innobase_release_temporary_latches() in the beginning of
ha_innobase::close().
Approved by: Heikki
Revision r1453:
Bugfix: only call innobase_release_temporary_latches() in case of current_thd
is not NULL, otherwise we get NULL pointer dereferencing.
Approved by: Heikki
Revision r1474:
Fix typo in comment: the exact prototype is in
include/data0type.ic, not in data/data0type.ic
Revision r1482:
Fix Bug#25078 by always letting the replication thread on the slave
server to enter InnoDB. This can be made further customizable by the
user if we introduce a new config parameter. This will wait until
config parameters can be easily added.
Approved by: Marko
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
Revision r1489:
thd_to_trx(), check_trx_exists(): Remove the handlerton parameter. It is a
singleton object whose address is stored into innodb_hton_ptr.
Revision r1492:
Convert innobase_buffer_pool_size and innobase_log_file_size types from
longlong to long long because MYSQL_SYSVAR_LONGLONG marco expects long long
type.
Also change
((ulint)innobase_buffer_pool_size) / 1024
to
(ulint)(innobase_buffer_pool_size / 1024)
and remove comment which is no longer true.
Provided that innobase_buffer_pool_size is always 64bits these statements
are equivalent if ulint is 64 bit (well it will screw up if
innobase_buffer_pool_size is negative). And if ulint is 32 bit the later
variant gives a little more chance that the value will fit.
Approved by: Heikki
Revision r1493:
ha_innodb.cc: Remove the declarations of some global InnoDB variables
whose name starts with srv_. These variables are declared in the header
files that are covered by #include directives in ha_innodb.cc.
Revision r1495:
Introduce the function reset_template() for resetting some fields of
row_prebuilt_t; currently prebuilt->read_just_key and
prebuilt->keep_other_fields_on_keyread.
Revision r1496:
ha_innobase::extra(): Replace references to prebuilt->trx with
thd_to_trx(ha_thd()), in order to avoid potential memory corruption.
Revision r1501:
Fix Bug#21293: Consider transactions that had edited non-transactional
tables heavier than ones that had not. This helps killing the "right"
transaction in case of a deadlock.
Approved by: Heikki
Revision r1513:
Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.
Approved by: Marko
Revision r1527:
Cleanup in ha_innodb.cc:
thd_is_replication_slave_thread(), thd_has_edited_nontrans_tables():
Remove blank line between the function comment and the function
definition. There should be exactly one line between the return
type and the function comment, and this line should be one of
'', 'static', 'UNIV_INLINE', and 'extern "C"'.
Revision r1538:
Do not return error in ha_innobase::info if srv_force_recovery >= 4. This is to allow for
normal processing of the query by MySQL instead of generating an error.
Reviewed by: Heikki
Revision r1551:
ha_innobase::innobase_read_and_init_auto_inc(): Remember and restore
prebuilt->sql_stat_start. In an ALTER TABLE statement in the innodb_gis
test, an ut_ad() assertion failed, because no IX lock had been acquired
on the table, because prebuilt->sql_stat_start was inadvertently reset
to FALSE, by this function. This function was called via
ha_innobase::info() and mysql_prepare_alter_table().
storage/innobase/plug.in:
Fixes after merging InnoDB snapshots.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
storage/innobase/handler/ha_innodb.h:
Fixes after merging InnoDB snapshots.
Revision r1488:
Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
2007-07-10 13:37:43 +02:00
|
|
|
#ifdef UNIV_DEBUG
|
|
|
|
/*************************************************************************
|
|
|
|
Assert that a column and a data type match. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ibool
|
|
|
|
dict_col_type_assert_equal(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: TRUE */
|
|
|
|
const dict_col_t* col, /* in: column */
|
|
|
|
const dtype_t* type) /* in: data type */
|
|
|
|
{
|
|
|
|
ut_ad(col);
|
|
|
|
ut_ad(type);
|
|
|
|
|
|
|
|
ut_ad(col->mtype == type->mtype);
|
|
|
|
ut_ad(col->prtype == type->prtype);
|
|
|
|
ut_ad(col->len == type->len);
|
|
|
|
ut_ad(col->mbminlen == type->mbminlen);
|
|
|
|
ut_ad(col->mbmaxlen == type->mbmaxlen);
|
|
|
|
|
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
#endif /* UNIV_DEBUG */
|
|
|
|
|
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 09:39:09 +02:00
|
|
|
/***************************************************************************
|
|
|
|
Returns the minimum size of the column. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_min_size(
|
|
|
|
/*==================*/
|
|
|
|
/* out: minimum size */
|
|
|
|
const dict_col_t* col) /* in: column */
|
|
|
|
{
|
|
|
|
return(dtype_get_min_size_low(col->mtype, col->prtype, col->len,
|
|
|
|
col->mbminlen, col->mbmaxlen));
|
|
|
|
}
|
|
|
|
/***************************************************************************
|
|
|
|
Returns the maximum size of the column. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_max_size(
|
|
|
|
/*==================*/
|
|
|
|
/* out: maximum size */
|
|
|
|
const dict_col_t* col) /* in: column */
|
|
|
|
{
|
|
|
|
return(dtype_get_max_size_low(col->mtype, col->len));
|
|
|
|
}
|
|
|
|
/***************************************************************************
|
|
|
|
Returns the size of a fixed size column, 0 if not a fixed size column. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_fixed_size(
|
|
|
|
/*====================*/
|
|
|
|
/* out: fixed size, or 0 */
|
|
|
|
const dict_col_t* col) /* in: column */
|
|
|
|
{
|
|
|
|
return(dtype_get_fixed_size_low(col->mtype, col->prtype, col->len,
|
|
|
|
col->mbminlen, col->mbmaxlen));
|
|
|
|
}
|
|
|
|
/***************************************************************************
|
|
|
|
Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column.
|
|
|
|
For fixed length types it is the fixed length of the type, otherwise 0. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_sql_null_size(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: SQL null storage size
|
|
|
|
in ROW_FORMAT=REDUNDANT */
|
|
|
|
const dict_col_t* col) /* in: column */
|
|
|
|
{
|
|
|
|
return(dict_col_get_fixed_size(col));
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the column number. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_no(
|
|
|
|
/*============*/
|
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 09:39:09 +02:00
|
|
|
const dict_col_t* col)
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
|
|
|
ut_ad(col);
|
|
|
|
|
|
|
|
return(col->ind);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the column position in the clustered index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_col_get_clust_pos(
|
|
|
|
/*===================*/
|
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 09:39:09 +02:00
|
|
|
const dict_col_t* col, /* in: table column */
|
|
|
|
const dict_index_t* clust_index) /* in: clustered index */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ulint i;
|
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
ut_ad(col);
|
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 09:39:09 +02:00
|
|
|
ut_ad(clust_index && clust_index->type & DICT_CLUSTERED);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
for (i = 0; i < clust_index->n_def; i++) {
|
|
|
|
const dict_field_t* field = &clust_index->fields[i];
|
|
|
|
|
|
|
|
if (!field->prefix_len && field->col == col) {
|
|
|
|
return(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return(ULINT_UNDEFINED);
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the first index on the table (the clustered index). */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_first_index(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: index, NULL if none exists */
|
|
|
|
dict_table_t* table) /* in: table */
|
|
|
|
{
|
|
|
|
ut_ad(table);
|
|
|
|
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
|
|
|
|
|
|
|
return(UT_LIST_GET_FIRST(table->indexes));
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the next index on the table. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_next_index(
|
|
|
|
/*======================*/
|
|
|
|
/* out: index, NULL if none left */
|
|
|
|
dict_index_t* index) /* in: index */
|
|
|
|
{
|
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
|
|
|
|
|
|
|
return(UT_LIST_GET_NEXT(indexes, index));
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of user-defined columns in a table in the dictionary
|
|
|
|
cache. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_n_user_cols(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: number of user-defined (e.g., not
|
|
|
|
ROW_ID) columns of a table */
|
|
|
|
dict_table_t* table) /* in: table */
|
|
|
|
{
|
|
|
|
ut_ad(table);
|
|
|
|
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
return(table->n_cols - DATA_N_SYS_COLS);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of system columns in a table in the dictionary cache. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_n_sys_cols(
|
|
|
|
/*======================*/
|
|
|
|
/* out: number of system (e.g.,
|
|
|
|
ROW_ID) columns of a table */
|
2001-11-05 22:48:03 +01:00
|
|
|
dict_table_t* table __attribute__((unused))) /* in: table */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
|
|
|
ut_ad(table);
|
|
|
|
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
|
|
|
ut_ad(table->cached);
|
|
|
|
|
|
|
|
return(DATA_N_SYS_COLS);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of all columns (also system) in a table in the dictionary
|
|
|
|
cache. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_n_cols(
|
|
|
|
/*==================*/
|
|
|
|
/* out: number of columns of a table */
|
|
|
|
dict_table_t* table) /* in: table */
|
|
|
|
{
|
|
|
|
ut_ad(table);
|
|
|
|
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
return(table->n_cols);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the nth column of a table. */
|
|
|
|
UNIV_INLINE
|
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 09:39:09 +02:00
|
|
|
const dict_col_t*
|
2001-02-17 13:19:19 +01:00
|
|
|
dict_table_get_nth_col(
|
|
|
|
/*===================*/
|
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 09:39:09 +02:00
|
|
|
/* out: pointer to column object */
|
|
|
|
const dict_table_t* table, /* in: table */
|
|
|
|
ulint pos) /* in: position of column */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
|
|
|
ut_ad(table);
|
|
|
|
ut_ad(pos < table->n_def);
|
|
|
|
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
|
|
|
|
|
|
|
return((table->cols) + pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the given system column of a table. */
|
|
|
|
UNIV_INLINE
|
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 09:39:09 +02:00
|
|
|
const dict_col_t*
|
2001-02-17 13:19:19 +01:00
|
|
|
dict_table_get_sys_col(
|
|
|
|
/*===================*/
|
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 09:39:09 +02:00
|
|
|
/* out: pointer to column object */
|
|
|
|
const dict_table_t* table, /* in: table */
|
|
|
|
ulint sys) /* in: DATA_ROW_ID, ... */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
const dict_col_t* col;
|
2001-02-17 13:19:19 +01:00
|
|
|
|
|
|
|
ut_ad(table);
|
|
|
|
ut_ad(sys < DATA_N_SYS_COLS);
|
|
|
|
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
|
|
|
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
col = dict_table_get_nth_col(table, table->n_cols
|
Applied InnoDB 5.1 snapshot ss787.
Bugs fixed:
- Bug #20791 valgrind errors in InnoDB
Remove Valgrind warning of Bug #20791 : in new database
creation, we read the doublewrite buffer magic number from
uninitialized memory; the code worked because it was extremely
unlikely that the memory would contain the magic number
- Bug #21784 DROP TABLE crashes 5.1.12-pre if concurrent
queries on the table
remove update_thd() in ::store_lock()
Also includes numerous coding style fixes, etc. See file-level
comments for details.
sql/ha_innodb.cc:
Applied InnoDB 5.1 snapshot ss787.
r755:
Merge a patch from MySQL AB (Mats Kindal):
Lock and unlock prepare_commit_mutex under the same conditions.
r782:
Fix bug #21784 of a crash in DROP TABLE with concurrent queries on the table
storage/innobase/Makefile.am:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)
This patch removes need for a innodb to have its own configure.
storage/innobase/btr/btr0btr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0pcur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0sea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/buf/buf0buf.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0flu.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0lru.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/buf/buf0rea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0data.c:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0type.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0boot.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0crea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0dict.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/dict/dict0load.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/dict/dict0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/eval/eval0eval.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/eval/eval0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/fil/fil0fil.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fsp/fsp0fsp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fut/fut0lst.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ha/ha0ha.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ibuf/ibuf0ibuf.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/btr0btr.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0pcur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0flu.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0rea.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0data.h:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
storage/innobase/include/data0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0type.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0boot.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0dict.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0mem.h:
Applied InnoDB 5.1 snapshot ss787.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/include/eval0eval.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/fut0lst.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ibuf0ibuf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/lock0lock.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0recv.h:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
storage/innobase/include/mach0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mem0mem.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/mtr0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mtr0mtr.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/os0file.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0page.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/include/que0que.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/read0read.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0cmp.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/row0mysql.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0purge.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0row.h:
Applied InnoDB 5.1 snapshot ss787.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/include/row0row.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0upd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rseg.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0sys.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0trx.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0trx.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0xa.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/univ.i:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)·
This patch removes need for a innodb to have its own configure.·
univ.i: Replace ../ib_config.h with config.h.
r777:
Remove unused code.
univ.i: Do not #define YYDEBUG, because it is only useful for debugging
the grammar of the Bison-generated InnoDB SQL parser.
storage/innobase/include/ut0byte.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ut0rnd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/lock/lock0lock.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0recv.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mem/mem0pool.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0mtr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0file.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/os/os0thread.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/page/page0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/page/page0page.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r762:
page_validate(): Add missing space to error print, for real this time,
following an error in r761.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/pars/pars0opt.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/pars/pars0pars.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/que/que0que.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/read/read0read.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/rem/rem0cmp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/rem/rem0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0ins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0mysql.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0row.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/row/row0sel.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0uins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0umod.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0upd.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0vers.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/srv/srv0srv.c:
Applied InnoDB 5.1 snapshot ss787.
r741:
srv_master_thread(): Add OS_THREAD_DUMMY_RETURN to get rid of a compiler
warning "no return value from a function returning non-void".
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r780:
Add a warning comment above the place where we set srv_main_thread_op_info
to "waiting for server activity" that mentions that this string should not
be changed.
storage/innobase/srv/srv0start.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0arr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0rw.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/sync/sync0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/thr/thr0loc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0roll.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0rseg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0sys.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0trx.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0byte.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/ut/ut0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0ut.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0vec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0wqueue.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
2006-09-05 03:52:15 +02:00
|
|
|
- DATA_N_SYS_COLS + sys);
|
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 09:39:09 +02:00
|
|
|
ut_ad(col->mtype == DATA_SYS);
|
|
|
|
ut_ad(col->prtype == (sys | DATA_NOT_NULL));
|
2001-02-17 13:19:19 +01:00
|
|
|
|
|
|
|
return(col);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the given system column number of a table. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_table_get_sys_col_no(
|
|
|
|
/*======================*/
|
|
|
|
/* out: column number */
|
|
|
|
dict_table_t* table, /* in: table */
|
|
|
|
ulint sys) /* in: DATA_ROW_ID, ... */
|
|
|
|
{
|
|
|
|
ut_ad(table);
|
|
|
|
ut_ad(sys < DATA_N_SYS_COLS);
|
|
|
|
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
|
|
|
|
|
|
|
|
return(table->n_cols - DATA_N_SYS_COLS + sys);
|
|
|
|
}
|
|
|
|
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
/************************************************************************
|
|
|
|
Check whether the table uses the compact page format. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ibool
|
|
|
|
dict_table_is_comp(
|
|
|
|
/*===============*/
|
|
|
|
/* out: TRUE if table uses the
|
|
|
|
compact page format */
|
|
|
|
const dict_table_t* table) /* in: table */
|
|
|
|
{
|
|
|
|
ut_ad(table);
|
|
|
|
|
|
|
|
#if DICT_TF_COMPACT != TRUE
|
|
|
|
#error
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return(UNIV_LIKELY(table->flags & DICT_TF_COMPACT));
|
|
|
|
}
|
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
/************************************************************************
|
|
|
|
Gets the number of fields in the internal representation of an index,
|
|
|
|
including fields added by the dictionary system. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_fields(
|
|
|
|
/*====================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index) /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
{
|
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
return(index->n_fields);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of fields in the internal representation of an index
|
|
|
|
that uniquely determine the position of an index entry in the index, if
|
|
|
|
we do not take multiversioning into account: in the B-tree use the value
|
|
|
|
returned by dict_index_get_n_unique_in_tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_unique(
|
|
|
|
/*====================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index) /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
{
|
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
|
|
|
ut_ad(index->cached);
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
return(index->n_uniq);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of fields in the internal representation of an index
|
|
|
|
which uniquely determine the position of an index entry in the index, if
|
|
|
|
we also take multiversioning into account. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_unique_in_tree(
|
|
|
|
/*============================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index) /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
{
|
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
|
|
|
ut_ad(index->cached);
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
if (index->type & DICT_CLUSTERED) {
|
|
|
|
|
|
|
|
return(dict_index_get_n_unique(index));
|
|
|
|
}
|
|
|
|
|
|
|
|
return(dict_index_get_n_fields(index));
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the number of user-defined ordering fields in the index. In the internal
|
|
|
|
representation of clustered indexes we add the row id to the ordering fields
|
|
|
|
to make a clustered index unique, but this function returns the number of
|
|
|
|
fields the user defined in the index as ordering fields. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_n_ordering_defined_by_user(
|
|
|
|
/*======================================*/
|
|
|
|
/* out: number of fields */
|
|
|
|
dict_index_t* index) /* in: an internal representation of index
|
|
|
|
(in the dictionary cache) */
|
|
|
|
{
|
|
|
|
return(index->n_user_defined_cols);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the nth field of an index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_field_t*
|
|
|
|
dict_index_get_nth_field(
|
|
|
|
/*=====================*/
|
|
|
|
/* out: pointer to field object */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint pos) /* in: position of field */
|
|
|
|
{
|
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(pos < index->n_def);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
|
|
|
|
|
|
|
return((index->fields) + pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Returns the position of a system column in an index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_sys_col_pos(
|
|
|
|
/*=======================*/
|
|
|
|
/* out: position, ULINT_UNDEFINED if not
|
|
|
|
contained */
|
|
|
|
dict_index_t* index, /* in: index */
|
|
|
|
ulint type) /* in: DATA_ROW_ID, ... */
|
|
|
|
{
|
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
|
|
|
ut_ad(!(index->type & DICT_UNIVERSAL));
|
|
|
|
|
|
|
|
if (index->type & DICT_CLUSTERED) {
|
|
|
|
|
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 09:39:09 +02:00
|
|
|
return(dict_col_get_clust_pos(
|
|
|
|
dict_table_get_sys_col(index->table, type),
|
|
|
|
index));
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
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 09:39:09 +02:00
|
|
|
return(dict_index_get_nth_col_pos(
|
|
|
|
index, dict_table_get_sys_col_no(index->table, type)));
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the field column. */
|
|
|
|
UNIV_INLINE
|
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 09:39:09 +02:00
|
|
|
const dict_col_t*
|
2001-02-17 13:19:19 +01:00
|
|
|
dict_field_get_col(
|
|
|
|
/*===============*/
|
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 09:39:09 +02:00
|
|
|
const dict_field_t* field)
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
|
|
|
ut_ad(field);
|
|
|
|
|
|
|
|
return(field->col);
|
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
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 09:39:09 +02:00
|
|
|
Gets pointer to the nth column in an index. */
|
2001-02-17 13:19:19 +01:00
|
|
|
UNIV_INLINE
|
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 09:39:09 +02:00
|
|
|
const dict_col_t*
|
|
|
|
dict_index_get_nth_col(
|
|
|
|
/*===================*/
|
|
|
|
/* out: column */
|
|
|
|
const dict_index_t* index, /* in: index */
|
|
|
|
ulint pos) /* in: position of the field */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
return(dict_field_get_col(dict_index_get_nth_field((dict_index_t*)
|
|
|
|
index, pos)));
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Gets the column number the nth field in an index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
|
|
|
dict_index_get_nth_col_no(
|
|
|
|
/*======================*/
|
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 09:39:09 +02:00
|
|
|
/* out: column number */
|
|
|
|
const dict_index_t* index, /* in: index */
|
|
|
|
ulint pos) /* in: position of the field */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
return(dict_col_get_no(dict_index_get_nth_col(index, pos)));
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the space id of the root of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
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 09:39:09 +02:00
|
|
|
dict_index_get_space(
|
|
|
|
/*=================*/
|
2001-02-17 13:19:19 +01:00
|
|
|
/* out: space id */
|
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 09:39:09 +02:00
|
|
|
dict_index_t* index) /* in: index */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
return(index->space);
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Sets the space id of the root of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
void
|
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 09:39:09 +02:00
|
|
|
dict_index_set_space(
|
|
|
|
/*=================*/
|
|
|
|
dict_index_t* index, /* in: index */
|
2001-02-17 13:19:19 +01:00
|
|
|
ulint space) /* in: space id */
|
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
index->space = space;
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the page number of the root of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
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 09:39:09 +02:00
|
|
|
dict_index_get_page(
|
|
|
|
/*================*/
|
2001-02-17 13:19:19 +01:00
|
|
|
/* out: page number */
|
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 09:39:09 +02:00
|
|
|
dict_index_t* index) /* in: index */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
return(index->page);
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Sets the page number of the root of index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
void
|
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 09:39:09 +02:00
|
|
|
dict_index_set_page(
|
|
|
|
/*================*/
|
|
|
|
dict_index_t* index, /* in: index */
|
2001-02-17 13:19:19 +01:00
|
|
|
ulint page) /* in: page number */
|
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
index->page = page;
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the type of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
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 09:39:09 +02:00
|
|
|
dict_index_get_type(
|
|
|
|
/*================*/
|
2001-02-17 13:19:19 +01:00
|
|
|
/* out: type */
|
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 09:39:09 +02:00
|
|
|
dict_index_t* index) /* in: index */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
return(index->type);
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
Gets the read-write lock of the index tree. */
|
|
|
|
UNIV_INLINE
|
|
|
|
rw_lock_t*
|
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 09:39:09 +02:00
|
|
|
dict_index_get_lock(
|
|
|
|
/*================*/
|
2001-02-17 13:19:19 +01:00
|
|
|
/* out: read-write lock */
|
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 09:39:09 +02:00
|
|
|
dict_index_t* index) /* in: index */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
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 09:39:09 +02:00
|
|
|
ut_ad(index);
|
|
|
|
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
|
2001-02-17 13:19:19 +01:00
|
|
|
|
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 09:39:09 +02:00
|
|
|
return(&(index->lock));
|
2001-02-17 13:19:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
Returns free space reserved for future updates of records. This is
|
|
|
|
relevant only in the case of many consecutive inserts, as updates
|
|
|
|
which make the records bigger might fragment the index. */
|
|
|
|
UNIV_INLINE
|
|
|
|
ulint
|
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 09:39:09 +02:00
|
|
|
dict_index_get_space_reserve(void)
|
|
|
|
/*==============================*/
|
2001-02-17 13:19:19 +01:00
|
|
|
/* out: number of free bytes on page,
|
|
|
|
reserved for updates */
|
|
|
|
{
|
|
|
|
return(UNIV_PAGE_SIZE / 16);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
2001-10-10 21:47:08 +02:00
|
|
|
Checks if a table is in the dictionary cache. */
|
2001-02-17 13:19:19 +01:00
|
|
|
UNIV_INLINE
|
|
|
|
dict_table_t*
|
2001-10-10 21:47:08 +02:00
|
|
|
dict_table_check_if_in_cache_low(
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
/*=============================*/
|
2004-05-17 13:40:31 +02:00
|
|
|
/* out: table, NULL if not found */
|
|
|
|
const char* table_name) /* in: table name */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
|
|
|
dict_table_t* table;
|
|
|
|
ulint table_fold;
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
ut_ad(table_name);
|
|
|
|
ut_ad(mutex_own(&(dict_sys->mutex)));
|
2004-03-12 16:14:51 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
/* Look for the table name in the hash table */
|
|
|
|
table_fold = ut_fold_string(table_name);
|
|
|
|
|
|
|
|
HASH_SEARCH(name_hash, dict_sys->table_hash, table_fold, table,
|
Applied InnoDB 5.1 snapshot ss787.
Bugs fixed:
- Bug #20791 valgrind errors in InnoDB
Remove Valgrind warning of Bug #20791 : in new database
creation, we read the doublewrite buffer magic number from
uninitialized memory; the code worked because it was extremely
unlikely that the memory would contain the magic number
- Bug #21784 DROP TABLE crashes 5.1.12-pre if concurrent
queries on the table
remove update_thd() in ::store_lock()
Also includes numerous coding style fixes, etc. See file-level
comments for details.
sql/ha_innodb.cc:
Applied InnoDB 5.1 snapshot ss787.
r755:
Merge a patch from MySQL AB (Mats Kindal):
Lock and unlock prepare_commit_mutex under the same conditions.
r782:
Fix bug #21784 of a crash in DROP TABLE with concurrent queries on the table
storage/innobase/Makefile.am:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)
This patch removes need for a innodb to have its own configure.
storage/innobase/btr/btr0btr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0pcur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0sea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/buf/buf0buf.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0flu.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0lru.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/buf/buf0rea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0data.c:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0type.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0boot.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0crea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0dict.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/dict/dict0load.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/dict/dict0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/eval/eval0eval.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/eval/eval0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/fil/fil0fil.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fsp/fsp0fsp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fut/fut0lst.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ha/ha0ha.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ibuf/ibuf0ibuf.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/btr0btr.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0pcur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0flu.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0rea.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0data.h:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
storage/innobase/include/data0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0type.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0boot.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0dict.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0mem.h:
Applied InnoDB 5.1 snapshot ss787.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/include/eval0eval.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/fut0lst.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ibuf0ibuf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/lock0lock.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0recv.h:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
storage/innobase/include/mach0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mem0mem.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/mtr0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mtr0mtr.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/os0file.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0page.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/include/que0que.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/read0read.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0cmp.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/row0mysql.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0purge.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0row.h:
Applied InnoDB 5.1 snapshot ss787.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/include/row0row.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0upd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rseg.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0sys.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0trx.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0trx.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0xa.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/univ.i:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)·
This patch removes need for a innodb to have its own configure.·
univ.i: Replace ../ib_config.h with config.h.
r777:
Remove unused code.
univ.i: Do not #define YYDEBUG, because it is only useful for debugging
the grammar of the Bison-generated InnoDB SQL parser.
storage/innobase/include/ut0byte.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ut0rnd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/lock/lock0lock.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0recv.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mem/mem0pool.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0mtr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0file.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/os/os0thread.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/page/page0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/page/page0page.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r762:
page_validate(): Add missing space to error print, for real this time,
following an error in r761.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/pars/pars0opt.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/pars/pars0pars.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/que/que0que.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/read/read0read.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/rem/rem0cmp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/rem/rem0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0ins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0mysql.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0row.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/row/row0sel.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0uins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0umod.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0upd.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0vers.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/srv/srv0srv.c:
Applied InnoDB 5.1 snapshot ss787.
r741:
srv_master_thread(): Add OS_THREAD_DUMMY_RETURN to get rid of a compiler
warning "no return value from a function returning non-void".
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r780:
Add a warning comment above the place where we set srv_main_thread_op_info
to "waiting for server activity" that mentions that this string should not
be changed.
storage/innobase/srv/srv0start.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0arr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0rw.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/sync/sync0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/thr/thr0loc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0roll.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0rseg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0sys.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0trx.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0byte.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/ut/ut0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0ut.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0vec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0wqueue.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
2006-09-05 03:52:15 +02:00
|
|
|
ut_strcmp(table->name, table_name) == 0);
|
2001-10-10 21:47:08 +02:00
|
|
|
return(table);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Gets a table; loads it to the dictionary cache if necessary. A low-level
|
|
|
|
function. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_get_low(
|
|
|
|
/*===============*/
|
2004-05-17 13:40:31 +02:00
|
|
|
/* out: table, NULL if not found */
|
|
|
|
const char* table_name) /* in: table name */
|
2001-10-10 21:47:08 +02:00
|
|
|
{
|
|
|
|
dict_table_t* table;
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-10-10 21:47:08 +02:00
|
|
|
ut_ad(table_name);
|
|
|
|
ut_ad(mutex_own(&(dict_sys->mutex)));
|
2004-03-12 16:14:51 +01:00
|
|
|
|
2001-10-10 21:47:08 +02:00
|
|
|
table = dict_table_check_if_in_cache_low(table_name);
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
if (table == NULL) {
|
|
|
|
table = dict_load_table(table_name);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(table);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
Applied innodb-5.1-ss594 snapshot.
Fixed BUG#19542 "InnoDB doesn't increase the Handler_read_prev couter".
Fixed BUG#19609 "Case sensitivity of innodb_data_file_path gives stupid error".
Fixed BUG#19727 "InnoDB crashed server and crashed tables are ot recoverable".
Also:
* Remove remnants of the obsolete concept of memoryfixing tables and indexes.
* Remove unused dict_table_LRU_trim().
* Remove unused 'trx' parameter from dict_table_get_on_id_low(),
dict_table_get(), dict_table_get_and_increment_handle_count().
* Add a normal linked list implementation.
* Add a work queue implementation.
* Add 'level' parameter to mutex_create() and rw_lock_create().
Remove mutex_set_level() and rw_lock_set_level().
* Rename SYNC_LEVEL_NONE to SYNC_LEVEL_VARYING.
* Add support for bound ids in InnoDB's parser.
* Define UNIV_BTR_DEBUG for enabling consistency checks of
FIL_PAGE_NEXT and FIL_PAGE_PREV when accessing sibling
pages of B-tree indexes.
btr_validate_level(): Check the validity of the doubly linked
list formed by FIL_PAGE_NEXT and FIL_PAGE_PREV.
* Adapt InnoDB to the new tablename to filename encoding in MySQL 5.1.
ut_print_name(), ut_print_name1(): Add parameter 'table_id' for
distinguishing names of tables from other identifiers.
New: innobase_convert_from_table_id(), innobase_convert_from_id(),
innobase_convert_from_filename(), innobase_get_charset.
dict_accept(), dict_scan_id(), dict_scan_col(), dict_scan_table_name(),
dict_skip_word(), dict_create_foreign_constraints_low(): Add
parameter 'cs' so that isspace() can be replaced with my_isspace(),
whose operation depends on the connection character set.
dict_scan_id(): Convert identifier to UTF-8.
dict_str_starts_with_keyword(): New extern function, to replace
dict_accept() in row_search_for_mysql().
mysql_get_identifier_quote_char(): Replaced with innobase_print_identifier().
ha_innobase::create(): Remove the thd->convert_strin() call. Pass the
statement to InnoDB in the connection character set and let InnoDB
convert the identifier to UTF-8.
* Add max_row_size to dict_table_t.
* btr0cur.c
btr_copy_externally_stored_field(): Only set the 'offset' variable
when needed.
* buf0buf.c
buf_page_io_complete(): Write to the error log if the page number or
the space id o the disk do not match those in memory. Also write to
the error log if a page was read from the doublewrite buffer. The
doublewrite buffer should be only read by the lower-level function
fil_io() at database startup.
* dict0dict.c
dict_scan_table_name(): Remove fallback to differently encoded name
when the table is not found. The encoding is handled at a higher level.
* ha_innodb.cc
Increment statistic counter in ha_innobase::index_prev() (bug 19542).
Add innobase_convert_string wrapper function and a new file
ha_prototypes.h.
innobase_print_identifier(): Remove TODO comment before calling
get_quote_char_for_identifier(). That function apparently assumes
the identifier to be encoded in UTF-8.
* ibuf0ibuf.c|h
ibuf_count_get(), ibuf_counts[], ibuf_count_inited(): Define these
only #ifdef UNIV_IBUF_DEBUG. Previously, when compiled without
UNIV_IBUF_DEBUG, invoking ibuf_count_get() would crash InnoDB.
The function is only being called #ifdef UNIV_IBUF_DEBUG.
* innodb.result
Adjust the results for changes in the foreign key error messages.
* mem0mem.c|h
New: mem_heap_dup(), mem_heap_printf(), mem_heap_cat().
* os0file.c
Check the page trailers also after writing to disk. This improves
chances of diagnosing bug 18886.
os_file_check_page_trailers(): New function for checking that the
two copies of the LSN stamped on the page match.
os_aio_simulated_handle(): Call os_file_check_page_trailers()
before and after os_file_write().
* row0mysql.c
Move trx_commit_for_mysql(trx) calls before calls to
row_mysql_unlock_data_dictionary(trx) (bug 19727).
* row0sel.c
row_fetch_print(): Handle SQL NULL values without crashing.
row_sel_store_mysql_rec(): Remove useless call to rec_get_nth_field
when handling an externally stored column.
Fetch externally stored fields when using InnoDB's internal SQL
parser.
Optimize BLOB selects by using prebuilt->blob_heap directly instead
of first reading BLOB data to a temporary heap and then copying it
to prebuilt->blob_heap.
* srv0srv.c
srv_master_thread(): Remove unreachable code.
* srv0start.c
srv_parse_data_file_paths_and_sizes(): Accept lower-case 'm' and
'g' as abbreviations of megabyte and gigabyte (bug 19609).
srv_parse_megabytes(): New fuction.
* ut0dbg.c|h
Implement InnoDB assertions (ut_a and ut_error) with abort() when
the code is compiled with GCC 3 or later on other platforms than
Windows or Netware. Also disable the variable ut_dbg_stop_threads
and the function ut_dbg_stop_thread() i this case, unless
UNIV_SYC_DEBUG is defined. This should allow the compiler to
generate more compact code for assertions.
* ut0list.c|h
Add ib_list_create_heap().
mysql-test/r/innodb.result:
Applied innodb-5.1-ss594 snapshot.
mysql-test/t/innodb.test:
Copy the comment from the beginning of the file
to the end because MySQL developers continue
adding test cases to this file.
sql/ha_innodb.cc:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/CMakeLists.txt:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/Makefile.am:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/Makefile.am:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ha_prototypes.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0list.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0list.ic:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0wqueue.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0list.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0wqueue.c:
Applied innodb-5.1-ss594 snapshot.
2006-06-01 08:34:04 +02:00
|
|
|
Returns a table object based on table id. */
|
2001-02-17 13:19:19 +01:00
|
|
|
UNIV_INLINE
|
|
|
|
dict_table_t*
|
|
|
|
dict_table_get_on_id_low(
|
|
|
|
/*=====================*/
|
|
|
|
/* out: table, NULL if does not exist */
|
Applied innodb-5.1-ss594 snapshot.
Fixed BUG#19542 "InnoDB doesn't increase the Handler_read_prev couter".
Fixed BUG#19609 "Case sensitivity of innodb_data_file_path gives stupid error".
Fixed BUG#19727 "InnoDB crashed server and crashed tables are ot recoverable".
Also:
* Remove remnants of the obsolete concept of memoryfixing tables and indexes.
* Remove unused dict_table_LRU_trim().
* Remove unused 'trx' parameter from dict_table_get_on_id_low(),
dict_table_get(), dict_table_get_and_increment_handle_count().
* Add a normal linked list implementation.
* Add a work queue implementation.
* Add 'level' parameter to mutex_create() and rw_lock_create().
Remove mutex_set_level() and rw_lock_set_level().
* Rename SYNC_LEVEL_NONE to SYNC_LEVEL_VARYING.
* Add support for bound ids in InnoDB's parser.
* Define UNIV_BTR_DEBUG for enabling consistency checks of
FIL_PAGE_NEXT and FIL_PAGE_PREV when accessing sibling
pages of B-tree indexes.
btr_validate_level(): Check the validity of the doubly linked
list formed by FIL_PAGE_NEXT and FIL_PAGE_PREV.
* Adapt InnoDB to the new tablename to filename encoding in MySQL 5.1.
ut_print_name(), ut_print_name1(): Add parameter 'table_id' for
distinguishing names of tables from other identifiers.
New: innobase_convert_from_table_id(), innobase_convert_from_id(),
innobase_convert_from_filename(), innobase_get_charset.
dict_accept(), dict_scan_id(), dict_scan_col(), dict_scan_table_name(),
dict_skip_word(), dict_create_foreign_constraints_low(): Add
parameter 'cs' so that isspace() can be replaced with my_isspace(),
whose operation depends on the connection character set.
dict_scan_id(): Convert identifier to UTF-8.
dict_str_starts_with_keyword(): New extern function, to replace
dict_accept() in row_search_for_mysql().
mysql_get_identifier_quote_char(): Replaced with innobase_print_identifier().
ha_innobase::create(): Remove the thd->convert_strin() call. Pass the
statement to InnoDB in the connection character set and let InnoDB
convert the identifier to UTF-8.
* Add max_row_size to dict_table_t.
* btr0cur.c
btr_copy_externally_stored_field(): Only set the 'offset' variable
when needed.
* buf0buf.c
buf_page_io_complete(): Write to the error log if the page number or
the space id o the disk do not match those in memory. Also write to
the error log if a page was read from the doublewrite buffer. The
doublewrite buffer should be only read by the lower-level function
fil_io() at database startup.
* dict0dict.c
dict_scan_table_name(): Remove fallback to differently encoded name
when the table is not found. The encoding is handled at a higher level.
* ha_innodb.cc
Increment statistic counter in ha_innobase::index_prev() (bug 19542).
Add innobase_convert_string wrapper function and a new file
ha_prototypes.h.
innobase_print_identifier(): Remove TODO comment before calling
get_quote_char_for_identifier(). That function apparently assumes
the identifier to be encoded in UTF-8.
* ibuf0ibuf.c|h
ibuf_count_get(), ibuf_counts[], ibuf_count_inited(): Define these
only #ifdef UNIV_IBUF_DEBUG. Previously, when compiled without
UNIV_IBUF_DEBUG, invoking ibuf_count_get() would crash InnoDB.
The function is only being called #ifdef UNIV_IBUF_DEBUG.
* innodb.result
Adjust the results for changes in the foreign key error messages.
* mem0mem.c|h
New: mem_heap_dup(), mem_heap_printf(), mem_heap_cat().
* os0file.c
Check the page trailers also after writing to disk. This improves
chances of diagnosing bug 18886.
os_file_check_page_trailers(): New function for checking that the
two copies of the LSN stamped on the page match.
os_aio_simulated_handle(): Call os_file_check_page_trailers()
before and after os_file_write().
* row0mysql.c
Move trx_commit_for_mysql(trx) calls before calls to
row_mysql_unlock_data_dictionary(trx) (bug 19727).
* row0sel.c
row_fetch_print(): Handle SQL NULL values without crashing.
row_sel_store_mysql_rec(): Remove useless call to rec_get_nth_field
when handling an externally stored column.
Fetch externally stored fields when using InnoDB's internal SQL
parser.
Optimize BLOB selects by using prebuilt->blob_heap directly instead
of first reading BLOB data to a temporary heap and then copying it
to prebuilt->blob_heap.
* srv0srv.c
srv_master_thread(): Remove unreachable code.
* srv0start.c
srv_parse_data_file_paths_and_sizes(): Accept lower-case 'm' and
'g' as abbreviations of megabyte and gigabyte (bug 19609).
srv_parse_megabytes(): New fuction.
* ut0dbg.c|h
Implement InnoDB assertions (ut_a and ut_error) with abort() when
the code is compiled with GCC 3 or later on other platforms than
Windows or Netware. Also disable the variable ut_dbg_stop_threads
and the function ut_dbg_stop_thread() i this case, unless
UNIV_SYC_DEBUG is defined. This should allow the compiler to
generate more compact code for assertions.
* ut0list.c|h
Add ib_list_create_heap().
mysql-test/r/innodb.result:
Applied innodb-5.1-ss594 snapshot.
mysql-test/t/innodb.test:
Copy the comment from the beginning of the file
to the end because MySQL developers continue
adding test cases to this file.
sql/ha_innodb.cc:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/CMakeLists.txt:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/Makefile.am:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/Makefile.am:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ha_prototypes.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0list.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0list.ic:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/include/ut0wqueue.h:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0list.c:
Applied innodb-5.1-ss594 snapshot.
storage/innobase/ut/ut0wqueue.c:
Applied innodb-5.1-ss594 snapshot.
2006-06-01 08:34:04 +02:00
|
|
|
dulint table_id) /* in: table id */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
|
|
|
dict_table_t* table;
|
|
|
|
ulint fold;
|
|
|
|
|
2001-10-10 21:47:08 +02:00
|
|
|
ut_ad(mutex_own(&(dict_sys->mutex)));
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
/* Look for the table name in the hash table */
|
|
|
|
fold = ut_fold_dulint(table_id);
|
|
|
|
|
|
|
|
HASH_SEARCH(id_hash, dict_sys->table_id_hash, fold, table,
|
Applied InnoDB 5.1 snapshot ss787.
Bugs fixed:
- Bug #20791 valgrind errors in InnoDB
Remove Valgrind warning of Bug #20791 : in new database
creation, we read the doublewrite buffer magic number from
uninitialized memory; the code worked because it was extremely
unlikely that the memory would contain the magic number
- Bug #21784 DROP TABLE crashes 5.1.12-pre if concurrent
queries on the table
remove update_thd() in ::store_lock()
Also includes numerous coding style fixes, etc. See file-level
comments for details.
sql/ha_innodb.cc:
Applied InnoDB 5.1 snapshot ss787.
r755:
Merge a patch from MySQL AB (Mats Kindal):
Lock and unlock prepare_commit_mutex under the same conditions.
r782:
Fix bug #21784 of a crash in DROP TABLE with concurrent queries on the table
storage/innobase/Makefile.am:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)
This patch removes need for a innodb to have its own configure.
storage/innobase/btr/btr0btr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0pcur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0sea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/buf/buf0buf.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0flu.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0lru.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/buf/buf0rea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0data.c:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0type.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0boot.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0crea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0dict.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/dict/dict0load.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/dict/dict0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/eval/eval0eval.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/eval/eval0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/fil/fil0fil.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fsp/fsp0fsp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fut/fut0lst.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ha/ha0ha.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ibuf/ibuf0ibuf.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/btr0btr.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0pcur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0flu.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0rea.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0data.h:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
storage/innobase/include/data0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0type.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0boot.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0dict.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0mem.h:
Applied InnoDB 5.1 snapshot ss787.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/include/eval0eval.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/fut0lst.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ibuf0ibuf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/lock0lock.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0recv.h:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
storage/innobase/include/mach0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mem0mem.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/mtr0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mtr0mtr.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/os0file.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0page.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/include/que0que.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/read0read.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0cmp.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/row0mysql.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0purge.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0row.h:
Applied InnoDB 5.1 snapshot ss787.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/include/row0row.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0upd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rseg.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0sys.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0trx.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0trx.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0xa.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/univ.i:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)·
This patch removes need for a innodb to have its own configure.·
univ.i: Replace ../ib_config.h with config.h.
r777:
Remove unused code.
univ.i: Do not #define YYDEBUG, because it is only useful for debugging
the grammar of the Bison-generated InnoDB SQL parser.
storage/innobase/include/ut0byte.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ut0rnd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/lock/lock0lock.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0recv.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mem/mem0pool.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0mtr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0file.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/os/os0thread.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/page/page0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/page/page0page.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r762:
page_validate(): Add missing space to error print, for real this time,
following an error in r761.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/pars/pars0opt.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/pars/pars0pars.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/que/que0que.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/read/read0read.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/rem/rem0cmp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/rem/rem0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0ins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0mysql.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0row.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/row/row0sel.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0uins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0umod.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0upd.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0vers.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/srv/srv0srv.c:
Applied InnoDB 5.1 snapshot ss787.
r741:
srv_master_thread(): Add OS_THREAD_DUMMY_RETURN to get rid of a compiler
warning "no return value from a function returning non-void".
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r780:
Add a warning comment above the place where we set srv_main_thread_op_info
to "waiting for server activity" that mentions that this string should not
be changed.
storage/innobase/srv/srv0start.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0arr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0rw.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/sync/sync0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/thr/thr0loc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0roll.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0rseg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0sys.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0trx.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0byte.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/ut/ut0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0ut.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0vec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0wqueue.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
2006-09-05 03:52:15 +02:00
|
|
|
ut_dulint_cmp(table->id, table_id) == 0);
|
2001-02-17 13:19:19 +01:00
|
|
|
if (table == NULL) {
|
|
|
|
table = dict_load_table_on_id(table_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* TODO: should get the type information from MySQL */
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
return(table);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
Returns an index object. */
|
|
|
|
UNIV_INLINE
|
|
|
|
dict_index_t*
|
|
|
|
dict_table_get_index(
|
|
|
|
/*=================*/
|
|
|
|
/* out: index, NULL if does not exist */
|
|
|
|
dict_table_t* table, /* in: table */
|
2004-05-17 13:40:31 +02:00
|
|
|
const char* name) /* in: index name */
|
2001-02-17 13:19:19 +01:00
|
|
|
{
|
|
|
|
dict_index_t* index = NULL;
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
index = dict_table_get_first_index(table);
|
|
|
|
|
|
|
|
while (index != NULL) {
|
|
|
|
if (ut_strcmp(name, index->name) == 0) {
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
index = dict_table_get_next_index(index);
|
Applied innodb-5.1-ss269 snapshot.
Fixed BUGS:
#3300: "UPDATE statement with no index column in where condition locks
all rows"
Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.
ha_innobase::unlock_row(): reset the "did semi consistent read" flag
ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods
row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads
row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions
row_search_for_mysql(): implement semi-consistent reads
#9802: "Foreign key checks disallow alter table".
Added test cases.
#12456: "Cursor shows incorrect data - DML does not affect,
probably caching"
This patch implements a high-granularity read view to be used with
cursors. In this high-granularity consistent read view modifications
done by the creating transaction after the cursor is created or
future transactions are not visible. But those modifications that
transaction did before the cursor was created are visible.
#12701: "Support >4GB buffer pool and log files on 64-bit Windows"
Do not call os_file_create_tmpfile() at runtime. Instead, create all
tempfiles at startup and guard access to them with mutexes.
#13778: "If FOREIGN_KEY_CHECKS=0, one can create inconsistent FOREIGN KEYs".
When FOREIGN_KEY_CHECKS=0 we still need to check that datatypes between
foreign key references are compatible.
#14189: "VARBINARY and BINARY variables: trailing space ignored with InnoDB"
innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.
dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.
row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE when trying
to change the length of a VARBINARY column that refers to or is referenced
by a BINARY column. BINARY columns are no longer padded on comparison,
and thus they cannot be padded on storage either.
#14747: "Race condition can cause btr_search_drop_page_hash_index() to crash"
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
#15108: "mysqld crashes when innodb_log_file_size is set > 4G"
#15308: "Problem of Order with Enum Column in Primary Key"
#15550: "mysqld crashes in printing a FOREIGN KEY error in InnoDB"
row_ins_foreign_report_add_err(): When printing the parent record,
use the index in the parent table rather than the index in the child table.
#15653: "Slow inserts to InnoDB if many thousands of .ibd files"
Keep track on unflushed modifications to file spaces. When there are tens
of thousands of file spaces, flushing all files in fil_flush_file_spaces()
would be very slow.
fil_flush_file_spaces(): Only flush unflushed file spaces.
fil_space_t, fil_system_t: Add a list of unflushed spaces.
#15991: "innodb-file-per-table + symlink database + rename = cr"
os_file_handle_error(): Map the error codes EXDEV, ENOTDIR, and EISDIR
to the new code OS_FILE_PATH_ERROR. Treat this code as OS_FILE_PATH_ERROR.
This fixes the crash on RENAME TABLE when the .ibd file is a symbolic link
to a different file system.
#16157: "InnoDB crashes when main location settings are empty"
This patch is from Heikki.
#16298: "InnoDB segfaults in INSERTs in upgrade of 4.0 -> 5.0 tables
with VARCHAR BINARY"
dict_load_columns(): Set the charset-collation code
DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
that lack a charset-collation code, i.e., the tables were created
with an older version of MySQL/InnoDB than 4.1.2.
#16229: "MySQL/InnoDB uses full explicit table locks in trigger processing"
Take a InnoDB table lock only if user has explicitly requested a table
lock. Added some additional comments to store_lock() and external_lock().
#16387: "InnoDB crash when dropping a foreign key <table>_ibfk_0"
Do not mistake TABLENAME_ibfk_0 for auto-generated id.
dict_table_get_highest_foreign_id(): Ignore foreign constraint
identifiers starting with the pattern TABLENAME_ibfk_0.
#16582: "InnoDB: Error in an adaptive hash index pointer to page"
Account for a race condition when dropping the adaptive hash index
for a B-tree page.
btr_search_drop_page_hash_index(): Retry the operation if a hash index
with different parameters was built meanwhile. Add diagnostics for the
case that hash node pointers to the page remain.
btr_search_info_update_hash(), btr_search_info_update_slow():
Document the parameter "info" as in/out.
#16814: "SHOW INNODB STATUS format error in LATEST FOREIGN KEY ERROR
section"
Add a missing newline to the LAST FOREIGN KEY ERROR section in SHOW
INNODB STATUS output.
dict_foreign_error_report(): Always print a newline after invoking
dict_print_info_on_foreign_key_in_create_format().
#16827: "Better InnoDB error message if ibdata files omitted from my.cnf"
#17126: "CHECK TABLE on InnoDB causes a short hang during check of adaptive
hash"
CHECK TABLE blocking other queries, by releasing the btr_search_latch
periodically during the adaptive hash table validation.
#17405: "Valgrind: conditional jump or move depends on unititialised values"
buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.
mysql-test/r/innodb.result:
Applied innodb-5.1-ss269 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss269 snapshot.
sql/ha_innodb.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0buf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0flu.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/buf/buf0rea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0boot.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/dyn/dyn0dyn.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0eval.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fil/fil0fil.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fsp/fsp0fsp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/fut/fut0lst.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/ha0ha.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ha/hash0hash.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0btr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0pcur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0sea.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/btr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0buf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0flu.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/data0type.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/db0err.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0boot.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0crea.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0load.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/dyn0dyn.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0eval.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/eval0proc.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fil0fil.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fsp0fsp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/fut0lst.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ha0ha.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/hash0hash.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ibuf0ibuf.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/lock0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/log0recv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mach0data.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0dbg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mem0pool.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0log.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/mtr0mtr.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0file.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0proc.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/os0thread.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0cur.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/page0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0opt.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0que.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/que0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/read0read.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0cmp.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/rem0rec.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0ins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0row.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0sel.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0uins.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0umod.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0upd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/row0vers.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0srv.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/srv0start.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0arr.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0rw.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/sync0sync.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0purge.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rec.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0roll.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0rseg.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0sys.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0trx.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0undo.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/trx0xa.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0sess.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/usr0types.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0byte.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0dbg.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0lst.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0mem.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0rnd.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0sort.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/include/ut0ut.ic:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mach/mach0data.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mem/mem0pool.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0log.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/mtr/mtr0mtr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0file.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0proc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/os/os0thread.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0cur.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/page/page0page.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/read/read0read.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0cmp.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/rem/rem0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0row.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0uins.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0umod.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/row/row0vers.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0que.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/srv/srv0start.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/thr/thr0loc.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0purge.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rec.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0roll.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0rseg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0sys.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/trx/trx0undo.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/usr/usr0sess.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0byte.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0dbg.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0rnd.c:
Applied innodb-5.1-ss269 snapshot.
storage/innobase/ut/ut0ut.c:
Applied innodb-5.1-ss269 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
New BitKeeper file ``mysql-test/r/innodb_unsafe_binlog.result''
mysql-test/t/innodb_unsafe_binlog-master.opt:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog-master.opt''
mysql-test/t/innodb_unsafe_binlog.test:
New BitKeeper file ``mysql-test/t/innodb_unsafe_binlog.test''
storage/innobase/pars/make_bison.sh:
New BitKeeper file ``storage/innobase/pars/make_bison.sh''
2006-03-10 17:22:21 +01:00
|
|
|
}
|
|
|
|
|
2001-02-17 13:19:19 +01:00
|
|
|
return(index);
|
|
|
|
}
|