diff options
author | unknown <heikki@hundin.mysql.fi> | 2005-07-01 20:44:35 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2005-07-01 20:44:35 +0300 |
commit | 8561600a5a876750c7de6154db3d2280ce62e13c (patch) | |
tree | 583b44eafd382209ecf9aadf3a4147692a101986 /innobase/include/trx0trx.ic | |
parent | 258d9a9658fa4e44d4568d9e111560def29b8f21 (diff) | |
download | mariadb-git-8561600a5a876750c7de6154db3d2280ce62e13c.tar.gz |
Many files:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
sql/ha_innodb.cc:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/row/row0mysql.c:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/row/row0sel.c:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/trx0trx.ic:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/row0mysql.h:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/include/trx0trx.h:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/lock/lock0lock.c:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
innobase/trx/trx0trx.c:
Fix Bug #3300 : if innodb_locks_unsafe_for_binlog is set, release locks on rows that we do not UPDATE or DELETE
Diffstat (limited to 'innobase/include/trx0trx.ic')
-rw-r--r-- | innobase/include/trx0trx.ic | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/innobase/include/trx0trx.ic b/innobase/include/trx0trx.ic index 78e5acda148..d23165b74e8 100644 --- a/innobase/include/trx0trx.ic +++ b/innobase/include/trx0trx.ic @@ -39,4 +39,52 @@ trx_start_if_not_started_low( } } +/***************************************************************** +Resets the new record lock info in a transaction struct. */ +UNIV_INLINE +void +trx_reset_new_rec_lock_info( +/*========================*/ + trx_t* trx) /* in: transaction struct */ +{ + trx->new_rec_locks[0] = NULL; + trx->new_rec_locks[1] = NULL; +} + +/***************************************************************** +Registers that we have set a new record lock on an index. This can only be +called twice after calling trx_reset_new_rec_lock_info(), since we only have +space to store 2 indexes! */ +UNIV_INLINE +void +trx_register_new_rec_lock( +/*======================*/ + trx_t* trx, /* in: transaction struct */ + dict_index_t* index) /* in: trx sets a new record lock on this + index*/ +{ + if (trx->new_rec_locks[0] == NULL) { + trx->new_rec_locks[0] = index; + return; + } + + ut_a(trx->new_rec_locks[1] == NULL); + + trx->new_rec_locks[1] = index; +} + +/***************************************************************** +Checks if trx has set a new record lock on an index. */ +UNIV_INLINE +ibool +trx_new_rec_locks_contain( +/*======================*/ + /* out: TRUE if trx has set a new record lock + on index */ + trx_t* trx, /* in: transaction struct */ + dict_index_t* index) /* in: index */ +{ + return(trx->new_rec_locks[0] == index + || trx->new_rec_locks[1] == index); +} |