~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_test.result

  • Committer: Monty Taylor
  • Date: 2008-07-26 16:22:28 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080726162228-atatk41l6w4np70m
Added gettext calls in to my_getopt.c and drizzle.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
drop table if exists t1,t2;
2
 
select 0=0,1>0,1>=1,1<0,1<=0,1!=0,strcmp("abc","abcd"),strcmp("b","a"),strcmp("a","a") ;
3
 
0=0     1>0     1>=1    1<0     1<=0    1!=0    strcmp("abc","abcd")    strcmp("b","a") strcmp("a","a")
4
 
1       1       1       0       0       1       -1      1       0
5
 
select "a"<"b","a"<="b","b">="a","b">"a","a"="A","a"<>"b";
6
 
"a"<"b" "a"<="b"        "b">="a"        "b">"a" "a"="A" "a"<>"b"
7
 
1       1       1       1       1       1
8
 
select "a "="A", "A "="a", "a  " <= "A b";
9
 
"a "="A"        "A "="a"        "a  " <= "A b"
10
 
1       1       1
11
 
select "abc" like "a%", "abc" not like "%d%", "a%" like "a\%","abc%" like "a%\%","abcd" like "a%b_%d", "a" like "%%a","abcde" like "a%_e","abc" like "abc%";
12
 
"abc" like "a%" "abc" not like "%d%"    "a%" like "a\%" "abc%" like "a%\%"      "abcd" like "a%b_%d"    "a" like "%%a"  "abcde" like "a%_e"     "abc" like "abc%"
13
 
1       1       1       1       1       1       1       1
14
 
select "a" like "%%b","a" like "%%ab","ab" like "a\%", "ab" like "_", "ab" like "ab_", "abc" like "%_d", "abc" like "abc%d";
15
 
"a" like "%%b"  "a" like "%%ab" "ab" like "a\%" "ab" like "_"   "ab" like "ab_" "abc" like "%_d"        "abc" like "abc%d"
16
 
0       0       0       0       0       0       0
17
 
select '?' like '|%', '?' like '|%' ESCAPE '|', '%' like '|%', '%' like '|%' ESCAPE '|', '%' like '%';
18
 
'?' like '|%'   '?' like '|%' ESCAPE '|'        '%' like '|%'   '%' like '|%' ESCAPE '|'        '%' like '%'
19
 
0       0       0       1       1
20
 
select 'abc' like '%c','abcabc' like '%c',  "ab" like "", "ab" like "a", "ab" like "ab";
21
 
'abc' like '%c' 'abcabc' like '%c'      "ab" like ""    "ab" like "a"   "ab" like "ab"
22
 
1       1       0       0       1
23
 
select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between "max" and "my" and 3=3;
24
 
2 between 1 and 3       "monty" between "max" and "my"  2=2 and "monty" between "max" and "my" and 3=3
25
 
1       1       1
26
 
select 'b' between 'a' and 'c', 'B' between 'a' and 'c';
27
 
'b' between 'a' and 'c' 'B' between 'a' and 'c'
28
 
1       1
29
 
select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0);
30
 
2 in (3,2,5,9,5,1)      "monty" in ("david","monty","allan")    1.2 in (1.4,1.2,1.0)
31
 
1       1       1
32
 
select -1.49 or -1.49,0.6 or 0.6;
33
 
-1.49 or -1.49  0.6 or 0.6
34
 
1       1
35
 
select 10 % 7, 10 mod 7, 10 div 3;
36
 
10 % 7  10 mod 7        10 div 3
37
 
3       3       3
38
 
explain extended select 10 % 7, 10 mod 7, 10 div 3;
39
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
40
 
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
41
 
Warnings:
42
 
Note    1003    select (10 % 7) AS `10 % 7`,(10 % 7) AS `10 mod 7`,(10 DIV 3) AS `10 div 3`
43
 
create table t1 (a int);
44
 
insert t1 values (1);
45
 
select * from t1 where 1 xor 1;
46
 
a
47
 
explain extended select * from t1 where 1 xor 1;
48
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
49
 
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE
50
 
Warnings:
51
 
Note    1003    select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
52
 
select - a from t1;
53
 
- a 
54
 
-1
55
 
explain extended select - a from t1;
56
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
57
 
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    1       100.00  
58
 
Warnings:
59
 
Note    1003    select -(`test`.`t1`.`a`) AS `- a ` from `test`.`t1`
60
 
drop table t1;
61
 
select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
62
 
5 between 0 and 10 between 0 and 1      (5 between 0 and 10) between 0 and 1
63
 
0       1
64
 
select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1;
65
 
1 and 2 between 2 and 10        2 between 2 and 10 and 1
66
 
1       1
67
 
select 1 and 0 or 2, 2 or 1 and 0;
68
 
1 and 0 or 2    2 or 1 and 0
69
 
1       1
70
 
CREATE TABLE t1 (   faq_group_id int NOT NULL default '0',   faq_id int NOT NULL default '0',   title varchar(240) default NULL,   keywords text,   description longblob,   solution longblob,   status int NOT NULL default '0',   access_id int default NULL,   lang_id int NOT NULL default '0',   created datetime NULL,   updated datetime default NULL,   last_access datetime default NULL,   last_notify datetime default NULL,   solved_count int NOT NULL default '0',   static_solved int default NULL,   solved_1 int default NULL,   solved_2 int default NULL,   solved_3 int default NULL,   solved_4 int default NULL,   solved_5 int default NULL,   expires datetime default NULL,   notes text,   assigned_to int default NULL,   assigned_group int default NULL,   last_edited_by int default NULL,   orig_ref_no varchar(15) default NULL,   c$fundstate int default NULL,   c$contributor int default NULL,   UNIQUE KEY t1$faq_id (faq_id),   KEY t1$group_id$faq_id (faq_group_id,faq_id),   KEY t1$c$fundstate (c$fundstate) );
71
 
INSERT INTO t1 VALUES (82,82,'How to use the DynaVox Usage Counts Feature','usages count, number, corner, white, box, button','<as-html>\r\n<table width=\"100%\" border=\"0\">\r\n  <tr>\r\n    <td width=\"3%\">�</td>\r\n    <td width=\"97%\">\r\n       <h3><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000000\">How \r\n        To</font><!-- #BeginEditable \"CS_troubleshoot_question\" --><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000099\"><font color=\"#000000\">: \r\n        Display or Hide the Usage Counts to find out how many times each button is being selected. </font></font><!-- #EndEditable --></h3>\r\n    </td>\r\n  </tr>\r\n</table>','<as-html>\r\n <table width=\"100%\" border=\"0\">\r\n  <tr>\r\n    <td width=\"3%\">�</td>\r\n    \r\n<td width=\"97%\"><!-- #BeginEditable \"CS_troubleshoot_answer\" --> \r\n      \r\n<p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">1. Select \r\n  the <i>On/Setup</i> button to access the DynaVox Setup Menu.<br>\r\n  2. Select <b>Button Features.</b><br>\r\n  3. Below the <b>OK</b> button is the <b>Usage Counts</b> button.<br>\r\n  a. If it says \"Hidden\" then the Usage Counts will not be displayed.<br>\r\n  b. If it says \"Displayed\" then the Usage Counts will be shown.<br>\r\n        c. Select the <b>Usage Counts</b> Option Ring once and it will toggle \r\n        to the alternative option.<br>\r\n  4. Once the correct setting has been chosen, select <b>OK</b> to leave the <i>Button \r\n  Features</i> menu.<br>\r\n  5. Select <b>OK</b> out of the <i>Setup</i> menu and return to the communication \r\n  page.</font></p>\r\n      <p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">For \r\n        further information on <i>Usage Counts,</i> see the <i>Button Features \r\n        Menu Entry</i> in the DynaVox/DynaMyte Reference Manual.</font></p>\r\n<!-- #EndEditable --></td>\r\n  </tr>\r\n</table>',4,1,1,'2001-11-16 16:43:34','2002-11-25 12:09:43','2003-07-24 01:04:48',NULL,11,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,11,NULL,NULL,NULL);
72
 
CREATE TABLE t2 (  access_id int NOT NULL default '0',   name varchar(20) default NULL,   rank int NOT NULL default '0',   KEY t2$access_id (access_id) );
73
 
INSERT INTO t2 VALUES (1,'Everyone',2),(2,'Help',3),(3,'Customer Support',1);
74
 
SELECT f_acc.rank, a1.rank, a2.rank  FROM t1 LEFT JOIN t1 f1 ON  (f1.access_id=1 AND f1.faq_group_id = t1.faq_group_id) LEFT JOIN t2 a1 ON (a1.access_id =  f1.access_id) LEFT JOIN t1 f2 ON (f2.access_id=3 AND  f2.faq_group_id = t1.faq_group_id) LEFT  JOIN t2 a2 ON (a2.access_id = f2.access_id), t2 f_acc WHERE LEAST(a1.rank,a2.rank) =  f_acc.rank;
75
 
rank    rank    rank
76
 
DROP TABLE t1,t2;
77
 
CREATE TABLE t1 (d varchar(6), k int);
78
 
INSERT INTO t1 VALUES (NULL, 2);
79
 
SELECT GREATEST(d,d) FROM t1 WHERE k=2;
80
 
GREATEST(d,d)
81
 
NULL
82
 
DROP TABLE t1;
83
 
select 1197.90 mod 50;
84
 
1197.90 mod 50
85
 
47.90
86
 
select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
87
 
5.1 mod 3       5.1 mod -3      -5.1 mod 3      -5.1 mod -3
88
 
2.1     2.1     -2.1    -2.1
89
 
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
90
 
5 mod 3 5 mod -3        -5 mod 3        -5 mod -3
91
 
2       2       -2      -2
92
 
select (12%0) <=> null      as '1';
93
 
ERROR 22012: Division by 0
94
 
select (12%0) is null       as '1';
95
 
ERROR 22012: Division by 0
96
 
select 12%0                 as 'NULL';
97
 
ERROR 22012: Division by 0
98
 
select 12%2                 as '0';
99
 
0
100
 
0
101
 
select 12%NULL              as 'NULL';
102
 
NULL
103
 
NULL
104
 
select 12 % null            as 'NULL';
105
 
NULL
106
 
NULL
107
 
select null % 12            as 'NULL';
108
 
NULL
109
 
NULL
110
 
select null % 0             as 'NULL';
111
 
NULL
112
 
NULL
113
 
select 0 % null             as 'NULL';
114
 
NULL
115
 
NULL
116
 
select null % null          as 'NULL';
117
 
NULL
118
 
NULL
119
 
select (12 mod 0) <=> null  as '1';
120
 
ERROR 22012: Division by 0
121
 
select (12 mod 0) is null   as '1';
122
 
ERROR 22012: Division by 0
123
 
select 12 mod 0             as 'NULL';
124
 
ERROR 22012: Division by 0
125
 
select 12 mod 2             as '0';
126
 
0
127
 
0
128
 
select 12 mod null          as 'NULL';
129
 
NULL
130
 
NULL
131
 
select null mod 12          as 'NULL';
132
 
NULL
133
 
NULL
134
 
select null mod 0           as 'NULL';
135
 
NULL
136
 
NULL
137
 
select 0 mod null           as 'NULL';
138
 
NULL
139
 
NULL
140
 
select null mod null        as 'NULL';
141
 
NULL
142
 
NULL
143
 
select mod(12.0, 0)         as 'NULL';
144
 
ERROR 22012: Division by 0
145
 
select mod(12, 0.0)         as 'NULL';
146
 
ERROR 22012: Division by 0
147
 
select mod(12, NULL)        as 'NULL';
148
 
NULL
149
 
NULL
150
 
select mod(12.0, NULL)      as 'NULL';
151
 
NULL
152
 
NULL
153
 
select mod(NULL, 2)         as 'NULL';
154
 
NULL
155
 
NULL
156
 
select mod(NULL, 2.0)       as 'NULL';
157
 
NULL
158
 
NULL
159
 
create table t1 (a int, b int);
160
 
insert into t1 values (1,2), (2,3), (3,4), (4,5);
161
 
select * from t1 where a not between 1 and 2;
162
 
a       b
163
 
3       4
164
 
4       5
165
 
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
166
 
a       b
167
 
4       5
168
 
drop table t1;
169
 
SELECT GREATEST(1,NULL);
170
 
GREATEST(1,NULL)
171
 
NULL
172
 
SELECT LEAST('xxx','aaa',NULL,'yyy');
173
 
LEAST('xxx','aaa',NULL,'yyy')
174
 
NULL
175
 
SELECT LEAST(1.1,1.2,NULL,1.0);
176
 
LEAST(1.1,1.2,NULL,1.0)
177
 
NULL
178
 
SELECT GREATEST(1.5E+2,1.3E+2,NULL);
179
 
GREATEST(1.5E+2,1.3E+2,NULL)
180
 
NULL