RETURNING clause does not work on an UPDATE statement with WHERE CURRENT OF ...
-------------------------------------------------------------------------------

                 Key: CORE-3709
                 URL: http://tracker.firebirdsql.org/browse/CORE-3709
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.1, 2.1.4, 2.5.0, 2.0.6, 2.1.3, 2.1.2, 2.0.5, 2.1.1, 
2.1.0
         Environment: Win7 64 bit
            Reporter: Jason Wharton
            Priority: Critical


Here is the trace log of my session. The cursor named does indeed exist as this 
statement would work without the addition of the RETURNING clause.

/*---
EXECUTE IMMEDIATE 2
DB_HANDLE = 1
TR_HANDLE = 4

UPDATE TEST
  SET FIRSTNAME = ? /* NEW.FIRSTNAME */
WHERE CURRENT OF C3583673650024551
RETURNING ID, BLOBFIELD, FIRSTNAME, LASTNAME, MIDDLENAME, FULLNAME

PARAMS = [  Version 1 SQLd 1 SQLn 1
  TEST.FIRSTNAME = 'r' (1 of 80 bytes) ]
FIELDS = [  Version 1 SQLd 6 SQLn 6
  TEST.ID = 0
  TEST.BLOBFIELD = BLOB ID ( 128, 0 )
  TEST.FIRSTNAME = 'r' (1 of 80 bytes)
  TEST.LASTNAME = '' (0 of 80 bytes)
  TEST.MIDDLENAME = <NULL> < SQLType: 449 SQLLen: 80 Addr: 79564938 >
  TEST.FULLNAME = <NULL> < SQLType: 449 SQLLen: 252 Addr: 79565022 > ]

ERRCODE = 335544569
----*/
/*---
INTERPRET BUFFER = 

ERRCODE = 17
----*/
/*---
INTERPRET BUFFER = Dynamic SQL Error

ERRCODE = 21
----*/
/*---
INTERPRET BUFFER = SQL error code = -104

ERRCODE = 32
----*/
/*---
INTERPRET BUFFER = Token unknown - line 4, column 1

ERRCODE = 9
----*/
/*---
INTERPRET BUFFER = RETURNING

ERRCODE = -1
----*/


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to