summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-12-07 19:58:05 +0200
committerunknown <bell@sanja.is.com.ua>2002-12-07 19:58:05 +0200
commit5b54427d7d879a47893885dbfa0466b4bd69aaf1 (patch)
treeb3d232fd7ac288116ee7f63b6afd67c123484c67 /mysql-test
parent30cb4a8676427e6eafe3e38548a11e5859b587a3 (diff)
downloadmariadb-git-5b54427d7d879a47893885dbfa0466b4bd69aaf1.tar.gz
IN with row item without constant optimisation (SCRUM)
renamed row item test mysql-test/r/row.result: IN with row item without constant optimisation mysql-test/t/row.test: IN with row item without constant optimisation sql/item_cmpfunc.cc: IN with row item without constant optimisation sql/item_cmpfunc.h: IN with row item without constant optimisation
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/row.result (renamed from mysql-test/r/row_test.result)16
-rw-r--r--mysql-test/t/row.test (renamed from mysql-test/t/row_test.test)6
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/row_test.result b/mysql-test/r/row.result
index f6e989789c7..e5bc5f4abe5 100644
--- a/mysql-test/r/row_test.result
+++ b/mysql-test/r/row.result
@@ -1,3 +1,9 @@
+select row(1,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3));
+row(1,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3))
+1
+select row(10,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3));
+row(10,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3))
+0
SELECT ROW(1,2,3)=ROW(1,2,3);
ROW(1,2,3)=ROW(1,2,3)
1
@@ -48,6 +54,16 @@ select * from t1 where ROW(1,2,3)<ROW(a,b,c);
a b c
2 3 1
3 2 1
+select * from t1 where ROW(a,2,3) IN(row(1,b,c), row(2,3,1));
+a b c
+1 2 3
+select * from t1 where ROW(c,2,3) IN(row(1,b,a), row(2,3,1));
+a b c
+3 2 1
+select * from t1 where ROW(a,b,c) IN(row(1,2,3), row(3,2,1));
+a b c
+1 2 3
+3 2 1
drop table t1;
select ROW(1,1);
Cardinality error (more/less than 1 columns)
diff --git a/mysql-test/t/row_test.test b/mysql-test/t/row.test
index 5daacaa1ee6..4515d6b220d 100644
--- a/mysql-test/t/row_test.test
+++ b/mysql-test/t/row.test
@@ -1,3 +1,6 @@
+select row(1,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3));
+select row(10,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3));
+
SELECT ROW(1,2,3)=ROW(1,2,3);
SELECT ROW(2,2,3)=ROW(1+1,2,3);
SELECT ROW(1,2,3)=ROW(1+1,2,3);
@@ -18,6 +21,9 @@ insert into t1 values (1,2,3), (2,3,1), (3,2,1);
select * from t1 where ROW(1,2,3)=ROW(a,b,c);
select * from t1 where ROW(0,2,3)=ROW(a,b,c);
select * from t1 where ROW(1,2,3)<ROW(a,b,c);
+select * from t1 where ROW(a,2,3) IN(row(1,b,c), row(2,3,1));
+select * from t1 where ROW(c,2,3) IN(row(1,b,a), row(2,3,1));
+select * from t1 where ROW(a,b,c) IN(row(1,2,3), row(3,2,1));
drop table t1;
-- error 1239