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.

Bug 150273

Summary: Inconsistent view for BIT type
Product: db Reporter: Roman Mostyka <romanmostyka>
Component: Show DataAssignee: Shansi 11 <sivashankari>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 152437    

Description Roman Mostyka 2008-10-15 18:57:27 UTC
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 some values with "Insert Record" dialog.
4. Rightclick added table and choose "View Data".

Result: Data is shown as checkbox.

5. Click some cell.

Result: Checkbox becomes string "true" or "false".
Comment 1 _ ahimanikya 2008-10-17 21:26:47 UTC
Agree, what you think will be better, string "true", "false" or checkbox?
Comment 2 Roman Mostyka 2008-10-21 08:08:57 UTC
Actually I'm not sure that all these values are appropriated.
Please correct me if I'm wrong, but I read here that BIT value isn't the same as BOOL in MySQL:
http://dev.mysql.com/doc/refman/5.0/en/bit-field-values.html
Comment 3 David Vancouvering 2008-10-29 00:55:00 UTC
It should be 1 or 0 - that's what a BIT is, it's not a boolean, which is what a checkbox or "true"/"false" implies.
Comment 4 Roman Mostyka 2008-11-19 14:20:33 UTC
ahimanikya, can You take a look at this issue? This issue is P3, but it looks like presented functionality doesn't work
well and therefore this issue is going to be included into NetBeans 6.5 Patch 1.
Please fix it till 27 November (this is code freeze date for Patch 1) or update this issue with justification why the
fix isn't possible till this date.
Thanks.
Comment 5 pgebauer 2008-11-24 09:29:18 UTC
The issue didn't pass the nomination process by nomination cut-off date. It has been marked as 65fixes2-candidate.
Comment 6 Roman Mostyka 2008-12-04 16:56:56 UTC
I went through the list of issues and found that this issue isn't fixed yet, but we found out that BIT type for MySQL it
isn't boolean, so we just have wrong appearance for this type and therefore it is P1.
Sivashankari, please look at it.
Comment 7 _ ahimanikya 2008-12-04 23:12:28 UTC
Its better we express BIT as BOOLEAN, setting value to "0" or "1" can confuse user with numeric columns.

But I agree we need to be consistent. The Bug is valid, it should turn to "true" or "false" after editing, it remain a
checkbox. 
Comment 8 Shansi 11 2008-12-05 02:00:22 UTC
Needs Verification
http://hg.netbeans.org/main/rev/80320faf63ad
Comment 9 Roman Mostyka 2008-12-07 01:16:02 UTC
Verified with build 081205.
Comment 10 pgebauer 2008-12-18 14:48:35 UTC
The fix has been ported into the release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/05b6eacf0997