diff options
author | unknown <bell@sanja.is.com.ua> | 2003-11-02 13:53:38 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-11-02 13:53:38 +0200 |
commit | 16a5e048523c4f8674b337b5eb9f7f9932be5510 (patch) | |
tree | 40f4a0dcc264fa6d6ecb8c48fd80de4315754bb2 /sql/sql_select.cc | |
parent | 8a57ca32fed4a8b7b38dcb1b3adae03eee1f0e20 (diff) | |
download | mariadb-git-16a5e048523c4f8674b337b5eb9f7f9932be5510.tar.gz |
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)
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 65515ce7ad9..400919779a2 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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 |