@@ -248,10 +248,11 @@ def aborttran(self, autocommit = True):
248248 # record error message to dscheck record and clean the lock
249249 def record_dscheck_error (self , errmsg , logact = None ):
250250 if logact is None : logact = self .PGDBI ['EXITLG' ]
251- cnd = self .PGLOG ['DSCHECK' ]['chkcnd' ]
251+ check = PgLOG .PGLOG ['DSCHECK' ]
252+ chkcnd = check ['chkcnd' ] if 'chkcnd' in check else "cindex = {}" .format (check ['cindex' ])
253+ dflags = check ['dflags' ] if 'dflags' in check else ''
252254 if self .PGLOG ['NOQUIT' ]: self .PGLOG ['NOQUIT' ] = 0
253- dflags = self .PGLOG ['DSCHECK' ]['dflags' ]
254- pgrec = self .pgget ("dscheck" , "mcount, tcount, lockhost, pid" , cnd , logact )
255+ pgrec = self .pgget ("dscheck" , "mcount, tcount, lockhost, pid" , chkcnd , logact )
255256 if not pgrec : return 0
256257 if not pgrec ['pid' ] and not pgrec ['lockhost' ]: return 0
257258 (chost , cpid ) = self .current_process_info ()
@@ -271,7 +272,7 @@ def record_dscheck_error(self, errmsg, logact = None):
271272 errmsg = self .break_long_string (errmsg , 512 , None , 50 , None , 50 , 25 )
272273 if pgrec ['tcount' ] > 1 : errmsg = "Try {}: {}" .format (pgrec ['tcount' ], errmsg )
273274 record ['errmsg' ] = errmsg
274- return self .pgupdt ("dscheck" , record , cnd , logact )
275+ return self .pgupdt ("dscheck" , record , chkcnd , logact )
275276
276277 # local function to log query error
277278 def qelog (self , dberror , sleep , sqlstr , vals , pgcnt , logact = None ):
0 commit comments