I have a table with a BIT(1) field and the default set as 1.
The phpmyadmin interface displayed the default as a square on Windows XP.
It looks like phpmyadmin is outputting the bit field as the ascii of the bit value rather than a string equivalent of the binary value.
It is happening on tbl_structure.php, tbl_structure.php
and tbl_export.php
Example table is:
CREATE TABLE IF NOT EXISTS `bit` (
`bit-2` bit(2) NOT NULL default b'1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
Logged In: YES
user_id=210714
Originator: NO
Ok, everything is fixed for 2.11.6 ...except export. It's complex because SHOW CREATE TABLE generates this weird DEFAULT value.
Besides, the exported file imports correctly.
Any opinion about it?
Logged In: YES
user_id=365949
Originator: YES
I think this is possibly a bug in mysql. Everything else that mysql normally outputs is plain text.
It should output it in the format b'xxx'
Gabriel
Logged In: YES
user_id=210714
Originator: NO
I reported this here: http://bugs.mysql.com/bug.php?id=35796 but I'll try to implement a workaround.
Logged In: YES
user_id=210714
Originator: NO
Fix for the data portion of export: merged.
About the CREATE TABLE portion: MySQL will eventually fix this, meanwhile in their mysqldump (5.1.23) the default value is not printable and I see no easy workaround.