This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. Connect to MySQL DB and expand it's node. 2. Rightclick "Tables" node and choose "Create Table". 3. Add table with 1 columns with BIT type and then add some values with "Insert Record" dialog. 4. Rightclick added table and choose "View Data". Result: Data is shown as checkboxes, but BIT values are returned as binary values. (http://dev.mysql.com/doc/refman/5.0/en/bit-field-values.html). User isn't able to set "1010" for field with BIT type.
MySQL Driver returns BIT for BIT(1) and VARBINARY for BIT(n) where n > 1 So, here here what we will do. We will continue to show the checkbox for BIT(1), since by MySQL manual BIT(1) is equivalent to Boolean, but for column BIT(n) where n > 1, we will display 0's and 1's
Is there way to show all data for BIT value the same? I think we can mislead customer if we have different view for the same type. We should have consistent view for all types.
MySQL driver does return BIT(1) as BIT or Boolean and we have to use getBoolean() and setBoolean() to read/write BIT(1) data, where as BIT(n), where n > 1 is returned as binary data, It actually returns BitString which require special handling for read/write. I am going to check the fix, if you still feel BIT(1) should also be treated same as BIT(n) where n > 1; then I will try to do something. See this: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-type-conversions.html
http://hg.netbeans.org/main/rev/e5101e34f6bc
Fixed.
Verified with build 081207.
Integrated into 'main-golden', will be available in build *200812091520* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/e5101e34f6bc User: ahimanikya@netbeans.org Log: Issue #154855 Default value isn't inserted