summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2003-05-28 00:49:24 +0300
committerbell@sanja.is.com.ua <>2003-05-28 00:49:24 +0300
commita02d89de30ca1437da500f1c91811c7ab9d8418c (patch)
tree310cc948cc102d59d2aa68604bc99a30cd0adf48 /mysql-test
parente436736d29dcde08eee20b49e0c6c148b8b6dd02 (diff)
downloadmariadb-git-a02d89de30ca1437da500f1c91811c7ab9d8418c.tar.gz
fixed priority checking bug in sub select handling
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/subselect.result6
-rw-r--r--mysql-test/t/subselect.test2
2 files changed, 5 insertions, 3 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 1a4701d8d0e..41620bb6e7f 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -606,14 +606,14 @@ x
3
INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2;
You can't specify target table 't1' for update in FROM clause
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
+INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
x
1
2
3
3
-0
+2
drop table t1, t2, t3;
CREATE TABLE t1 (x int not null, y int, primary key (x));
create table t2 (a int);
@@ -688,6 +688,8 @@ id
2
INSERT INTO t2 VALUES ((SELECT * FROM t2));
You can't specify target table 't2' for update in FROM clause
+INSERT INTO t2 VALUES ((SELECT id FROM t2));
+You can't specify target table 't2' for update in FROM clause
SELECT * FROM t2;
id
1
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 4a171c36293..8377a756c5b 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -351,7 +351,7 @@ INSERT INTO t1 (x) select (SELECT SUM(a)+1 FROM t2) FROM t2;
select * from t1;
-- error 1093
INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2;
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
+INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
-- sleep 1
select * from t1;
drop table t1, t2, t3;