File tree 2 files changed +10
-1
lines changed
lib/thin/protocol/messages
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ class ExecuteMessage extends MessageWithData {
275
275
// no rows have yet been sent so the header information needs to be sent
276
276
if ( this . currentRow === 0 ) {
277
277
let stmt = this . statement ;
278
- if ( stmt . cursorId !== 0 && ! stmt . requiresFullExecute && ! stmt . requiresDefine && ! stmt . isDdl ) {
278
+ if ( stmt . cursorId !== 0 && ! stmt . requiresFullExecute && ! this . parseOnly && ! stmt . requiresDefine && ! stmt . isDdl && ! this . batchErrors ) {
279
279
if ( stmt . isQuery && ! stmt . requiresDefine && this . options . prefetchRows > 0 ) {
280
280
this . functionCode = constants . TNS_FUNC_REEXECUTE_AND_FETCH ;
281
281
} else {
Original file line number Diff line number Diff line change @@ -471,4 +471,13 @@ describe('162. getStmtInfo.js', function() {
471
471
assert . deepStrictEqual ( result . rows [ 0 ] , [ 'HELLO' ] ) ;
472
472
} ) ;
473
473
474
+ it ( '162.35 Parse and Execute twice ' , async function ( ) {
475
+ const sql = "insert into nodb_number (num, content) values (:num, :val)" ;
476
+ let key = 555 ;
477
+ for ( let i = 0 ; i < 2 ; i ++ ) {
478
+ await conn . getStatementInfo ( sql ) ;
479
+ await conn . execute ( sql , { num :key , val :1234 } ) ;
480
+ key = key + 1 ;
481
+ }
482
+ } ) ;
474
483
} ) ;
You can’t perform that action at this time.
0 commit comments