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/row | |
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/row')
-rw-r--r-- | innobase/row/row0ins.c | 10 | ||||
-rw-r--r-- | innobase/row/row0upd.c | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index f455eabd2e0..d4947357719 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -80,9 +80,9 @@ ins_node_create( node->trx_id = ut_dulint_zero; node->entry_sys_heap = mem_heap_create(128); - - node->magic_n = INS_NODE_MAGIC_N; - +#ifdef UNIV_DEBUG + node->magic_n = INS_NODE_MAGIC_N; +#endif /* UNIV_DEBUG */ return(node); } @@ -194,6 +194,7 @@ ins_node_set_new_row( ins_node_t* node, /* in: insert node */ dtuple_t* row) /* in: new row (or first row) for the node */ { + ut_ad(node->magic_n == INS_NODE_MAGIC_N); node->state = INS_NODE_SET_IX_LOCK; node->index = NULL; node->entry = NULL; @@ -2031,6 +2032,7 @@ row_ins( ulint err; ut_ad(node && thr); + ut_ad(node->magic_n == INS_NODE_MAGIC_N); if (node->state == INS_NODE_ALLOC_ROW_ID) { @@ -2095,7 +2097,7 @@ row_ins_step( trx_start_if_not_started(trx); node = thr->run_node; - + ut_ad(node->magic_n == INS_NODE_MAGIC_N); ut_ad(que_node_get_type(node) == QUE_NODE_INSERT); parent = que_node_get_parent(node); diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c index ae373dfc621..ad6542845cb 100644 --- a/innobase/row/row0upd.c +++ b/innobase/row/row0upd.c @@ -287,7 +287,9 @@ upd_node_create( node->select = NULL; node->heap = mem_heap_create(128); - node->magic_n = UPD_NODE_MAGIC_N; +#ifdef UNIV_DEBUG + node->magic_n = UPD_NODE_MAGIC_N; +#endif /* UNIV_DEBUG */ node->cmpl_info = 0; @@ -1804,6 +1806,7 @@ row_upd_step( trx_start_if_not_started(trx); node = thr->run_node; + ut_ad(node->magic_n == UPD_NODE_MAGIC_N); sel_node = node->select; @@ -1923,6 +1926,7 @@ row_upd_in_place_in_select( node = que_node_get_parent(sel_node); + ut_ad(node->magic_n == UPD_NODE_MAGIC_N); ut_ad(que_node_get_type(node) == QUE_NODE_UPDATE); pcur = node->pcur; |