DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
a BIT ,
b BIT(20) ,
c BIT(64) ,
d BIT(1) ,
PRIMARY KEY (c)
) ENGINE=rocksdb;
SHOW COLUMNS IN t1;
Field	Type	Null	Key	Default	Extra
a	bit(1)	YES		NULL	
b	bit(20)	YES		NULL	
c	bit(64)	NO	PRI	NULL	
d	bit(1)	YES		NULL	
ALTER TABLE t1 DROP COLUMN d;
ALTER TABLE t1 ADD COLUMN d BIT(0) ;
SHOW COLUMNS IN t1;
Field	Type	Null	Key	Default	Extra
a	bit(1)	YES		NULL	
b	bit(20)	YES		NULL	
c	bit(64)	NO	PRI	NULL	
d	bit(1)	YES		NULL	
INSERT INTO t1 (a,b,c,d) VALUES (0,POW(2,20)-1,b'1111111111111111111111111111111111111111111111111111111111111111',1);
SELECT BIN(a), HEX(b), c+0 FROM t1 WHERE d>0;
BIN(a)	HEX(b)	c+0
0	FFFFF	18446744073709551615
INSERT INTO t1 (a,b,c,d) VALUES (1,0,-2,0);
SELECT a+0, b+0, c+0 FROM t1 WHERE d<100;
a+0	b+0	c+0
0	1048575	18446744073709551615
1	0	18446744073709551614
INSERT INTO t1 (a,b,c,d) VALUES (b'1', 'f', 0xFF, 0x0);
SELECT a+0, b+0, c+0 FROM t1 WHERE d IN (0, 2);
a+0	b+0	c+0
1	0	18446744073709551614
1	102	255
DELETE FROM t1;
INSERT INTO t1 (a,b,c,d) VALUES (0x10,0,0,1);
Warnings:
Warning	1264	Out of range value for column 'a' at row 1
SELECT a+0,b+0,c+0,d+0 FROM t1;
a+0	b+0	c+0	d+0
1	0	0	1
INSERT INTO t1 (a,b,c,d) VALUES (0x01,0,0x10000000000000000,0);
Warnings:
Warning	1264	Out of range value for column 'c' at row 1
SELECT a+0,b+0,c+0,d+0 FROM t1;
a+0	b+0	c+0	d+0
1	0	0	1
1	0	18446744073709551615	0
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY, a BIT(65) ) ENGINE=rocksdb;
ERROR 42000: Display width out of range for 'a' (max = 64)
