diff options
author | unknown <marko@hundin.mysql.fi> | 2004-03-11 23:12:02 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-03-11 23:12:02 +0200 |
commit | edc17c009ab4d61495fd506cea58f1cf77bb06e9 (patch) | |
tree | 148175ce29b93ab6acaa2a1ca244b9b09575a98a /innobase/include/dict0mem.h | |
parent | cb9f304897564f0eb0c76b6cd155a337fac34b19 (diff) | |
download | mariadb-git-edc17c009ab4d61495fd506cea58f1cf77bb06e9.tar.gz |
More consistent handling of magic numbers
innobase/include/data0data.h:
dtuple_struct:magic_n: Enclose in #ifdef UNIV_DEBUG
innobase/dict/dict0dict.c:
Use magic_n only #ifdef UNIV_DEBUG
innobase/dict/dict0mem.c:
Use magic_n only #ifdef UNIV_DEBUG
innobase/ha/hash0hash.c:
Remove unused functions hash_mutex_enter_all and hash_mutex_exit_all
Use magic_n only #ifdef UNIV_DEBUG
Add ut_ad(table->magic_n == HASH_TABLE_MAGIC_N)
innobase/include/dict0mem.h:
Use magic_n only #ifdef UNIV_DEBUG
innobase/include/hash0hash.h:
Remove unused functions hash_mutex_enter_all and hash_mutex_exit_all
Use magic_n only #ifdef UNIV_DEBUG
innobase/include/hash0hash.ic:
Add ut_ad(table->magic_n == HASH_TABLE_MAGIC_N)
innobase/include/mtr0mtr.h:
Use state, magic_n only #ifdef UNIV_DEBUG
innobase/include/row0ins.h:
Use magic_n only #ifdef UNIV_DEBUG
innobase/include/row0upd.h:
Use magic_n only #ifdef UNIV_DEBUG
innobase/row/row0ins.c:
Use magic_n only #ifdef UNIV_DEBUG
Add ut_ad(node->magic_n == INS_NODE_MAGIC_N)
innobase/row/row0upd.c:
Use magic_n only #ifdef UNIV_DEBUG
Add ut_ad(node->magic_n == UPD_NODE_MAGIC_N)
innobase/thr/thr0loc.c:
Use magic_n only #ifdef UNIV_DEBUG
Diffstat (limited to 'innobase/include/dict0mem.h')
-rw-r--r-- | innobase/include/dict0mem.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/innobase/include/dict0mem.h b/innobase/include/dict0mem.h index 03dc913a7c9..1930825f601 100644 --- a/innobase/include/dict0mem.h +++ b/innobase/include/dict0mem.h @@ -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{ @@ -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: @@ -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 */ @@ -412,10 +413,12 @@ struct dict_table_struct{ inited; MySQL gets the init value by executing SELECT MAX(auto inc column) */ ib_longlong autoinc;/* autoinc counter value to give to the - next inserted row */ + 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{ |