diff options
author | unknown <bell@sanja.is.com.ua> | 2003-12-10 22:46:14 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-12-10 22:46:14 +0200 |
commit | fc75518a78af9dfb68baac2cbf279983fe54b492 (patch) | |
tree | ae06b7876934d32768f586a08de67e43088d1fad /mysql-test/t/subselect_innodb.test | |
parent | e0daf11201dd6e81af73c1c74270039e73845a24 (diff) | |
download | mariadb-git-fc75518a78af9dfb68baac2cbf279983fe54b492.tar.gz |
fixed unlocking tables during subquery execution (BUG#2048)
mysql-test/r/subselect_innodb.result:
bug 2048 test
mysql-test/t/subselect_innodb.test:
bug 2048 test
sql/item_subselect.cc:
do not unlock tables for subqueries
sql/sql_derived.cc:
derived table tables can be unlocked
sql/sql_lex.h:
new interface to pass additional options
sql/sql_union.cc:
new interface to pass additional options
do not unlock tables for UNION
Diffstat (limited to 'mysql-test/t/subselect_innodb.test')
-rw-r--r-- | mysql-test/t/subselect_innodb.test | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test index 5e274ecbd5c..360bedf8972 100644 --- a/mysql-test/t/subselect_innodb.test +++ b/mysql-test/t/subselect_innodb.test @@ -67,4 +67,26 @@ INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t3 VALUES (1,1),(2,2),(3,3); INSERT INTO t2 VALUES (1,1),(2,2),(3,3); SELECT distinct p1.processor_id, (SELECT y.yod_id FROM t1 p2, t2 y WHERE p2.processor_id = p1.processor_id and p2.processor_id = y.processor_id) FROM t1 p1; -drop table t1,t2,t3;
\ No newline at end of file +drop table t1,t2,t3; + +# +# innodb locking +# +CREATE TABLE t1 ( + id int(11) NOT NULL default '0', + b int(11) default NULL, + c char(3) default NULL, + PRIMARY KEY (id), + KEY t2i1 (b) +) TYPE=innodb DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES (0,0,'GPL'),(1,0,'GPL'),(2,1,'GPL'),(3,2,'GPL'); +CREATE TABLE t2 ( + id int(11) NOT NULL default '0', + b int(11) default NULL, + c char(3) default NULL, + PRIMARY KEY (id), + KEY t2i (b) +) TYPE=innodb DEFAULT CHARSET=latin1; +INSERT INTO t2 VALUES (0,0,'GPL'),(1,0,'GPL'),(2,1,'GPL'),(3,2,'GPL'); +select (select max(id) from t2 where b=1 group by b) as x,b from t1 where b=1; +drop table t1,t2; |