~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_op.test

  • Committer: Mark Atwood
  • Date: 2011-12-28 02:50:31 UTC
  • Revision ID: me@mark.atwood.name-20111228025031-eh4h1zwv4ig88g0i
fix tests/r/basic.result

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# -----------
3
3
# Simple operands and arithmetic grouping
4
4
 
5
 
select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5),-(1+1)*-2;
6
 
explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5),-(1+1)*-2;
 
5
select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
 
6
explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
 
7
select 1 | (1+1),5 & 3, bit_count(7) ;
 
8
explain extended select 1 | (1+1),5 & 3,bit_count(7) ;
 
9
--error ER_PARSE_ERROR
 
10
select 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60;
 
11
select 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, (1<< 63) >> 60;
 
12
 
 
13
#
 
14
# bug #1993: bit functions must be unsigned
 
15
#
 
16
select -1 | 0, -1 ^ 0, -1 & 0;
 
17
select -1 | 1, -1 ^ 1, -1 & 1;
 
18
select  1 | -1,  1 ^ -1,  1 & -1;
 
19
select  0 | -1,  0 ^ -1,  0 & -1;
 
20
select -1 >> 0, -1 << 0;
 
21
select -1 >> 1, -1 << 1;
7
22
 
8
23
#
9
24
# Bug 13044: wrong bit_count() results
16
31
create table t2(a int, b int);
17
32
insert into t1 values (1), (2), (3);
18
33
insert into t2 values (1, 7), (3, 7);
19
 
select t1.a, t2.a, t2.b from t1 left join t2 on t1.a=t2.a;
 
34
select t1.a, t2.a, t2.b, bit_count(t2.b) from t1 left join t2 on t1.a=t2.a;
20
35
drop table t1, t2;
21
36
 
22
37
# End of 4.1 tests