Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 231344 - Disable "insert records" if there are uncommited updates in table
Disable "insert records" if there are uncommited updates in table
Status: RESOLVED FIXED
Product: db
Classification: Unclassified
Component: SQL Editor
7.4
PC Windows 8 x64
: P3 (vote)
: 7.4
Assigned To: Jaroslav Havlin
issues@db
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-17 09:14 UTC by bolsover
Modified: 2013-06-18 14:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bolsover 2013-06-17 09:14:32 UTC
Netbeans 7.4-beta
Windows 8 x64

Test Results: 

Test suite: DB basic operations
1 Pass
2 Pass
3 Pass
4 Pass

Test suite: MySQL server
1 Pass
2 Pass

Test suite: Oracle DB server, remote connection
Remote Oracle DB server not availbale - not tested
Tested against SQLServer - General Pass

Test suite: Table/Data manipulation
Tested against local MySQL server

1 Pass
2 Pass
3 Pass
4 Fail - 4.1 says 2 buttons enabled - when actually all 5 buttons are enabled Insert, Delete, Commit, Cancel, Truncate
If Insert is selected without prior commit of edit, then the edit is lost but the insert succeeds. I don't think this is a major issue - but it is a fail against the test specification.
5 Fail - Only matches char fields when 2 characters are entered into matching rows text field. e.g. If a data column contains the text 'Charlotte', it is only matched when 'Ch' is entered and not when 'C' entered.
6 Pass
7 Pass
8 Pass
Comment 1 Jaroslav Havlin 2013-06-17 13:29:33 UTC
http://hg.netbeans.org/core-main/rev/35092ef90942
Fixed.

> 4 Fail - 4.1 says 2 buttons enabled - when actually all 5 buttons are enabled
> Insert, Delete, Commit, Cancel, Truncate
I'm not sure whether this should be read as "_only_ two buttons are enabled", or "two buttons are _newly_ enabled" ...

> If Insert is selected without prior commit of edit, then the edit is lost but
> the insert succeeds. I don't think this is a major issue - but it is a fail
> against the test specification.
... but I agree, it's safer if the actions that could damage current changes are disabled.

> 5 Fail - Only matches char fields when 2 characters are entered into matching
> rows text field. e.g. If a data column contains the text 'Charlotte', it is
> only matched when 'Ch' is entered and not when 'C' entered.
It works fine for me. Maybe you have letter 'c' in other values as well. The filter accepts all values that contain 'c', not only the ones that start with 'c'.

Thank you very much for reporting.
Comment 2 Tomas Danek 2013-06-17 14:01:50 UTC
I cannot reproduce as well.
> 5 Fail

Thanks for a fast fix!
Comment 3 bolsover 2013-06-17 14:23:43 UTC
With the could not reproduce comments, I went back and checked my results and was immediately able to reproduce..

Note: I actually created the table and entered row data manually - so apologies if I have made any typo errors in the code that follows - but hopefully the intent is clear.

Using MySQL 
1 Create new testable

delimiter $$

CREATE TABLE 'testtable1' (
 'id' int(11) NOT NULL,
 'name' char(255) DEFAULT NULL,
 'email' char(255) DEFAULT NULL,
 PRIMARY KEY ('id')
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$


2 Insert data

INSERT INTO sakila.testtable1 (id, 'name', email) VALUES (1, 'David Bolsover', 'david@mailserver.com' );
INSERT INTO sakila.testtable1 (id, 'name', email) VALUES (2, 'Charlotte Bolsover', 'charlotte@mailserver.com' );
INSERT INTO sakila.testtable1 (id, 'name', email) VALUES (3, 'Janette Bolsover', 'janette@mailserver.com' );

3 Test matching rows feature using values 'd', 'j', 'c', 'ch'.

Rows 1 and 3 are matched as expected - but row 2 is only matched when entering 'ch'
Comment 4 Jaroslav Havlin 2013-06-17 14:40:28 UTC
Thank you very much, David, for steps to reproduce.
I think that it works correctly. If you use filter value 'c', all rows are matched and visible, because they all contain 'c' in column email, in the ".com" suffix.

If you display query "select name from testtable1;", only the column with value "Charlotte" will be displayed if you use the same filter.
Can you please check it? Thank you.
Comment 5 bolsover 2013-06-17 20:45:37 UTC
You are quite correct - my fault - I've been using a case sensitive database lately and completely ignored the matching lowercase 'c' doh!

Please consider closed.
Comment 6 Jaroslav Havlin 2013-06-18 06:05:49 UTC
> Please consider closed.
OK. Thank you very much for your help!
Comment 7 Quality Engineering 2013-06-18 14:46:41 UTC
Integrated into 'main-golden', will be available in build *201306181109* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/35092ef90942
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #231344: TS 70 DB Sanity test fails


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo