Skip to content

Commit

Permalink
fix analyze parameter/variable (#361)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Teingi authored Jul 23, 2024
1 parent c38f36b commit 3d59621
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions handler/analyzer/analyze_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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'''
Expand Down

0 comments on commit 3d59621

Please sign in to comment.