1select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
21+1	1-1	1+1*2	8/5	8%5	mod(8,5)	mod(8,5)|0	-(1+1)*-2
32	0	3	1.6000	3	3	3	4
4explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
5id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
61	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
7Warnings:
8Warning	1681	'EXTENDED' is deprecated and will be removed in a future release.
9Note	1003	/* select#1 */ select (1 + 1) AS `1+1`,(1 - 1) AS `1-1`,(1 + (1 * 2)) AS `1+1*2`,(8 / 5) AS `8/5`,(8 % 5) AS `8%5`,(8 % 5) AS `mod(8,5)`,((8 % 5) | 0) AS `mod(8,5)|0`,(-((1 + 1)) * -(2)) AS `-(1+1)*-2`
10select 1 | (1+1),5 & 3,bit_count(7) ;
111 | (1+1)	5 & 3	bit_count(7)
123	1	3
13explain extended select 1 | (1+1),5 & 3,bit_count(7) ;
14id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
151	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
16Warnings:
17Warning	1681	'EXTENDED' is deprecated and will be removed in a future release.
18Note	1003	/* select#1 */ select (1 | (1 + 1)) AS `1 | (1+1)`,(5 & 3) AS `5 & 3`,bit_count(7) AS `bit_count(7)`
19select 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60;
201 << 32	1 << 63	1 << 64	4 >> 2	4 >> 63	1<< 63 >> 60
214294967296	9223372036854775808	0	1	0	8
22select -1 | 0, -1 ^ 0, -1 & 0;
23-1 | 0	-1 ^ 0	-1 & 0
2418446744073709551615	18446744073709551615	0
25select -1 | 1, -1 ^ 1, -1 & 1;
26-1 | 1	-1 ^ 1	-1 & 1
2718446744073709551615	18446744073709551614	1
28select  1 | -1,  1 ^ -1,  1 & -1;
291 | -1	1 ^ -1	1 & -1
3018446744073709551615	18446744073709551614	1
31select  0 | -1,  0 ^ -1,  0 & -1;
320 | -1	0 ^ -1	0 & -1
3318446744073709551615	18446744073709551615	0
34select -1 >> 0, -1 << 0;
35-1 >> 0	-1 << 0
3618446744073709551615	18446744073709551615
37select -1 >> 1, -1 << 1;
38-1 >> 1	-1 << 1
399223372036854775807	18446744073709551614
40drop table if exists t1,t2;
41create table t1(a int);
42create table t2(a int, b int);
43insert into t1 values (1), (2), (3);
44insert into t2 values (1, 7), (3, 7);
45select t1.a, t2.a, t2.b, bit_count(t2.b) from t1 left join t2 on t1.a=t2.a;
46a	a	b	bit_count(t2.b)
471	1	7	3
482	NULL	NULL	NULL
493	3	7	3
50drop table t1, t2;
51