summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect.result
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-11-30 19:54:52 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2002-11-30 19:54:52 +0200
commit0b36bbdf25e1309af5651e2f10128b471702c669 (patch)
treea511346f7641d3e17935ce797b7d9ce4883fc397 /mysql-test/r/subselect.result
parentb790bc24d81856d896231c42e3c7e259933cb1e7 (diff)
parent0b270eb4612e0c7ba32193171852be8982b0d643 (diff)
downloadmariadb-git-0b36bbdf25e1309af5651e2f10128b471702c669.tar.gz
Merge sinisa@work.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1 mysql-test/r/subselect.result: Auto merged mysql-test/t/subselect.test: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r--mysql-test/r/subselect.result22
1 files changed, 19 insertions, 3 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 3617f8c7782..8b82032e2e1 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -411,6 +411,8 @@ a b
0 10
1 11
2 12
+update t1 set b= (select b from t1);
+INSERT TABLE 't1' isn't allowed in FROM table list
update t1 set b= (select b from t2 where t1.a = t2.a);
select * from t1;
a b
@@ -430,6 +432,8 @@ a b
select * from t1 where b = (select b from t2 where t1.a = t2.a);
a b
2 12
+delete from t1 where b = (select b from t1);
+INSERT TABLE 't1' isn't allowed in FROM table list
delete from t1 where b = (select b from t2 where t1.a = t2.a);
select * from t1;
a b
@@ -453,6 +457,8 @@ a b
33 10
22 11
2 12
+delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a);
+INSERT TABLE 't12' isn't allowed in FROM table list
delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a);
select * from t11;
a b
@@ -466,6 +472,8 @@ drop table t11, t12, t2;
CREATE TABLE t1 (x int);
create table t2 (a int);
insert into t2 values (1);
+INSERT INTO t1 (x) VALUES ((SELECT x FROM t1));
+INSERT TABLE 't1' isn't allowed in FROM table list
INSERT INTO t1 (x) VALUES ((SELECT a FROM t2));
select * from t1;
x
@@ -485,20 +493,22 @@ x
3
INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2;
INSERT TABLE 't1' isn't allowed in FROM table list
-INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t1));
+INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
select * from t1;
x
1
2
3
3
-9
+0
drop table t1, t2;
CREATE TABLE t1 (x int not null, y int, primary key (x));
create table t2 (a int);
insert into t2 values (1);
select * from t1;
x y
+replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2));
+INSERT TABLE 't1' isn't allowed in FROM table list
replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2));
select * from t1;
x y
@@ -559,4 +569,10 @@ id
SELECT * FROM t WHERE id IN (SELECT 5 UNION SELECT 2);
id
2
-drop table if exists t;
+INSERT INTO t VALUES ((SELECT * FROM t));
+INSERT TABLE 't' isn't allowed in FROM table list
+SELECT * FROM t;
+id
+1
+2
+drop table t;