bugfix:Repair log extraction

This commit is contained in:
flyly 2021-07-15 18:03:00 +08:00
parent 48a1e97eb6
commit 6c642dfb0f
1 changed files with 3 additions and 3 deletions

View File

@ -75,9 +75,9 @@ def get_parsed_sql(file, user, database, sql_amount, statement):
if output_valid_sql(sql):
SQL_AMOUNT += 1
yield output_valid_sql(sql)
[current_user, current_database] = line.split(' ')[2:4]
if (user and current_user != user) or (
database and current_database != database):
log_info = line.split(' ')
if (user and user not in log_info) or (
database and database not in log_info):
line = file.readline()
continue
execute_flag = True