Bugfix of 65525: proxysql in check_config TypeError: tuple indices must be integers, not str (#66850)

pull/66850/merge
Andrew Klychkov 5 years ago committed by GitHub
parent 7ef7c1b5d7
commit a86524b2bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -259,6 +259,10 @@ class ProxySQLServer(object):
cursor.execute(query_string, query_data)
check_count = cursor.fetchone()
if isinstance(check_count, tuple):
return int(check_count[0]) > 0
return (int(check_count['host_count']) > 0)
def get_server_config(self, cursor):

@ -119,6 +119,10 @@ def check_config(variable, value, cursor):
cursor.execute(query_string, query_data)
check_count = cursor.fetchone()
if isinstance(check_count, tuple):
return int(check_count[0]) > 0
return (int(check_count['variable_count']) > 0)

Loading…
Cancel
Save