~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/r/func_math.result

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
96
96
Warnings:
97
97
Note    1003    select pow(10,log10(10)) AS `pow(10,log10(10))`,pow(2,4) AS `power(2,4)`
98
 
explain extended select rand(999999),rand();
99
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
100
 
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
101
 
Warnings:
102
 
Note    1003    select rand(999999) AS `rand(999999)`,rand() AS `rand()`
103
98
select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);
104
99
pi()    format(sin(pi()/2),6)   format(cos(pi()/2),6)   format(abs(tan(pi())),6)        format(cot(1),6)        format(asin(1),6)       format(acos(0),6)       format(atan(1),6)
105
100
3.141593        1.000000        0.000000        0.000000        0.642093        1.570796        1.570796        0.785398
149
144
1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
150
145
Warnings:
151
146
Note    1003    select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
152
 
select rand(rand);
153
 
ERROR 42S22: Unknown column 'rand' in 'field list'
154
147
create table t1 (col1 int, col2 decimal(60,30));
155
148
insert into t1 values(1,1234567890.12345);
156
149
select format(col2,7) from t1;
174
167
show create table t1;
175
168
Table   Create Table
176
169
t1      CREATE TABLE `t1` (
177
 
  `round(1, 6)` int NOT NULL
178
 
) ENGINE=X
 
170
  `round(1, 6)` INT NOT NULL
 
171
) ENGINE=X COLLATE = utf8_general_ci
179
172
select * from t1;
180
173
round(1, 6)
181
174
1
183
176
select abs(-2) * -2;
184
177
abs(-2) * -2
185
178
-4
186
 
CREATE TABLE t1 (a INT);
187
 
INSERT INTO t1 VALUES (1),(1),(1),(2);
188
 
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
189
 
RAND(2) * 1000  RAND(a) * 1000
190
 
655.586646549019        405.403537121977
191
 
122.346619258026        405.403537121977
192
 
644.97318737672 405.403537121977
193
 
857.826109843167        655.586646549019
194
 
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
195
 
RAND(2) * 1000  RAND(a) * 1000
196
 
655.586646549019        405.403537121977
197
 
122.346619258026        405.403537121977
198
 
644.97318737672 405.403537121977
199
 
INSERT INTO t1 VALUES (3);
200
 
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
201
 
RAND(2) * 1000  RAND(a) * 1000
202
 
655.586646549019        405.403537121977
203
 
122.346619258026        405.403537121977
204
 
644.97318737672 405.403537121977
205
 
857.826109843167        655.586646549019
206
 
354.211017819318        905.76975597606
207
 
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
208
 
RAND(2) * 1000  RAND(a) * 1000
209
 
655.586646549019        405.403537121977
210
 
122.346619258026        405.403537121977
211
 
644.97318737672 405.403537121977
212
 
DROP TABLE t1;
213
179
select round(111,-10);
214
180
round(111,-10)
215
181
0