db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6543) Syntax error when reference to transition variable has whitespace around it
Date Mon, 06 Oct 2014 21:51:35 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14161033#comment-14161033
] 

ASF subversion and git services commented on DERBY-6543:
--------------------------------------------------------

Commit 1629771 from [~myrna] in branch 'code/branches/10.10'
[ https://svn.apache.org/r1629771 ]

DERBY-6543; Syntax error when reference to transition variable has whitespace around it
   merge of revision 1589036 from trunk

> Syntax error when reference to transition variable has whitespace around it
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-6543
>                 URL: https://issues.apache.org/jira/browse/DERBY-6543
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.10.2.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Myrna van Lunteren
>             Fix For: 10.11.1.1
>
>         Attachments: d6543-1a.diff
>
>
> If a trigger action references a transition variable and has whitespace around the period
sign that separates the transition variable name from the column name, it fails with a syntax
error.
> For example:
> {noformat}
> ij> create table t1(x int);
> 0 rows inserted/updated/deleted
> ij> create table t2(x int);
> 0 rows inserted/updated/deleted
> ij> --fails
> create trigger tr1 after insert on t1 referencing new as new
> for each row insert into t1 select x from t2 where x = new . x;
> ERROR 42X01: Syntax error: Encountered "x" at line 1, column 150.
> Issue the 'help' command for general information on IJ command syntax.
> Any unrecognized commands are treated as potential SQL commands and executed directly.
> Consult your DBMS server reference documentation for details of the SQL syntax supported
by your server.
> ij> --succeeds
> create trigger tr2 after insert on t1 referencing new as new
> for each row insert into t1 select x from t2 where x = new.x;
> 0 rows inserted/updated/deleted
> {noformat}
> The only difference between the failing trigger definition and the successful one, is
that the former says "new . x" and the latter "new.x".
> Both should succeed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message