~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_op.test

  • Committer: Brian Aker
  • Date: 2008-08-12 03:12:57 UTC
  • Revision ID: brian@tangent.org-20080812031257-ln3uk87y1r22byeg
First pass of new sql_db.cc work

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Description
2
 
# -----------
3
 
# Simple operands and arithmetic grouping
4
 
 
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
 
select 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60;
10
 
#
11
 
# bug #1993: bit functions must be
12
 
#
13
 
select -1 | 0, -1 ^ 0, -1 & 0;
14
 
select -1 | 1, -1 ^ 1, -1 & 1;
15
 
select  1 | -1,  1 ^ -1,  1 & -1;
16
 
select  0 | -1,  0 ^ -1,  0 & -1;
17
 
select -1 >> 0, -1 << 0;
18
 
select -1 >> 1, -1 << 1;
19
 
 
20
 
#
21
 
# Bug 13044: wrong bit_count() results
22
 
#
23
 
 
24
 
--disable_warnings
25
 
drop table if exists t1,t2;
26
 
--enable_warnings
27
 
create table t1(a int);
28
 
create table t2(a int, b int);
29
 
insert into t1 values (1), (2), (3);
30
 
insert into t2 values (1, 7), (3, 7);
31
 
select t1.a, t2.a, t2.b, bit_count(t2.b) from t1 left join t2 on t1.a=t2.a;
32
 
drop table t1, t2;
33
 
 
34
 
# End of 4.1 tests