OSDN Git Service

alpha commit for 0.9.9.2
[rec10/rec10-git.git] / rec10 / trunk / src / dbMySQL.py
index 4e6d1f9..f7c43a4 100644 (file)
@@ -72,6 +72,10 @@ class DB_MySQL:
         """
         con = MySQLdb.connect(db=self.dbname, host=self.dbhost, port=self.dbport, user=self.dbusr, passwd=self.dbpasswd, charset="utf8")
         cur = con.cursor()
+        try:
+            con.autocommit(1)
+        except:
+            ""
         cur.execute('set names utf8;')
         return [con, cur]
     def close_db(self, db):