~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_math.test

add test for bug600088: multibyte comments not shown correctly in SHOW CREATE TABLE 

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2);
18
18
select abs(-10), sign(-5), sign(5), sign(0);
19
19
explain extended select abs(-10), sign(-5), sign(5), sign(0);
20
 
--error ER_DIVISION_BY_ZERO
21
20
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
22
21
explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
23
 
--error ER_DIVISION_BY_ZERO
24
22
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
25
23
explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
26
 
--error ER_DIVISION_BY_ZERO
27
24
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
28
25
explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
29
 
--error ER_DIVISION_BY_ZERO
30
26
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
31
27
explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
32
28
select pow(10,log10(10)),power(2,4);
102
98
#
103
99
select abs(-2) * -2;
104
100
 
 
101
#
 
102
# Bug #6172 RAND(a) should only accept constant values as arguments
 
103
#
 
104
CREATE TABLE t1 (a INT);
 
105
 
 
106
INSERT INTO t1 VALUES (1),(1),(1),(2);
 
107
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
 
108
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
 
109
INSERT INTO t1 VALUES (3);
 
110
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
 
111
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
 
112
 
 
113
DROP TABLE t1;  
 
114
 
105
115
# End of 4.1 tests
106
116
 
107
117
#