mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
do not unlock tables early if we have subquery in HAVING clause (BUG#3984)
mysql-test/r/subselect_innodb.result: test of unlocking innodb tables and subquery in HAVING clause mysql-test/t/subselect_innodb.test: test of unlocking innodb tables and subquery in HAVING clause sql/item_subselect.cc: mark SELECT with subquery in HAVING clause sql/sql_lex.cc: mark SELECT with subquery in HAVING clause sql/sql_lex.h: mark SELECT with subquery in HAVING clause sql/sql_select.cc: do not unlock tables early if we have subquery in HAVING clause
This commit is contained in:
@ -3902,7 +3902,8 @@ JOIN::join_free(bool full)
|
||||
*/
|
||||
if ((full || !select_lex->uncacheable) &&
|
||||
lock && thd->lock &&
|
||||
!(select_options & SELECT_NO_UNLOCK))
|
||||
!(select_options & SELECT_NO_UNLOCK) &&
|
||||
!select_lex->subquery_in_having)
|
||||
{
|
||||
mysql_unlock_read_tables(thd, lock);// Don't free join->lock
|
||||
lock=0;
|
||||
|
Reference in New Issue
Block a user