Skip to content

Commit

Permalink
Update queryanalyse.py
Browse files Browse the repository at this point in the history
修改bug 数据库为空或者表名为空时候处理
  • Loading branch information
baopbird2005 authored Aug 13, 2018
1 parent 069a0ab commit 4cdcedb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions queryanalyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def rowrecord(self):
# print bline.replace("\n", "")
out_sql = out_sql + bline

if isEnd and ((self.search_td != '' and db_name == self.search_td) or (self.search_tb != '' and tb_name == self.search_tb)):
if isEnd and (self.search_tb == '' or self.search_td == '' or (self.search_td != '' and db_name == self.search_td) or (self.search_tb != '' and tb_name == self.search_tb)):
out_file.write(out_sql)
self.total_num = self.total_num + 1
# print out_sql
Expand Down Expand Up @@ -170,4 +170,4 @@ def main():
print '\n******************************************************************************'

if __name__ == "__main__":
main()
main()

0 comments on commit 4cdcedb

Please sign in to comment.