diff options
author | unknown <marko@hundin.mysql.fi> | 2005-06-08 15:45:56 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-06-08 15:45:56 +0300 |
commit | 2e2a4e4f3e4086186b0e6cfba5bfaf0019aeb88a (patch) | |
tree | 88674f8a313f50ceff17e35e64cd03a377089114 /innobase/row | |
parent | 67d0502bcf05ee19edf0710ef153ca6b68244b26 (diff) | |
download | mariadb-git-2e2a4e4f3e4086186b0e6cfba5bfaf0019aeb88a.tar.gz |
InnoDB: Do not distinguish explicitly requested table locks.
Since UNLOCK TABLES will commit the transaction (and thus release
all InnoDB locks held by it), it is unnecessary to release the
user-requested table locks separately.
innobase/include/lock0lock.h:
Remove references to LOCK_TABLE_EXP and LOCK_TABLE_TRANSACTIONAL.
Remove lock_release_tables_off_kernel().
innobase/include/row0mysql.h:
Remove row_unlock_tables_for_mysql().
innobase/include/trx0trx.h:
Remove n_lock_table_exp and n_lock_table_transactional.
innobase/lock/lock0lock.c:
Remove references to LOCK_TABLE_EXP and LOCK_TABLE_TRANSACTIONAL.
Remove lock_release_tables_off_kernel().
Remove references to trx->n_lock_table_exp
and trx->n_lock_table_transactional.
innobase/row/row0mysql.c:
Remove row_unlock_tables_for_mysql().
Remove references to LOCK_TABLE_TRANSACTIONAL and LOCK_TABLE_EXP.
innobase/trx/trx0trx.c:
Remove n_lock_table_exp and n_lock_table_transactional.
sql/ha_innodb.cc:
Remove references to LOCK_TABLE_EXP and LOCK_TABLE_TRANSACTIONAL
and row_unlock_tables_for_mysql().
Diffstat (limited to 'innobase/row')
-rw-r--r-- | innobase/row/row0mysql.c | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index fcb3831b5fc..0b010096002 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -971,25 +971,6 @@ run_again: } /************************************************************************* -Unlocks all table locks explicitly requested by trx (with LOCK TABLES, -lock type LOCK_TABLE_EXP). */ - -void -row_unlock_tables_for_mysql( -/*========================*/ - trx_t* trx) /* in: transaction */ -{ - if (!trx->n_lock_table_exp) { - - return; - } - - mutex_enter(&kernel_mutex); - lock_release_tables_off_kernel(trx); - mutex_exit(&kernel_mutex); -} - -/************************************************************************* Sets a table lock on the table mentioned in prebuilt. */ int @@ -1000,9 +981,10 @@ row_lock_table_for_mysql( table handle */ dict_table_t* table, /* in: table to lock, or NULL if prebuilt->table should be - locked or a + locked as prebuilt->select_lock_type */ - ulint mode) /* in: lock mode of table */ + ulint mode) /* in: lock mode of table + (ignored if table==NULL) */ { trx_t* trx = prebuilt->trx; que_thr_t* thr; @@ -1038,14 +1020,8 @@ run_again: if (table) { err = lock_table(0, table, mode, thr); } else { - if (mode == LOCK_TABLE_TRANSACTIONAL) { - err = lock_table(LOCK_TABLE_TRANSACTIONAL, - prebuilt->table, - prebuilt->select_lock_type, thr); - } else { - err = lock_table(LOCK_TABLE_EXP, prebuilt->table, - prebuilt->select_lock_type, thr); - } + err = lock_table(0, prebuilt->table, + prebuilt->select_lock_type, thr); } trx->error_state = err; |