1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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

tests with innodb moved to separate file


mysql-test/r/subselect.result:
  tests with innodb moved to separate file
mysql-test/t/subselect.test:
  tests with innodb moved to separate file
  test for BUG#1708
sql/sql_select.cc:
  it is better to check simople variable (full) first
  fixed locking problem with innodb & subqueries (BUG#1708)
This commit is contained in:
unknown
2003-11-02 13:53:38 +02:00
parent 8a57ca32fe
commit 16a5e04852
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