Skip to content

Commit

Permalink
Merge pull request #106 from NoodlesNZ/master
Browse files Browse the repository at this point in the history
MySQL 5.6 Compatibility
  • Loading branch information
jbuchbinder committed Apr 30, 2013
2 parents ee8b9d5 + 710073f commit 7c09669
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mysqld/python_modules/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,18 @@ def update_stats(get_innodb=True, get_master=True, get_slave=True):
for (k,v) in cursor:
global_status[k.lower()] = v
cursor.close()

cursor = conn.cursor(MySQLdb.cursors.Cursor)
cursor.execute("SHOW ENGINES")
have_innodb = False
for row in cursor:
if row[0] == 'InnoDB':
if row[1] == 'DEFAULT' or row[1] == "YES":
have_innodb = True
cursor.close()

# try not to fail ?
get_innodb = get_innodb and variables['have_innodb'].lower() == 'yes'
get_innodb = get_innodb and have_innodb
get_master = get_master and variables['log_bin'].lower() == 'on'

innodb_status = defaultdict(int)
Expand Down

0 comments on commit 7c09669

Please sign in to comment.