@autocommit.setter
def autocommit(self, value):
    "Change the connection's AUTOCOMMIT setting"
    if (self.autocommit is value):
        return
    val = ('on' if value else 'off')
    cur = self.cursor()
    cur.execute('SET SESSION AUTOCOMMIT TO {}'.format(val), use_prepared_statements=False)
    cur.fetchall()
Change the connection's AUTOCOMMIT setting
@autocommit.setter
def autocommit(self, value):
    
    if (self.autocommit is value):
        return
    val = ('on' if value else 'off')
    cur = self.cursor()
    cur.execute('SET SESSION AUTOCOMMIT TO {}'.format(val), use_prepared_statements=False)
    cur.fetchall()