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:
@ -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
|
||||
|
Reference in New Issue
Block a user