diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-03-03 19:31:01 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-03-03 19:31:01 +0200 |
commit | e70b22e55c5756a8318c07ab337a1c31acf1aa86 (patch) | |
tree | c9c5aff16956b040c42f44d96cb69c6c44097284 /sql/sql_class.cc | |
parent | 9ca8f13734d103a44f1653ef7bf1a3ae2747e750 (diff) | |
download | mariadb-git-e70b22e55c5756a8318c07ab337a1c31acf1aa86.tar.gz |
ha_innodb.h, ha_innodb.cc, handler.h, handler.cc, sql_class.cc:
Fix a hang on the adaptive hash S-latch if an application program uses mysql_use_result() and performs queries on two connections at the same time
sql/sql_class.cc:
Fix a hang on the adaptive hash S-latch if an application program uses mysql_use_result() and performs queries on two connections at the same time
sql/handler.cc:
Fix a hang on the adaptive hash S-latch if an application program uses mysql_use_result() and performs queries on two connections at the same time
sql/handler.h:
Fix a hang on the adaptive hash S-latch if an application program uses mysql_use_result() and performs queries on two connections at the same time
sql/ha_innodb.cc:
Fix a hang on the adaptive hash S-latch if an application program uses mysql_use_result() and performs queries on two connections at the same time
sql/ha_innodb.h:
Fix a hang on the adaptive hash S-latch if an application program uses mysql_use_result() and performs queries on two connections at the same time
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index e5ba58a0543..a99d17b0ec4 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -463,6 +463,14 @@ bool select_send::send_data(List<Item> &items) String *packet= &thd->packet; DBUG_ENTER("send_data"); +#ifdef HAVE_INNOBASE_DB + /* We may be passing the control from mysqld to the client: release the + InnoDB adaptive hash S-latch to avoid thread deadlocks if it was reserved + by thd */ + if (thd->transaction.all.innobase_tid) + ha_release_temporary_latches(thd); +#endif + if (thd->offset_limit) { // using limit offset,count thd->offset_limit--; @@ -486,6 +494,14 @@ bool select_send::send_data(List<Item> &items) bool select_send::send_eof() { +#ifdef HAVE_INNOBASE_DB + /* We may be passing the control from mysqld to the client: release the + InnoDB adaptive hash S-latch to avoid thread deadlocks if it was reserved + by thd */ + if (thd->transaction.all.innobase_tid) + ha_release_temporary_latches(thd); +#endif + /* Unlock tables before sending packet to gain some speed */ if (thd->lock) { |