Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f621d551
Commit
f621d551
authored
Dec 01, 2002
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/pem/work/mysql-4.1 sql/sql_yacc.yy: Auto merged
parents
9fcbfc0d
2506b70d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
53 deletions
+55
-53
mysql-test/r/row_test.result
mysql-test/r/row_test.result
+31
-31
mysql-test/t/row_test.test
mysql-test/t/row_test.test
+19
-19
sql/sql_yacc.yy
sql/sql_yacc.yy
+5
-3
No files found.
mysql-test/r/row_test.result
View file @
f621d551
SELECT
(1,2,3)=
(1,2,3);
(1,2,3)=
(1,2,3)
SELECT
ROW(1,2,3)=ROW
(1,2,3);
ROW(1,2,3)=ROW
(1,2,3)
1
SELECT
(2,2,3)=
(1+1,2,3);
(2,2,3)=
(1+1,2,3)
SELECT
ROW(2,2,3)=ROW
(1+1,2,3);
ROW(2,2,3)=ROW
(1+1,2,3)
1
SELECT
(1,2,3)=
(1+1,2,3);
(1,2,3)=
(1+1,2,3)
SELECT
ROW(1,2,3)=ROW
(1+1,2,3);
ROW(1,2,3)=ROW
(1+1,2,3)
0
SELECT
(1,2,3)<
(1+1,2,3);
(1,2,3)<
(1+1,2,3)
SELECT
ROW(1,2,3)<ROW
(1+1,2,3);
ROW(1,2,3)<ROW
(1+1,2,3)
1
SELECT
(1,2,3)>
(1+1,2,3);
(1,2,3)>
(1+1,2,3)
SELECT
ROW(1,2,3)>ROW
(1+1,2,3);
ROW(1,2,3)>ROW
(1+1,2,3)
0
SELECT
(1,2,3)<=
(1+1,2,3);
(1,2,3)<=
(1+1,2,3)
SELECT
ROW(1,2,3)<=ROW
(1+1,2,3);
ROW(1,2,3)<=ROW
(1+1,2,3)
1
SELECT
(1,2,3)>=
(1+1,2,3);
(1,2,3)>=
(1+1,2,3)
SELECT
ROW(1,2,3)>=ROW
(1+1,2,3);
ROW(1,2,3)>=ROW
(1+1,2,3)
0
SELECT
(1,2,3)<>
(1+1,2,3);
(1,2,3)<>
(1+1,2,3)
SELECT
ROW(1,2,3)<>ROW
(1+1,2,3);
ROW(1,2,3)<>ROW
(1+1,2,3)
1
SELECT
(NULL,2,3)=
(NULL,2,3);
(NULL,2,3)=
(NULL,2,3)
SELECT
ROW(NULL,2,3)=ROW
(NULL,2,3);
ROW(NULL,2,3)=ROW
(NULL,2,3)
NULL
SELECT
(NULL,2,3)<=>
(NULL,2,3);
(NULL,2,3)<=>
(NULL,2,3)
SELECT
ROW(NULL,2,3)<=>ROW
(NULL,2,3);
ROW(NULL,2,3)<=>ROW
(NULL,2,3)
1
SELECT
(1,2,(3,4,5))=(1,2,
(3,4,5));
(1,2,(3,4,5))=(1,2,
(3,4,5))
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
('test',2,3.33)=
('test',2,3.33);
('test',2,3.33)=
('test',2,3.33)
SELECT
ROW('test',2,3.33)=ROW
('test',2,3.33);
ROW('test',2,3.33)=ROW
('test',2,3.33)
1
SELECT
('test',2,3.33)=
('test',2,3.33,4);
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
(1,2,3)=
(a,b,c);
select * from t1 where
ROW(1,2,3)=ROW
(a,b,c);
a b c
1 2 3
select * from t1 where
(0,2,3)=
(a,b,c);
select * from t1 where
ROW(0,2,3)=ROW
(a,b,c);
a b c
select * from t1 where
(1,2,3)<
(a,b,c);
select * from t1 where
ROW(1,2,3)<ROW
(a,b,c);
a b c
2 3 1
3 2 1
drop table t1;
select (1,1);
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 (1,1);
select 1 from t1 where
ROW
(1,1);
Cardinality error (more/less than 1 columns)
select count(*) from t1 order by (1,1);
select count(*) from t1 order by
ROW
(1,1);
Cardinality error (more/less than 1 columns)
drop table t1;
mysql-test/t/row_test.test
View file @
f621d551
SELECT
(
1
,
2
,
3
)
=
(
1
,
2
,
3
);
SELECT
(
2
,
2
,
3
)
=
(
1
+
1
,
2
,
3
);
SELECT
(
1
,
2
,
3
)
=
(
1
+
1
,
2
,
3
);
SELECT
(
1
,
2
,
3
)
<
(
1
+
1
,
2
,
3
);
SELECT
(
1
,
2
,
3
)
>
(
1
+
1
,
2
,
3
);
SELECT
(
1
,
2
,
3
)
<=
(
1
+
1
,
2
,
3
);
SELECT
(
1
,
2
,
3
)
>=
(
1
+
1
,
2
,
3
);
SELECT
(
1
,
2
,
3
)
<>
(
1
+
1
,
2
,
3
);
SELECT
(
NULL
,
2
,
3
)
=
(
NULL
,
2
,
3
);
SELECT
(
NULL
,
2
,
3
)
<=>
(
NULL
,
2
,
3
);
SELECT
(
1
,
2
,(
3
,
4
,
5
))
=
(
1
,
2
,
(
3
,
4
,
5
));
SELECT
(
'test'
,
2
,
3.33
)
=
(
'test'
,
2
,
3.33
);
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
);
SELECT
ROW
(
1
,
2
,
3
)
<
ROW
(
1
+
1
,
2
,
3
);
SELECT
ROW
(
1
,
2
,
3
)
>
ROW
(
1
+
1
,
2
,
3
);
SELECT
ROW
(
1
,
2
,
3
)
<=
ROW
(
1
+
1
,
2
,
3
);
SELECT
ROW
(
1
,
2
,
3
)
>=
ROW
(
1
+
1
,
2
,
3
);
SELECT
ROW
(
1
,
2
,
3
)
<>
ROW
(
1
+
1
,
2
,
3
);
SELECT
ROW
(
NULL
,
2
,
3
)
=
ROW
(
NULL
,
2
,
3
);
SELECT
ROW
(
NULL
,
2
,
3
)
<=>
ROW
(
NULL
,
2
,
3
);
SELECT
ROW
(
1
,
2
,
ROW
(
3
,
4
,
5
))
=
ROW
(
1
,
2
,
ROW
(
3
,
4
,
5
));
SELECT
ROW
(
'test'
,
2
,
3.33
)
=
ROW
(
'test'
,
2
,
3.33
);
--
error
1239
SELECT
(
'test'
,
2
,
3.33
)
=
(
'test'
,
2
,
3.33
,
4
);
SELECT
ROW
(
'test'
,
2
,
3.33
)
=
ROW
(
'test'
,
2
,
3.33
,
4
);
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
(
1
,
2
,
3
)
=
(
a
,
b
,
c
);
select
*
from
t1
where
(
0
,
2
,
3
)
=
(
a
,
b
,
c
);
select
*
from
t1
where
(
1
,
2
,
3
)
<
(
a
,
b
,
c
);
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
);
drop
table
t1
;
--
error
1239
select
(
1
,
1
);
select
ROW
(
1
,
1
);
drop
table
if
exists
t1
;
create
table
t1
(
i
int
);
--
error
1239
select
1
from
t1
where
(
1
,
1
);
select
1
from
t1
where
ROW
(
1
,
1
);
--
error
1239
select
count
(
*
)
from
t1
order
by
(
1
,
1
);
select
count
(
*
)
from
t1
order
by
ROW
(
1
,
1
);
#TODO remove comments after parser fixing
#-- error 1239
#select count(*) from t1 order by i having (1,1);
...
...
sql/sql_yacc.yy
View file @
f621d551
...
...
@@ -1979,10 +1979,12 @@ simple_expr:
| NOT expr %prec NEG { $$= new Item_func_not($2); }
| '!' expr %prec NEG { $$= new Item_func_not($2); }
| '(' expr ')' { $$= $2; }
| '(' expr ',' expr_list ')'
/* Note: In SQL-99 "ROW" is optional, but not having it mandatory
causes conflicts with the INTERVAL syntax. */
| ROW_SYM '(' expr ',' expr_list ')'
{
$
4->push_front($2
);
$$= new Item_row(*$
4
);
$
5->push_front($3
);
$$= new Item_row(*$
5
);
}
| EXISTS exists_subselect { $$= $2; }
| singleval_subselect { $$= $1; }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment