summaryrefslogtreecommitdiff
path: root/mysql-test/r/row.result
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/r/row.result
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/r/row.result')
-rw-r--r--mysql-test/r/row.result76
1 files changed, 76 insertions, 0 deletions
diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result
new file mode 100644
index 00000000000..e5bc5f4abe5
--- /dev/null
+++ b/mysql-test/r/row.result
@@ -0,0 +1,76 @@
+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
+SELECT ROW(2,2,3)=ROW(1+1,2,3);
+ROW(2,2,3)=ROW(1+1,2,3)
+1
+SELECT ROW(1,2,3)=ROW(1+1,2,3);
+ROW(1,2,3)=ROW(1+1,2,3)
+0
+SELECT ROW(1,2,3)<ROW(1+1,2,3);
+ROW(1,2,3)<ROW(1+1,2,3)
+1
+SELECT ROW(1,2,3)>ROW(1+1,2,3);
+ROW(1,2,3)>ROW(1+1,2,3)
+0
+SELECT ROW(1,2,3)<=ROW(1+1,2,3);
+ROW(1,2,3)<=ROW(1+1,2,3)
+1
+SELECT ROW(1,2,3)>=ROW(1+1,2,3);
+ROW(1,2,3)>=ROW(1+1,2,3)
+0
+SELECT ROW(1,2,3)<>ROW(1+1,2,3);
+ROW(1,2,3)<>ROW(1+1,2,3)
+1
+SELECT ROW(NULL,2,3)=ROW(NULL,2,3);
+ROW(NULL,2,3)=ROW(NULL,2,3)
+NULL
+SELECT ROW(NULL,2,3)<=>ROW(NULL,2,3);
+ROW(NULL,2,3)<=>ROW(NULL,2,3)
+1
+SELECT ROW(1,2,ROW(3,4,5))=ROW(1,2,ROW(3,4,5));
+ROW(1,2,ROW(3,4,5))=ROW(1,2,ROW(3,4,5))
+1
+SELECT ROW('test',2,3.33)=ROW('test',2,3.33);
+ROW('test',2,3.33)=ROW('test',2,3.33)
+1
+SELECT ROW('test',2,3.33)=ROW('test',2,3.33,4);
+Cardinality error (more/less than 3 columns)
+drop table if exists t1;
+create table t1 ( a int, b int, c int);
+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);
+a b c
+1 2 3
+select * from t1 where ROW(0,2,3)=ROW(a,b,c);
+a b c
+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)
+drop table if exists t1;
+create table t1 (i int);
+select 1 from t1 where ROW(1,1);
+Cardinality error (more/less than 1 columns)
+select count(*) from t1 order by ROW(1,1);
+Cardinality error (more/less than 1 columns)
+drop table t1;