#319 (ok 2.11) BIT datatype

closed-accepted
None
1
2007-08-21
2006-08-06
ich
No

As of MySQL 5.0.3 BIT(n) is a regular datatyp (not a
synonym for TINYINT/BOOL anymore).

n may range from 1 to 64. Storage space is from 1 to 4
bytes.

Current MySQL documentation ist to be found in chapters
11.1.1, 11.2 and 11.5.

There is no feature request or change history entry in
the database yet.

Discussion

  • ich

    ich - 2006-08-09
    • summary: BIT Datatyp --> BIT datatype
     
  • Marc Delisle

    Marc Delisle - 2006-10-13

    Logged In: YES
    user_id=210714

    We could add BIT to $cfg['ColumnTypes'], no problem. I'm
    curious, do you expect phpMyAdmin to enable data entry in a
    BIT field?

     
  • Marc Delisle

    Marc Delisle - 2006-10-13
    • assigned_to: nobody --> lem9
     
  • ich

    ich - 2006-10-14

    Logged In: YES
    user_id=1569732

    Data entry would be connected to data display. I'd prefer a
    clear data display, so data entry would be inevitable. Of
    course the number of bits (1..64) should be the number of
    checkboxes displayed. Without checkbox display the number
    would be too meaningless to the user. The extraction of the
    number needs to be broken down to 32 bit, easily done i.e.
    by "(Bitcolumn<<32)>>32 AS lowerBits, Bitcolumn>>32 AS
    upperBits". If that is too complex to realise of course a
    no-display BIT-type or a display-only BIT-type would be
    better than no BIT-type at all.

     
  • Marc Delisle

    Marc Delisle - 2006-11-19
    • assigned_to: lem9 --> nobody
     
  • Michael Lee

    Michael Lee - 2007-02-25

    Logged In: YES
    user_id=1728620
    Originator: NO

    This feature is very useful (critical/fatal) to me because only "BIT" data type can map to 'boolean' data type in Delphi.
    I only need the support of 'BIT(1)', which is "0" or "1".
    A HEX number display/data entry should be good enough to most users.
    Decimal number display/data entry is also good because many people only use "BIT(1)" to store boolean values.

     
  • Christian Schmidt

    Logged In: YES
    user_id=32013
    Originator: NO

    Here is a patch that adds rudimentary support for BIT columns:
    https://dev.dev.peytz.dk/~dr/pma-bit.patch

    I only works when using the mysqli extension, i.e. when $cfg['Servers'][$i]['extension'] is 'mysqli':

    It hasn't been tested much and probably needs some clean-up, but if BIT support is crucial to you, it is probably better than nothing.

     
  • Marc Delisle

    Marc Delisle - 2007-04-17

    Logged In: YES
    user_id=210714
    Originator: NO

    Moved to Patches

     
  • Marc Delisle

    Marc Delisle - 2007-04-19

    Patch from c960657

     
  • Marc Delisle

    Marc Delisle - 2007-04-19

    Logged In: YES
    user_id=210714
    Originator: NO

    File Added: pma-bit.patch

     
  • Marc Delisle

    Marc Delisle - 2007-04-19
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-04-19

    Logged In: YES
    user_id=210714
    Originator: NO

    Excellent patch, thanks. Merged for 2.11.

    As an improvement we could check if the MySQL version supports BIT type. We'll see.

     
  • Marc Delisle

    Marc Delisle - 2007-04-19
    • priority: 5 --> 1
    • summary: BIT datatype --> (ok 2.11) BIT datatype
    • status: open --> open-accepted
     
  • Marc Delisle

    Marc Delisle - 2007-08-21
    • status: open-accepted --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks