Loading innobase/dict/dict0dict.c +2 −2 Original line number Diff line number Diff line Loading @@ -3536,9 +3536,9 @@ dict_tree_create( tree->id = index->id; UT_LIST_INIT(tree->tree_indexes); #ifdef UNIV_DEBUG tree->magic_n = DICT_TREE_MAGIC_N; #endif /* UNIV_DEBUG */ rw_lock_create(&(tree->lock)); rw_lock_set_level(&(tree->lock), SYNC_INDEX_TREE); Loading innobase/dict/dict0mem.c +4 −2 Original line number Diff line number Diff line Loading @@ -90,9 +90,9 @@ dict_mem_table_create( mutex_set_level(&(table->autoinc_mutex), SYNC_DICT_AUTOINC_MUTEX); table->autoinc_inited = FALSE; #ifdef UNIV_DEBUG table->magic_n = DICT_TABLE_MAGIC_N; #endif /* UNIV_DEBUG */ return(table); } Loading Loading @@ -217,7 +217,9 @@ dict_mem_index_create( index->stat_n_diff_key_vals = NULL; index->cached = FALSE; #ifdef UNIV_DEBUG index->magic_n = DICT_INDEX_MAGIC_N; #endif /* UNIV_DEBUG */ return(index); } Loading innobase/ha/hash0hash.c +6 −32 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ hash_mutex_enter( hash_table_t* table, /* in: hash table */ ulint fold) /* in: fold */ { ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); mutex_enter(hash_get_mutex(table, fold)); } Loading @@ -34,41 +35,10 @@ hash_mutex_exit( hash_table_t* table, /* in: hash table */ ulint fold) /* in: fold */ { ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); mutex_exit(hash_get_mutex(table, fold)); } /**************************************************************** Reserves all the mutexes of a hash table, in an ascending order. */ void hash_mutex_enter_all( /*=================*/ hash_table_t* table) /* in: hash table */ { ulint i; for (i = 0; i < table->n_mutexes; i++) { mutex_enter(table->mutexes + i); } } /**************************************************************** Releases all the mutexes of a hash table. */ void hash_mutex_exit_all( /*================*/ hash_table_t* table) /* in: hash table */ { ulint i; for (i = 0; i < table->n_mutexes; i++) { mutex_exit(table->mutexes + i); } } /***************************************************************** Creates a hash table with >= n array cells. The actual number of cells is chosen to be a prime number slightly bigger than n. */ Loading Loading @@ -97,7 +67,9 @@ hash_create( table->mutexes = NULL; table->heaps = NULL; table->heap = NULL; #ifdef UNIV_DEBUG table->magic_n = HASH_TABLE_MAGIC_N; #endif /* UNIV_DEBUG */ /* Initialize the cell array */ Loading @@ -118,6 +90,7 @@ hash_table_free( /*============*/ hash_table_t* table) /* in, own: hash table */ { ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); ut_a(table->mutexes == NULL); ut_free(table->array); Loading @@ -139,6 +112,7 @@ hash_create_mutexes( ulint i; ut_a(n_mutexes == ut_2_power_up(n_mutexes)); ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); table->mutexes = mem_alloc(n_mutexes * sizeof(mutex_t)); Loading innobase/include/data0data.h +4 −2 Original line number Diff line number Diff line Loading @@ -402,9 +402,11 @@ struct dtuple_struct { UT_LIST_NODE_T(dtuple_t) tuple_list; /* data tuples can be linked into a list using this field */ #ifdef UNIV_DEBUG ulint magic_n; }; #define DATA_TUPLE_MAGIC_N 65478679 #endif /* UNIV_DEBUG */ }; /* A slot for a field in a big rec vector */ Loading innobase/include/dict0mem.h +10 −7 Original line number Diff line number Diff line Loading @@ -198,10 +198,11 @@ struct dict_tree_struct{ the list; if the tree is of the mixed type, the first index in the list is the index of the cluster which owns the tree */ #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ }; #define DICT_TREE_MAGIC_N 7545676 #endif /* UNIV_DEBUG */ }; /* Data structure for an index */ struct dict_index_struct{ Loading Loading @@ -247,7 +248,10 @@ struct dict_index_struct{ ulint stat_n_leaf_pages; /* approximate number of leaf pages in the index tree */ #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ #define DICT_INDEX_MAGIC_N 76789786 #endif /* UNIV_DEBUG */ }; /* Data structure for a foreign key constraint; an example: Loading Loading @@ -298,9 +302,6 @@ a foreign key constraint is enforced, therefore RESTRICT just means no flag */ #define DICT_FOREIGN_ON_DELETE_NO_ACTION 16 #define DICT_FOREIGN_ON_UPDATE_NO_ACTION 32 #define DICT_INDEX_MAGIC_N 76789786 /* Data structure for a database table */ struct dict_table_struct{ dulint id; /* id of the table or cluster */ Loading Loading @@ -413,9 +414,11 @@ struct dict_table_struct{ SELECT MAX(auto inc column) */ ib_longlong autoinc;/* autoinc counter value to give to the next inserted row */ #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ }; #define DICT_TABLE_MAGIC_N 76333786 #endif /* UNIV_DEBUG */ }; /* Data structure for a stored procedure */ struct dict_proc_struct{ Loading Loading
innobase/dict/dict0dict.c +2 −2 Original line number Diff line number Diff line Loading @@ -3536,9 +3536,9 @@ dict_tree_create( tree->id = index->id; UT_LIST_INIT(tree->tree_indexes); #ifdef UNIV_DEBUG tree->magic_n = DICT_TREE_MAGIC_N; #endif /* UNIV_DEBUG */ rw_lock_create(&(tree->lock)); rw_lock_set_level(&(tree->lock), SYNC_INDEX_TREE); Loading
innobase/dict/dict0mem.c +4 −2 Original line number Diff line number Diff line Loading @@ -90,9 +90,9 @@ dict_mem_table_create( mutex_set_level(&(table->autoinc_mutex), SYNC_DICT_AUTOINC_MUTEX); table->autoinc_inited = FALSE; #ifdef UNIV_DEBUG table->magic_n = DICT_TABLE_MAGIC_N; #endif /* UNIV_DEBUG */ return(table); } Loading Loading @@ -217,7 +217,9 @@ dict_mem_index_create( index->stat_n_diff_key_vals = NULL; index->cached = FALSE; #ifdef UNIV_DEBUG index->magic_n = DICT_INDEX_MAGIC_N; #endif /* UNIV_DEBUG */ return(index); } Loading
innobase/ha/hash0hash.c +6 −32 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ hash_mutex_enter( hash_table_t* table, /* in: hash table */ ulint fold) /* in: fold */ { ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); mutex_enter(hash_get_mutex(table, fold)); } Loading @@ -34,41 +35,10 @@ hash_mutex_exit( hash_table_t* table, /* in: hash table */ ulint fold) /* in: fold */ { ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); mutex_exit(hash_get_mutex(table, fold)); } /**************************************************************** Reserves all the mutexes of a hash table, in an ascending order. */ void hash_mutex_enter_all( /*=================*/ hash_table_t* table) /* in: hash table */ { ulint i; for (i = 0; i < table->n_mutexes; i++) { mutex_enter(table->mutexes + i); } } /**************************************************************** Releases all the mutexes of a hash table. */ void hash_mutex_exit_all( /*================*/ hash_table_t* table) /* in: hash table */ { ulint i; for (i = 0; i < table->n_mutexes; i++) { mutex_exit(table->mutexes + i); } } /***************************************************************** Creates a hash table with >= n array cells. The actual number of cells is chosen to be a prime number slightly bigger than n. */ Loading Loading @@ -97,7 +67,9 @@ hash_create( table->mutexes = NULL; table->heaps = NULL; table->heap = NULL; #ifdef UNIV_DEBUG table->magic_n = HASH_TABLE_MAGIC_N; #endif /* UNIV_DEBUG */ /* Initialize the cell array */ Loading @@ -118,6 +90,7 @@ hash_table_free( /*============*/ hash_table_t* table) /* in, own: hash table */ { ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); ut_a(table->mutexes == NULL); ut_free(table->array); Loading @@ -139,6 +112,7 @@ hash_create_mutexes( ulint i; ut_a(n_mutexes == ut_2_power_up(n_mutexes)); ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); table->mutexes = mem_alloc(n_mutexes * sizeof(mutex_t)); Loading
innobase/include/data0data.h +4 −2 Original line number Diff line number Diff line Loading @@ -402,9 +402,11 @@ struct dtuple_struct { UT_LIST_NODE_T(dtuple_t) tuple_list; /* data tuples can be linked into a list using this field */ #ifdef UNIV_DEBUG ulint magic_n; }; #define DATA_TUPLE_MAGIC_N 65478679 #endif /* UNIV_DEBUG */ }; /* A slot for a field in a big rec vector */ Loading
innobase/include/dict0mem.h +10 −7 Original line number Diff line number Diff line Loading @@ -198,10 +198,11 @@ struct dict_tree_struct{ the list; if the tree is of the mixed type, the first index in the list is the index of the cluster which owns the tree */ #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ }; #define DICT_TREE_MAGIC_N 7545676 #endif /* UNIV_DEBUG */ }; /* Data structure for an index */ struct dict_index_struct{ Loading Loading @@ -247,7 +248,10 @@ struct dict_index_struct{ ulint stat_n_leaf_pages; /* approximate number of leaf pages in the index tree */ #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ #define DICT_INDEX_MAGIC_N 76789786 #endif /* UNIV_DEBUG */ }; /* Data structure for a foreign key constraint; an example: Loading Loading @@ -298,9 +302,6 @@ a foreign key constraint is enforced, therefore RESTRICT just means no flag */ #define DICT_FOREIGN_ON_DELETE_NO_ACTION 16 #define DICT_FOREIGN_ON_UPDATE_NO_ACTION 32 #define DICT_INDEX_MAGIC_N 76789786 /* Data structure for a database table */ struct dict_table_struct{ dulint id; /* id of the table or cluster */ Loading Loading @@ -413,9 +414,11 @@ struct dict_table_struct{ SELECT MAX(auto inc column) */ ib_longlong autoinc;/* autoinc counter value to give to the next inserted row */ #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ }; #define DICT_TABLE_MAGIC_N 76333786 #endif /* UNIV_DEBUG */ }; /* Data structure for a stored procedure */ struct dict_proc_struct{ Loading