!1092 Fix issue: Fix a bug on the index advisor: Repair log extraction to identify database information

Merge pull request !1092 from liuly/2.0.0
This commit is contained in:
opengauss-bot 2021-07-15 11:47:42 +00:00 committed by Gitee
commit 009f101444
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