summaryrefslogtreecommitdiff
path: root/mysql-test/t/table_value_const.test
blob: 00cd1baad95ad260ee55cca1ffd9891a20d3634c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
create table t1 (a int, b int);

insert into t1 values (1,2),(4,6),(9,7),(1,1),(2,5),(7,8);

values (1,2);

select 1,2 union values (1,2);

values (1,2) union select (1,2);

values (1,2), (3,4) union select 1,2;

select * from t1 where (t1.a,t1.b) in (select 5,7 union values (1,2),(2,3));

select * from t1 where (t1.a,t1.b) in (values (1,2),(2,3) union select 5,7);

let $drop_view= drop view v1;

create view v1 as values (1,2);

eval $drop_view;

create view v1 as values (1,2) union select 3,4;

eval $drop_view;

create view v1 as select 1,2 union values (3,4);

eval $drop_view;

create view v1 as select 1,2 union values (3,4),(5,6);

eval $drop_view;

drop table t1;