Bug #75483 Mysqldump bit information dumped in the txt file has whitespace
Submitted: 12 Jan 2015 19:02 Modified: 14 Jan 2015 13:32
Reporter: Ashok Ambrose Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Charsets Severity:S1 (Critical)
Version:5.5.28, 5.6.24, 5.5.42 OS:Any
Assigned to:
Tags: bit, mysqldump

[12 Jan 2015 19:02] Ashok Ambrose
I'm trying to do a mysqldump from a table which has a bit column. When I dump into the .txt file I noticed that the bit '1' is transformed into two whitespace and bit '0' to a single whitespace. 
I did the --hex-blob isn't working too. Can someone tell me a way so that the bit information is transformed in the .txt file without being lost. 

How to repeat:
Following is the command am using

mysqldump -h localhost -u root -ptest  -T data --fields-terminated-by="<EOFD>" --hex-blob  --fields-escaped-by="" --lines-terminated-by="<EORD>" "lportal" "test"

Following is the table data trying to transform:
Description     indicator
Testing	        1
Testing123	0
Testing123	0
Testing123	1
Testing13	1

Following is the way the text file dump is getting created with the bit information lost:
Testing<EOFD><EORD>Testing123<EOFD> <EORD>Testing123<EOFD> <EORD>Testing123<EOFD><EORD>Testing13<EOFD><EORD>
[13 Jan 2015 1:05] Godofredo Miguel Solorzano
Thank you for the bug report. Please to report a bug report test with the last released version (5.5.41) if the issue still exist please provide a test case with a dump file with create table and insert data. Thanks.
[13 Jan 2015 7:40] Shane Bester
Can see it better now with a row number in each. bit fields need to be written in hex format not as ascii chars.

drop table if exists t1;
create table t1(id int,a bit)engine=innodb;
insert into t1 values (1,0),(2,1),(3,0),(4,1);
select id, a,hex(a) from t1;

mysqldump -h127.0.0.1 -uroot --tab="c:/tmp" --fields-terminated-by="<z>" --hex-blob  --fields-escaped-by="" --lines-terminated-by="<y>" test t1

F:\mysql-5.7.5-m15-win32\bin>type c:\tmp\t1.txt
1<z> <y>2<z>☺<y>3<z> <y>4<z>☺<y>
[13 Jan 2015 7:41] Shane Bester
related: http://bugs.mysql.com/bug.php?id=70404
[14 Jan 2015 13:32] Umesh Shastry
Thank you Shane for the test case.

// 5.6.24 on OL6


// 5.5.42 on OL6