Permalink
Browse files

Fix: Return status must be signed integer

  • Loading branch information...
1 parent a043c73 commit 9f9fae13aff9922c581ba24a05e7d717ff5f6a65 @patriksimek patriksimek committed Mar 20, 2014
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/token/returnstatus-token-parser.coffee
  2. +2 −2 test/integration/rpc-test.coffee
@@ -1,7 +1,7 @@
-# s2.2.7.15
+# s2.2.7.16
parser = (buffer) ->
- value = buffer.readUInt32LE()
+ value = buffer.readInt32LE()
token =
name: 'RETURNSTATUS'
@@ -156,7 +156,7 @@ exports.procReturnValue = (test) ->
request.on('doneProc', (rowCount, more, returnStatus) ->
test.ok(!more)
- test.strictEqual(returnStatus, 1) # Non-zero indicates a failure.
+ test.strictEqual(returnStatus, -1) # Non-zero indicates a failure.
)
request.on('doneInProc', (rowCount, more) ->
@@ -170,7 +170,7 @@ exports.procReturnValue = (test) ->
"
CREATE PROCEDURE #test_proc
AS
- return 1
+ return -1
",
->
connection.callProcedure(request)

0 comments on commit 9f9fae1

Please sign in to comment.