File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,13 @@ export class WsStmt2 implements WsStmt{
227227 } ,
228228 } ;
229229 await this . execute ( execMsg ) ;
230+ this . cleanup ( ) ;
231+ }
232+
233+ private cleanup ( ) {
234+ this . _stmtTableInfo . clear ( ) ;
235+ this . _stmtTableInfoList = [ ] ;
236+ this . _currentTableInfo = new TableInfo ( ) ;
230237 }
231238
232239 getLastAffected ( ) : number | null | undefined {
@@ -282,11 +289,11 @@ export class WsStmt2 implements WsStmt{
282289 if ( resp . fields ) {
283290 this . fields = resp . fields ;
284291 }
292+
285293 if ( resp . is_insert ) {
286294 this . _isInsert = resp . is_insert ;
287- } else {
288- this . _toBeBindColCount = resp . fields_count ? resp . fields_count : 0 ;
289295 }
296+
290297 return resp ;
291298 }
292299
Original file line number Diff line number Diff line change @@ -505,6 +505,7 @@ describe('TDWebSocket.Stmt()', () => {
505505 params . setVarchar ( [ 'SanFrancisco' ] ) ;
506506 params . setInt ( [ 7 ] ) ;
507507 await stmt . setTags ( params )
508+
508509 let dataParams = stmt . newStmtParam ( )
509510 dataParams . setTimestamp ( multi [ 0 ] )
510511 dataParams . setFloat ( multi [ 1 ] )
You can’t perform that action at this time.
0 commit comments