summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-07-01 10:03:20 +0300
committerunknown <bell@sanja.is.com.ua>2003-07-01 10:03:20 +0300
commit8db5021725c39823511d36d800299a2f4b2efda3 (patch)
treecd54e2149de2b87d2e445802361904126b9c15ef /mysql-test
parent0a1d7d64c85894fda6ff1f6342b167d22110dbf7 (diff)
parentcd01f7cda08f8cff241e02835a16fc5aca6280e2 (diff)
downloadmariadb-git-8db5021725c39823511d36d800299a2f4b2efda3.tar.gz
merged
sql/item_subselect.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/subselect.result13
-rw-r--r--mysql-test/t/subselect.test13
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index ee24ef445fb..3008a9547ce 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -1153,6 +1153,19 @@ INSERT INTO t1 VALUES (1,0,NULL,NULL),(2,0,NULL,NULL);
SELECT DISTINCT REF_ID FROM t1 WHERE ID= (SELECT DISTINCT REF_ID FROM t1 WHERE ID=2);
REF_ID
DROP TABLE t1;
+create table t1 (a int, b int);
+create table t2 (a int, b int);
+insert into t1 values (1,0), (2,0), (3,0);
+insert into t2 values (1,1), (2,1), (3,1), (2,2);
+update ignore t1 set b=(select b from t2 where t1.a=t2.a);
+Warnings:
+Error 1240 Subselect returns more than 1 record
+select * from t1;
+a b
+1 1
+2 NULL
+3 1
+drop table t1, t2;
create table t1(City VARCHAR(30),Location geometry);
insert into t1 values("Paris",GeomFromText('POINT(2.33 48.87)'));
select City from t1 where (select intersects(GeomFromText(AsText(Location)),GeomFromText('Polygon((2 50, 2.5 50, 2.5 47, 2 47, 2 50))'))=0);
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 7f957638fff..17738ae0c16 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -739,6 +739,19 @@ INSERT INTO t1 VALUES (1,0,NULL,NULL),(2,0,NULL,NULL);
SELECT DISTINCT REF_ID FROM t1 WHERE ID= (SELECT DISTINCT REF_ID FROM t1 WHERE ID=2);
DROP TABLE t1;
+#
+# uninterruptable update
+#
+create table t1 (a int, b int);
+create table t2 (a int, b int);
+
+insert into t1 values (1,0), (2,0), (3,0);
+insert into t2 values (1,1), (2,1), (3,1), (2,2);
+
+update ignore t1 set b=(select b from t2 where t1.a=t2.a);
+select * from t1;
+
+drop table t1, t2;
#
# correct behavoiur for function from reduced subselect