diff options
author | marko@hundin.mysql.fi <> | 2005-06-08 15:45:56 +0300 |
---|---|---|
committer | marko@hundin.mysql.fi <> | 2005-06-08 15:45:56 +0300 |
commit | c3da5b0b7b7ff52aebd25c34bd2eebbc02cee417 (patch) | |
tree | 88674f8a313f50ceff17e35e64cd03a377089114 /sql/ha_innodb.cc | |
parent | 24afa4e0fef6c2c96036c847ed1c0bfb7c4fe7a5 (diff) | |
download | mariadb-git-c3da5b0b7b7ff52aebd25c34bd2eebbc02cee417.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.
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 91c1dab44f1..2675ccdbfbb 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -5719,7 +5719,7 @@ ha_innobase::external_lock( ulint error; error = row_lock_table_for_mysql(prebuilt, - NULL, LOCK_TABLE_EXP); + NULL, 0); if (error != DB_SUCCESS) { error = convert_error_code_to_mysql( @@ -5739,9 +5739,6 @@ ha_innobase::external_lock( trx->n_mysql_tables_in_use--; prebuilt->mysql_has_locked = FALSE; auto_inc_counter_for_this_stat = 0; - if (trx->n_lock_table_exp) { - row_unlock_tables_for_mysql(trx); - } /* If the MySQL lock count drops to zero we know that the current SQL statement has ended */ @@ -5783,7 +5780,7 @@ user issued query LOCK TABLES..WHERE ENGINE = InnoDB. */ int ha_innobase::transactional_table_lock( /*==================================*/ - /* out: 0 */ + /* out: error code */ THD* thd, /* in: handle to the user thread */ int lock_type) /* in: lock type */ { @@ -5847,8 +5844,7 @@ ha_innobase::transactional_table_lock( if (thd->in_lock_tables && thd->variables.innodb_table_locks) { ulint error = DB_SUCCESS; - error = row_lock_table_for_mysql(prebuilt,NULL, - LOCK_TABLE_TRANSACTIONAL); + error = row_lock_table_for_mysql(prebuilt, NULL, 0); if (error != DB_SUCCESS) { error = convert_error_code_to_mysql(error, user_thd); |