diff options
author | bell@sanja.is.com.ua <> | 2003-12-10 22:46:14 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2003-12-10 22:46:14 +0200 |
commit | e756a511f816a8dc7509d52e684d11448663d766 (patch) | |
tree | ae06b7876934d32768f586a08de67e43088d1fad /mysql-test/t/subselect_innodb.test | |
parent | 4734f4521345f9f8d5d8ba5f1a73deb8dd4cb2ca (diff) | |
download | mariadb-git-e756a511f816a8dc7509d52e684d11448663d766.tar.gz |
fixed unlocking tables during subquery execution (BUG#2048)
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; |