From 3d596213bcc7c66a02a71f7c10cabfe14e158233 Mon Sep 17 00:00:00 2001 From: "jingshun.tq" <35712518+Teingi@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:50:14 +0800 Subject: [PATCH] fix analyze parameter/variable (#361) * fix * fix * fix * fix sql_review log * fix build package * fix gather table dump * fix * Temporarily hide the analyze SQL, to be reopened after resolving the slow ply * fix sql plan monitor rows null * fix analyze parameter/variable --- handler/analyzer/analyze_parameter.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/handler/analyzer/analyze_parameter.py b/handler/analyzer/analyze_parameter.py index 98f094a8..26c6c31a 100644 --- a/handler/analyzer/analyze_parameter.py +++ b/handler/analyzer/analyze_parameter.py @@ -90,7 +90,9 @@ def check_file_valid(self): flag = 0 if flag == 0: self.stdio.error('args --file [{0}] is not a valid parameter file, Please specify it again'.format(os.path.abspath(self.parameter_file_name))) - exit(-1) + return False + else: + return True def init_option_default(self): options = self.context.options @@ -110,10 +112,11 @@ def init_option_default(self): if offline_file_option: if not os.path.exists(os.path.abspath(offline_file_option)): self.stdio.error('args --file [{0}] not exist: No such file, Please specify it again'.format(os.path.abspath(offline_file_option))) - exit(-1) + return False else: self.parameter_file_name = os.path.abspath(offline_file_option) - self.check_file_valid() + if not self.check_file_valid(): + return False return True def init_option_diff(self): @@ -138,7 +141,8 @@ def init_option_diff(self): return False else: self.parameter_file_name = os.path.abspath(offline_file_option) - self.check_file_valid() + if not self.check_file_valid(): + return False return True def analyze_parameter_default(self): @@ -166,7 +170,7 @@ def analyze_parameter_default(self): else: if self.parameter_file_name is None: self.stdio.error("the version of OceanBase is lower than 4.2.2, an initialization parameter file must be provided to find non-default values") - exit(-1) + return else: sql = '''select substr(version(),8), svr_ip,svr_port,zone,scope,TENANT_ID,name,value,section, EDIT_LEVEL, now(),'','' from GV$OB_PARAMETERS order by 5,2,3,4,7'''