mariadb/include/dict0types.h
marko dc9107df2a Remove dict_tree_t, which should have been removed in r453.
There always was a one-to-one mapping between dict_tree_t and dict_index_t.

This saves 6 machine words per B-tree index in the data dictionary
cache plus the memory allocation overhead.  We save one mem_heap_t
object per index (15 machine words).  Considering the internal
fragmentation of the buddy allocator in mem_area_alloc(), this should
save 32 machine words per index (128 bytes on 32-bit systems and 256
bytes on 64-bit systems).  (Bug #20877)

struct dict_tree_struct, dict_tree_t: Remove.

struct dict_index_struct: Add page and lock.

dict_tree_create(): Remove.  Replace the invocation with
assignment to index->page and a call to rw_lock_create(&index->lock).

dict_tree_free(): Remove.  Replace the invocation wtih
a call to rw_lock_free(&index->lock).

dict_index_get_tree(): Remove.

dict_tree_get_space_reserve(): Rename to dict_index_get_space_reserve()
and remove the parameter, which was unused.

btr_level_list_remove(): Remove the unused parameter "tree".

Replace the occurrences of "tree" with "index" in names of variables,
functions and data types, e.g. "dict_tree_t tree" becomes
"dict_index_t index".  Remove local variables "tree" or "index" of
functions that needed both "tree" and "index".
2006-09-15 11:04:01 +00:00

27 lines
740 B
C

/******************************************************
Data dictionary global types
(c) 1996 Innobase Oy
Created 1/8/1996 Heikki Tuuri
*******************************************************/
#ifndef dict0types_h
#define dict0types_h
typedef struct dict_sys_struct dict_sys_t;
typedef struct dict_col_struct dict_col_t;
typedef struct dict_field_struct dict_field_t;
typedef struct dict_index_struct dict_index_t;
typedef struct dict_table_struct dict_table_t;
typedef struct dict_foreign_struct dict_foreign_t;
/* A cluster object is a table object with the type field set to
DICT_CLUSTERED */
typedef dict_table_t dict_cluster_t;
typedef struct ind_node_struct ind_node_t;
typedef struct tab_node_struct tab_node_t;
#endif