[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-07-19 Thread Aleksei Kovura (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14632738#comment-14632738 ] Aleksei Kovura commented on DERBY-6783: --- Thanks Abhinav and Bryan. I'll try to build

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-28 Thread ASF subversion and git services (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14604889#comment-14604889 ] ASF subversion and git services commented on DERBY-6783: Commit

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-28 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14604893#comment-14604893 ] Bryan Pendleton commented on DERBY-6783: This patch seems to be working well for

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-28 Thread Abhinav Gupta (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14604846#comment-14604846 ] Abhinav Gupta commented on DERBY-6783: -- A short description for workingPatch.patch

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-23 Thread Abhinav Gupta (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14597586#comment-14597586 ] Abhinav Gupta commented on DERBY-6783: -- Hi Bryan, In the error-stacktrace.out, it

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-23 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14597992#comment-14597992 ] Bryan Pendleton commented on DERBY-6783: Yes, this particular test is exercising

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-09 Thread Abhinav Gupta
Hi Bryan, I wrote a new test that has more than one trigger clause and when clause. The trigger fails to update like the previous test when I run the new test in a clean sandbox, but when I run it with my last patch I get an error ERROR XCL12: An attempt was made to put a data value of type

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-08 Thread Abhinav Gupta
Hi Bryan, I updated the patch again and I've been looking at the errors in derby.log of TriggerWhenClauseTest. And there are quite a few errors in derby.log. I've been trying to figure out those recently. Some of them seem to be syntactical errors and that is puzzling me. On Sat, Jun 6, 2015 at

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-08 Thread Bryan Pendleton
I've been looking at the errors in derby.log of TriggerWhenClauseTest. Some of them seem to be syntactical errors I think that's probably expected. A lot of the Derby test suites intentionally submit SQL statements with syntax errors in them (in order to test that the syntax errors are

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-06 Thread Bryan Pendleton
Hi Abhinav, I'd like to study your latest 6783.diff patch. But when I download it and apply it and do a clean build, I get these errors: compile_types: [javac] Compiling 64 source files to C:\Users\Bryan\derby\trunk\classes [javac]

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-06 Thread Abhinav Gupta
Hi Bryan, I'm extremely sorry about it, I think I attached the incorrect patch. Though I noticed when I clean and apply the correct patch, the build fails while running build_toursdb.sql I'm trying to fix it and I'm attaching this patch as well. On Sat, Jun 6, 2015 at 10:05 PM, Bryan Pendleton

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-06 Thread Bryan Pendleton
Though I noticed when I clean and apply the correct patch, the build fails while running build_toursdb.sql I'm trying to fix it and I'm attaching this patch as well. Hi Abhinav, No need to be sorry! Thanks for the updated patch. I am able to apply it, and I see the same problem you do; the

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-05 Thread Bryan Pendleton
I tried to refactor getTriggerActionString, the way you suggested. It still doesn't solve the problem. Hi Abhinav, Thanks for attaching your work. I will try to spend some time looking at it this weekend. Please keep us updated as you continue to dig into the code and explore it in more

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-04 Thread Bryan Pendleton
Another thing that I noticed today was, in this loop that is a part of getTriggerActionString for (ColumnReference ref : refs) { TableName tableName = ref.getQualifiedTableName(); int tableBeginOffset = tableName.getBeginOffset() - actionOffset; I suppose

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-04 Thread Abhinav Gupta
Hi Bryan, I tried to refactor getTriggerActionString, the way you suggested. It still doesn't solve the problem. In my implementation, examineTriggerNodeAndCols returns a string with column positions, so I've two strings one for action node and the other for when node. And then I pass the

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-02 Thread Abhinav Gupta
Hi Bryan, I spent quite some time on this bug today and there was a slight problem with my sort function which I corrected, but from what I infer from the print statements, I have restructured the triggerColsAndTriggerActionCols such that ID has a value 2 for the case when both ID and STATUS are

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-02 Thread Bryan Pendleton
I spent quite some time on this bug today and there was a slight problem with my sort function which I corrected, Wonderful! Thank you for the updates. I see that you have attached the new version to DERBY-6783, and I will try to download that to my sandbox and see what behavior I see.

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-02 Thread Bryan Pendleton
Hi Abhinav, I was able to build and run your sort code, and it seemed to be behaving as you expected it to, but the test case still seemed to be generating the wrong code, such that the when clause was accessing the value of the ID column instead of accessing the value of the STATUS column.) I

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-01 Thread Abhinav Gupta
Hi Bryan, A possible solution that occurred to me was, if we can change the structure of DataDictionaryImpl.getTriggerActionString() such that the order of columns in trigger's REFERENCING clause is changed. Instead of looking up at the columns in action node first, if we put the columns in

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-01 Thread Abhinav Gupta
Hi Bryan, //Now that we know what columns we need for trigger columns and //trigger action columns, we can get rid of remaining -1 entries //for the remaining columns from trigger table. //eg //CREATE TRIGGER tr1 AFTER UPDATE OF c12 ON table1 //REFERENCING OLD AS oldt NEW AS

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-01 Thread Abhinav Gupta
I'm sorry, I clicked on send by mistake without completing the mail, So a possible solution that I have thought of is that if the arrays - triggerActionColsOnly - triggerColsAndTriggerActionCols are different then I will sort the triggerColsAndTriggerActionCols array such that the

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-06-01 Thread Abhinav Gupta
Hi Bryan, I tried implementing the sort logic and I've attached a patch for it. I think the bug still hasn't been solved, I'll try to understand where I'm going wrong with this logic or if there is a mistake with the implementation. On Tue, Jun 2, 2015 at 1:21 AM, Abhinav Gupta

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-29 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14565214#comment-14565214 ] Bryan Pendleton commented on DERBY-6783: Here's a workaround: If the trigger

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-29 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14565277#comment-14565277 ] Bryan Pendleton commented on DERBY-6783: My theory is that the root cause of this

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-28 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14564136#comment-14564136 ] Bryan Pendleton commented on DERBY-6783: In

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-27 Thread Abhinav Gupta
Hi Bryan, I had put a few print statements in CreateTriggerNode.java to look at the values when the trigger node is created, it didn't help me much. So I looked for the piece of code that is responsible for firing the trigger based on the event, I believe that it would be

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-27 Thread Bryan Pendleton
On 5/27/2015 1:14 PM, Abhinav Gupta wrote: Hi Bryan, I had put a few print statements in CreateTriggerNode.java to look at the values when the trigger node is created, it didn't help me much. So I looked for the piece of code that is responsible for firing the trigger based on the event, I

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-25 Thread Abhinav Gupta
Hi Bryan, I did miss out on noticing the incorrect select command. But the bigger issue was that the junit test was unable to run in my sandbox and I would end up with only testout directory and the xml file in the junit_xx directory. The error was a classNotFoundException for

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-25 Thread Bryan Pendleton
I googled for a solution and after a while /ant clean/ apparently worked for me. Good, I am glad to hear it. I regularly clean up my Subversion sandboxes by doing: svn revert -R . ant clobber cleanjars ant clobber is like ant clean, but it cleans up even more things. And

Re: [jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-24 Thread Abhinav Gupta
Hi Bryan, I read the document on JUnit and I tried running it for the new test that I have written. But I can't make sense of the output, 1. junit-single: 2. [junit] Running org.apache.derbyTesting.functionTests.tests.lang.TriggerWhenClauseTest 3. [junit] Tests run: 1,

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-24 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14557858#comment-14557858 ] Bryan Pendleton commented on DERBY-6783: I was able to download the latest

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-22 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14557129#comment-14557129 ] Bryan Pendleton commented on DERBY-6783: Since your new test case is added to one

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-22 Thread Abhinav Gupta (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14556685#comment-14556685 ] Abhinav Gupta commented on DERBY-6783: -- Hi Bryan, Could please guide me on how to

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2015-05-20 Thread Bryan Pendleton (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14553518#comment-14553518 ] Bryan Pendleton commented on DERBY-6783: Abhinav, would it be easier to write a

[jira] [Commented] (DERBY-6783) WHEN clause in CREATE TRIGGER for UPDATE is not working for the sql script below

2014-12-17 Thread Mamta A. Satoor (JIRA)
[ https://issues.apache.org/jira/browse/DERBY-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14250299#comment-14250299 ] Mamta A. Satoor commented on DERBY-6783: WHEN clause was added in release 10.11 so