mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
f195cf9d14
introduced base class Item_func_bit for bit functions mysql-test/r/func_op.result: test results for bug #1993 'bit functions do not return unsigned values' mysql-test/t/func_op.test: added tests for bug #1993 'bit functions do not return unsigned values'
27 lines
914 B
Text
27 lines
914 B
Text
select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
|
|
1+1 1-1 1+1*2 8/5 8%5 mod(8,5) mod(8,5)|0 -(1+1)*-2
|
|
2 0 3 1.60 3 3 3 4
|
|
select 1 | (1+1),5 & 3,bit_count(7) ;
|
|
1 | (1+1) 5 & 3 bit_count(7)
|
|
3 1 3
|
|
select 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60;
|
|
1 << 32 1 << 63 1 << 64 4 >> 2 4 >> 63 1<< 63 >> 60
|
|
4294967296 9223372036854775808 0 1 0 8
|
|
select -1 | 0, -1 ^ 0, -1 & 0;
|
|
-1 | 0 -1 ^ 0 -1 & 0
|
|
18446744073709551615 18446744073709551615 0
|
|
select -1 | 1, -1 ^ 1, -1 & 1;
|
|
-1 | 1 -1 ^ 1 -1 & 1
|
|
18446744073709551615 18446744073709551614 1
|
|
select 1 | -1, 1 ^ -1, 1 & -1;
|
|
1 | -1 1 ^ -1 1 & -1
|
|
18446744073709551615 18446744073709551614 1
|
|
select 0 | -1, 0 ^ -1, 0 & -1;
|
|
0 | -1 0 ^ -1 0 & -1
|
|
18446744073709551615 18446744073709551615 0
|
|
select -1 >> 0, -1 << 0;
|
|
-1 >> 0 -1 << 0
|
|
18446744073709551615 18446744073709551615
|
|
select -1 >> 1, -1 << 1;
|
|
-1 >> 1 -1 << 1
|
|
9223372036854775807 18446744073709551614
|