diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 04923c9e24c6eaefb81d912bb2256c7a88a28148..7a280c2201cb6d88db71d542a18f828df406d192 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -521,8 +521,8 @@ select count(*) from t1 where x = 18446744073709551601;
 count(*)
 1
 create table t2 (x bigint not null);
-insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed));
-insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed));
+insert into t2(x) values (-16);
+insert into t2(x) values (-15);
 select * from t2;
 x
 -16
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index 5c9b70fadc32b74649e111727cfe2b35cb7da427..30b0c229c65b8f71510b5c904dc1025fa90d5dde 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -568,7 +568,7 @@ create table t1 (a bit(7));
 insert into t1 values (0x60);
 select * from t1;
 Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def	test	t1	t1	a	a	16	7	1	Y	0	0	63
+def	test	t1	t1	a	a	16	7	1	Y	32	0	63
 a
 `
 drop table t1;
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index 8dc016d5a4ac9464309d496196c492773eea9102..97331408b40a33577896a74101df01e3e9773781 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -406,7 +406,7 @@ create table t1 (a bit(7)) engine=innodb;
 insert into t1 values (0x60);
 select * from t1;
 Catalog	Database	Table	Table_alias	Column	Column_alias	Type	Length	Max length	Is_null	Flags	Decimals	Charsetnr
-def	test	t1	t1	a	a	16	7	1	Y	0	0	63
+def	test	t1	t1	a	a	16	7	1	Y	32	0	63
 a
 `
 drop table t1;
diff --git a/sql/field.cc b/sql/field.cc
index 1e42a53e45afefd32425694e8b6e588c49831b89..01811394e38828adde2c2ffcc24b729ccac1d512 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -8166,6 +8166,7 @@ Field_bit::Field_bit(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
     bit_ptr(bit_ptr_arg), bit_ofs(bit_ofs_arg), bit_len(len_arg & 7),
     bytes_in_rec(len_arg / 8)
 {
+  flags|= UNSIGNED_FLAG;
   /*
     Ensure that Field::eq() can distinguish between two different bit fields.
     (two bit fields that are not null, may have same ptr and null_ptr)
@@ -8472,6 +8473,7 @@ Field_bit_as_char::Field_bit_as_char(char *ptr_arg, uint32 len_arg,
   :Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, 0, 0,
              unireg_check_arg, field_name_arg)
 {
+  flags|= UNSIGNED_FLAG;
   bit_len= 0;
   bytes_in_rec= (len_arg + 7) / 8;
 }