You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Meenakshi Sundar Sitaraman (JIRA)" <ji...@apache.org> on 2009/03/17 11:36:50 UTC

[jira] Created: (DERBY-4099) Update Multiple Columns SQL

Update Multiple Columns SQL
---------------------------

                 Key: DERBY-4099
                 URL: https://issues.apache.org/jira/browse/DERBY-4099
             Project: Derby
          Issue Type: Bug
          Components: SQL
            Reporter: Meenakshi Sundar Sitaraman
            Priority: Critical


When I try to execute the following query

update table_name set n1=5, average=(n1+n2)/2 where ....

The new value of n1 (viz. 5 in this case) is not used when calculating the average. While the new value of n1 is used in MySQL, the old value is used in Derby.

Appreciate your support in resolving this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-4099) Update Multiple Columns SQL

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-4099.
-------------------------------------

    Resolution: Invalid

Closing as Invalid since the current behaviour is standards-compliant and the suggested new behaviour is not.

> Update Multiple Columns SQL
> ---------------------------
>
>                 Key: DERBY-4099
>                 URL: https://issues.apache.org/jira/browse/DERBY-4099
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Meenakshi Sundar Sitaraman
>            Priority: Critical
>
> When I try to execute the following query
> update table_name set n1=5, average=(n1+n2)/2 where ....
> The new value of n1 (viz. 5 in this case) is not used when calculating the average. While the new value of n1 is used in MySQL, the old value is used in Derby.
> Appreciate your support in resolving this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4099) Update Multiple Columns SQL

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702911#action_12702911 ] 

Knut Anders Hatlen commented on DERBY-4099:
-------------------------------------------

As far as I can tell, Derby's behaviour is in accordance with the SQL standard, whereas MySQL's behaviour is not. (PostgreSQL behaves the same way as Derby, by the way.)

>From ISO/IEC 9075-2:2003 - 14.11 <update statement: searched> - General Rules:

9) The <update source> of each <set clause> is effectively evaluated for each row of T before any row of T
is updated.

> Update Multiple Columns SQL
> ---------------------------
>
>                 Key: DERBY-4099
>                 URL: https://issues.apache.org/jira/browse/DERBY-4099
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Meenakshi Sundar Sitaraman
>            Priority: Critical
>
> When I try to execute the following query
> update table_name set n1=5, average=(n1+n2)/2 where ....
> The new value of n1 (viz. 5 in this case) is not used when calculating the average. While the new value of n1 is used in MySQL, the old value is used in Derby.
> Appreciate your support in resolving this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4099) Update Multiple Columns SQL

Posted by "Tiago R. Espinha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702935#action_12702935 ] 

Tiago R. Espinha commented on DERBY-4099:
-----------------------------------------

Given this, then the bug would be on MySQL's end and not on ours. On a strictly personal level, I do prefer the behaviour specified by the standard.

> Update Multiple Columns SQL
> ---------------------------
>
>                 Key: DERBY-4099
>                 URL: https://issues.apache.org/jira/browse/DERBY-4099
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Meenakshi Sundar Sitaraman
>            Priority: Critical
>
> When I try to execute the following query
> update table_name set n1=5, average=(n1+n2)/2 where ....
> The new value of n1 (viz. 5 in this case) is not used when calculating the average. While the new value of n1 is used in MySQL, the old value is used in Derby.
> Appreciate your support in resolving this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.