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

(cherry picked from commit a86524b2bb)
pull/67986/head
Andrew Klychkov 6 years ago committed by GitHub
parent 7051a7ff92
commit 7f90fde5b3
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