Menu

#2667 (ok 2.11.6) BIT defaults displayed incorrectly

2.11.5.1
fixed
Interface (555)
1
2013-06-11
2008-03-26
No

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;

Discussion

  • Marc Delisle

    Marc Delisle - 2008-03-30
    • milestone: 794588 --> 2.11.5.1
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2008-04-02

    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?

     
  • Marc Delisle

    Marc Delisle - 2008-04-02
    • status: open --> open-fixed
     
  • gabriel harrison

    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

     
  • Marc Delisle

    Marc Delisle - 2008-04-03

    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.

     
  • Marc Delisle

    Marc Delisle - 2008-04-06

    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.

     
  • Marc Delisle

    Marc Delisle - 2008-04-06
    • priority: 5 --> 1
    • summary: BIT defaults displayed incorrectly --> (ok 2.11.6) BIT defaults displayed incorrectly
     
  • Marc Delisle

    Marc Delisle - 2008-04-29
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed