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.
For a table like create table `quo+ted` ( `i-d` int not null); on MySQL I can't delete rows. Moreover, there is no information that the row could not be deleted.
I just tested it in my sql, it seems like working for me. INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Insert Statement: INSERT INTO `test`.`quo+ted` (`test`.`quo+ted`.`i-d`) Values(1) INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Insert Statement: INSERT INTO `test`.`quo+ted` (`test`.`quo+ted`.`i-d`) Values(2) INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Delete Statement: DELETE FROM `test`.`quo+ted` WHERE `test`.`quo+ted`.`i-d` = '2' INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Delete Statement: DELETE FROM `test`.`quo+ted` WHERE `test`.`quo+ted`.`i-d` = '1'
With the latest version from the wiki: INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Insert Statement: INSERT INTO `test`.`ano+ther` (`test`.`ano+ther`.`i-d`) Values(1) INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Insert Statement: INSERT INTO `test`.`ano+ther` (`test`.`ano+ther`.`i-d`) Values(2) INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Insert Statement: INSERT INTO `test`.`ano+ther` (`test`.`ano+ther`.`i-d`) Values(3) INFO [org.netbeans.modules.db.dataview.output.DataViewOutputPanel]: Delete Statement: DELETE FROM `test`.`ano+ther` WHERE i-d = '2' And in the DataView output tab: Record successfully inserted. Record successfully inserted. Record successfully inserted. Delete command failed Error code 1054, SQL state 42S22 -- Unknown column 'i' in 'where clause' Using SQL:DELETE FROM `test`.`ano+ther` WHERE i-d = '2' Error code 1054, SQL state 42S22 -- Unknown column 'i' in 'where clause'
Not sure whats going on, I just tested and it works fine for me It executed this successfully (putting the quote appropriately) DELETE FROM `test`.`quo+ted` WHERE `test`.`quo+ted`.`i-d` = '3' Make sure you use the latest drop from the wiki.
Sorry, but: - I still can reproduce this in version 13. - You could see from the output I attached that I used the current version (since there were no messages in the output window in the older version I used when I opened this issue). So you should try to find out what's going on, not close saying "it works for me". Upping priority to P1 because row deletion is basic functionality.
Created the table using sql editor create table `quo+ted` ( `i-d` int not null); Now inserted the row using data view -- the following DMML executed successfully INSERT INTO `test`.`quo+ted` (`test`.`quo+ted`.`i-d`) Values(1) Deleted using using data view -- the following DMML executed successfully DELETE FROM `test`.`quo+ted` WHERE `test`.`quo+ted`.`i-d` = '1' Not sure where the problem is. Can someone else test this ? Use the following drop to test http://wiki.netbeans.org/attach/DatabaseShowDataModuleReview1/DataViewSuite.zip?version=15
Ah, that is the difference. I suggest you look at the code which computes the WHERE clause.
Yes, I know that there is a difference in qualifier for 'i-d', and I am sure the code does put the qualifier. So, there is no way I can investigate further unless I can reproduce this.
Yes, I understand you are sure. I've had my share of malfunctions where I was sure my code was right, still it was malfunctioning. Please read the code and try to find a way it could forget to quote the column name.
Fixed in the latest drop. Nithya will check in the same to the repository. http://wiki.netbeans.org/attach/DatabaseShowDataModuleReview1/DataViewSuite.zip?version=16 I was able to reproduce this if I create the table using create table `quo+ted` ( `i-d` int primary key ); instead of create table `quo+ted` ( `i-d` int not null); as suggested in the bug
Adding Nithya to the CC list
The fix for this issue has been checked in into db.dataview module. Please refer changeset: 83721:70733f3cf54d
I'm still able to reproduce this issue with the latest sources from repository (build 080625): DELETE FROM `test`.`ano+ther` WHERE i-d = '2'; - fails. DELETE FROM `test`.`ano+ther` WHERE `i-d` = '2'; - passes.
I think there is some misunderstanding here, If you run DELETE FROM `test`.`ano+ther` WHERE i-d = '2'; explicitly in the sqleditor, it should fail This bug was about Delete feature in data view. Create a table using create table `quo+ted` ( `i-d` int primary key ); add few rows and then try to delete a row, it should work. Making as fixed.
Verified with build 080626.