1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fixed locking problem with innodb & subqueries (BUG#1708)

tests with innodb moved to separate file
This commit is contained in:
bell@sanja.is.com.ua
2003-11-02 13:53:38 +02:00
parent cac0c0ae6e
commit e32a1c923a
3 changed files with 3 additions and 83 deletions

View File

@ -3684,7 +3684,7 @@ join_free(JOIN *join, bool full)
free_io_cache(join->table[join->const_tables]);
filesort_free_buffers(join->table[join->const_tables]);
}
if (join->select_lex->dependent && !full)
if (!full && join->select_lex->dependent)
{
for (tab=join->join_tab,end=tab+join->tables ; tab != end ; tab++)
{
@ -3736,7 +3736,8 @@ join_free(JOIN *join, bool full)
We are not using tables anymore
Unlock all tables. We may be in an INSERT .... SELECT statement.
*/
if (join->lock && join->thd->lock &&
if ((full || !join->select_lex->dependent) &&
join->lock && join->thd->lock &&
!(join->select_options & SELECT_NO_UNLOCK))
{
mysql_unlock_read_tables(join->thd, join->lock);// Don't free join->lock