added sane check for line lenght
This commit is contained in:
parent
b3a43a96b1
commit
c26de603bb
@ -26,15 +26,17 @@ def parse_informix_transactions(info):
|
||||
entry = {}
|
||||
parsed.setdefault(instance, [])
|
||||
parsed[instance].append(entry)
|
||||
if "C" in line[2]:
|
||||
entry.setdefault("current_log_id", line[3])
|
||||
elif entry is not None:
|
||||
if ":" in str(line[4]):
|
||||
line[4] = line[4].split(":",1)[0]
|
||||
if ":" in str(line[5]):
|
||||
line[5] = line[5].split(":",1)[0]
|
||||
###in some cases, for some transaction lines there is no info, only a timestamp that should be ignored
|
||||
if len(line) > 2:
|
||||
if "C" in line[2]:
|
||||
entry.setdefault("current_log_id", line[3])
|
||||
elif entry is not None:
|
||||
if ":" in str(line[4]):
|
||||
line[4] = line[4].split(":",1)[0]
|
||||
if ":" in str(line[5]):
|
||||
line[5] = line[5].split(":",1)[0]
|
||||
|
||||
entry.setdefault("session", [line[2], line[3], line[4], line[5]])
|
||||
entry.setdefault("session", [line[2], line[3], line[4], line[5]])
|
||||
return parsed
|
||||
|
||||
#############Transaction with more than 70 locks
|
||||
|
Loading…
Reference in New Issue
Block a user