1
select interval(55,10,20,30,40,50,60,70,80,90,100),interval(3,1,1+1,1+1+1+1),field("IBM","NCA","ICL","SUN","IBM","DIGITAL"),field("A","B","C"),elt(2,"ONE","TWO","THREE"),interval(0,1,2,3,4),elt(1,1,2,3)|0,elt(1,1.1,1.2,1.3)+0;
2
interval(55,10,20,30,40,50,60,70,80,90,100) interval(3,1,1+1,1+1+1+1) field("IBM","NCA","ICL","SUN","IBM","DIGITAL") field("A","B","C") elt(2,"ONE","TWO","THREE") interval(0,1,2,3,4) elt(1,1,2,3)|0 elt(1,1.1,1.2,1.3)+0
4
explain extended select INTERVAL(55,10,20,30,40,50,60,70,80,90,100),interval(3,1,1+1,1+1+1+1),field("IBM","NCA","ICL","SUN","IBM","DIGITAL"),field("A","B","C"),elt(2,"ONE","TWO","THREE"),interval(0,1,2,3,4),elt(1,1,2,3)|0,elt(1,1.1,1.2,1.3)+0;
5
id select_type table type possible_keys key key_len ref rows filtered Extra
6
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
8
Note 1003 select interval((55,10,20,30,40,50,60,70,80,90,100)) AS "INTERVAL(55,10,20,30,40,50,60,70,80,90,100)",interval((3,1,(1 + 1),(((1 + 1) + 1) + 1))) AS "interval(3,1,1+1,1+1+1+1)",field('IBM','NCA','ICL','SUN','IBM','DIGITAL') AS "field(""IBM"",""NCA"",""ICL"",""SUN"",""IBM"",""DIGITAL"")",field('A','B','C') AS "field(""A"",""B"",""C"")",elt(2,'ONE','TWO','THREE') AS "elt(2,""ONE"",""TWO"",""THREE"")",interval((0,1,2,3,4)) AS "interval(0,1,2,3,4)",(elt(1,1,2,3) | 0) AS "elt(1,1,2,3)|0",(elt(1,1.1,1.2,1.3) + 0) AS "elt(1,1.1,1.2,1.3)+0"
9
SELECT INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56);
10
INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56)
12
SELECT INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56, 77);
13
INTERVAL(13, 7, 14, 21, 28, 35, 42, 49, 56, 77)
15
select find_in_set("b","a,b,c"),find_in_set("c","a,b,c"),find_in_set("dd","a,bbb,dd"),find_in_set("bbb","a,bbb,dd");
16
find_in_set("b","a,b,c") find_in_set("c","a,b,c") find_in_set("dd","a,bbb,dd") find_in_set("bbb","a,bbb,dd")
18
select find_in_set("d","a,b,c"),find_in_set("dd","a,bbb,d"),find_in_set("bb","a,bbb,dd");
19
find_in_set("d","a,b,c") find_in_set("dd","a,bbb,d") find_in_set("bb","a,bbb,dd")
21
select make_set(0,'a','b','c'),make_set(-1,'a','b','c'),make_set(1,'a','b','c'),make_set(2,'a','b','c'),make_set(1+2,concat('a','b'),'c');
22
make_set(0,'a','b','c') make_set(-1,'a','b','c') make_set(1,'a','b','c') make_set(2,'a','b','c') make_set(1+2,concat('a','b'),'c')
24
select make_set(NULL,'a','b','c'),make_set(1|4,'a',NULL,'c'),make_set(1+2,'a',NULL,'c');
25
make_set(NULL,'a','b','c') make_set(1|4,'a',NULL,'c') make_set(1+2,'a',NULL,'c')
27
select export_set(9,"Y","N","-",5),export_set(9,"Y","N"),export_set(9,"Y","N","");
28
export_set(9,"Y","N","-",5) export_set(9,"Y","N") export_set(9,"Y","N","")
29
Y-N-N-Y-N Y,N,N,Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N YNNYNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
30
select elt(2,1),field(NULL,"a","b","c");
31
elt(2,1) field(NULL,"a","b","c")
33
select field("b","a",NULL),field(1,0,NULL)+0,field(1.0,0.0,NULL)+0.0,field(1.0e1,0.0e1,NULL)+0.0e1;
34
field("b","a",NULL) field(1,0,NULL)+0 field(1.0,0.0,NULL)+0.0 field(1.0e1,0.0e1,NULL)+0.0e1
36
select field(NULL,"a",NULL),field(NULL,0,NULL)+0,field(NULL,0.0,NULL)+0.0,field(NULL,0.0e1,NULL)+0.0e1;
37
field(NULL,"a",NULL) field(NULL,0,NULL)+0 field(NULL,0.0,NULL)+0.0 field(NULL,0.0e1,NULL)+0.0e1
39
select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c");
40
find_in_set("","a,b,c") find_in_set("","a,b,c,") find_in_set("",",a,b,c")
42
select find_in_set("abc","abc"),find_in_set("ab","abc"),find_in_set("abcd","abc");
43
find_in_set("abc","abc") find_in_set("ab","abc") find_in_set("abcd","abc")
45
select interval(null, 1, 10, 100);
46
interval(null, 1, 10, 100)
48
drop table if exists t1,t2;
49
create table t1 (id int(10) not null unique);
50
create table t2 (id int(10) not null primary key, val int(10) not null);
51
insert into t1 values (1),(2),(4);
52
insert into t2 values (1,1),(2,1),(3,1),(4,2);
53
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id;
54
id elt(two.val,'one','two')
58
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
59
id elt(two.val,'one','two')
64
select find_in_set(binary 'a',binary 'A,B,C');
65
find_in_set(binary 'a',binary 'A,B,C')
67
select find_in_set('a',binary 'A,B,C');
68
find_in_set('a',binary 'A,B,C')
70
select find_in_set(binary 'a', 'A,B,C');
71
find_in_set(binary 'a', 'A,B,C')
73
select find_in_set('1','3,1,');
74
find_in_set('1','3,1,')
77
SELECT INTERVAL(0.0, NULL);
80
SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL));
81
INTERVAL(0.0, CAST(NULL AS DECIMAL))
83
SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL));
84
INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL))
86
SELECT INTERVAL(0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
87
INTERVAL(0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
89
SELECT INTERVAL(0.0, CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
90
CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
91
CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL));
92
INTERVAL(0.0, CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
93
CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL),
94
CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL), CAST(NULL AS DECIMAL))
96
SELECT INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
97
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
98
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
99
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL));
100
INTERVAL(0.0, CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
101
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
102
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL),
103
CAST(DATE(NULL) AS DECIMAL), CAST(DATE(NULL) AS DECIMAL))