1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

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
This commit is contained in:
unknown
2003-03-03 19:31:01 +02:00
parent 9ca8f13734
commit e70b22e55c
5 changed files with 61 additions and 0 deletions

View File

@@ -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)
{