Bug: BIT fields not displayed properly

[expired user #10387]'s profile image [expired user #10387] posted 7 years ago in General Permalink

A BIT(16) field with data 0000111111111111 is displayed as 11.111.101 (weird formatting recently introduced? Copied as 11111101) and dumped as b'11111101'. phpMyAdmin gives the expected data. mysqldump correctly writes 'ÿ' which is x0F 0xFF. This glitch has been present for a couple of years.

kalvaro's profile image kalvaro posted 7 years ago Permalink

Test code:

create table foo (
    data bit(16)
);
insert into foo (data) values(b'0000111111111111');

Apparently HeidiSQL considers BIT a numeric data type (issue #1) and somehow manages to obtain the base 2 representation from raw binary data to eventually misinterpret it as base 10 (issue #2).

Please login to leave a reply, or register at first.