1 Star 0 Fork 20

misaka00251/mysql5

forked from src-openEuler/mysql5 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
load_generator.py.py2_py3.patch 2.20 KB
一键复制 编辑 原始数据 按行查看 历史
陈棋德 提交于 2022-05-07 16:39 . upgrade to 5.7.38
diff -urN mysql-5.7.38.orig/mysql-test/suite/innodb_stress/t/load_generator.py mysql-5.7.38.new/mysql-test/suite/innodb_stress/t/load_generator.py
--- mysql-5.7.38.orig/mysql-test/suite/innodb_stress/t/load_generator.py 2022-03-22 01:30:20.000000000 +0800
+++ mysql-5.7.38.new/mysql-test/suite/innodb_stress/t/load_generator.py 2022-05-07 14:41:03.555188841 +0800
@@ -47,12 +47,12 @@
try:
self.runme()
print >> self.log, "ok"
- except Exception, e:
+ except Exception as e:
self.exception = e
try:
cursor = self.con.cursor()
cursor.execute("INSERT INTO errors VALUES('%s')" % e)
- except MySQLdb.Error, e2:
+ except MySQLdb.Error as e2:
print >> self.log, "caught while inserting error (%s)" % e2
print >> self.log, "caught (%s)" % e
finally:
@@ -147,12 +147,12 @@
try:
self.runme()
print >> self.log, "ok"
- except Exception, e:
+ except Exception as e:
try:
cursor = self.con.cursor()
cursor.execute("INSERT INTO errors VALUES('%s')" % e)
con.commit()
- except MySQLdb.Error, e2:
+ except MySQLdb.Error as e2:
print >> self.log, "caught while inserting error (%s)" % e2
print >> self.log, "caught (%s)" % e
@@ -252,13 +252,13 @@
try:
self.runme()
print >> self.log, "ok, with do_blob %s" % self.do_blob
- except Exception, e:
+ except Exception as e:
try:
cursor = self.con.cursor()
cursor.execute("INSERT INTO errors VALUES('%s')" % e)
cursor.execute("COMMIT")
- except MySQLdb.Error, e2:
+ except MySQLdb.Error as e2:
print >> self.log, "caught while inserting error (%s)" % e2
print >> self.log, "caught (%s)" % e
@@ -358,7 +358,7 @@
elif r == 4:
self.con.rollback()
- except MySQLdb.Error, e:
+ except MySQLdb.Error as e:
if e.args[0] == 2006: # server is killed
print >> self.log, "mysqld down, transaction %d" % self.xid
return
@@ -367,7 +367,7 @@
try:
self.con.commit()
- except Exception, e:
+ except Exception as e:
print >> self.log, "commit error %s" % e
if __name__ == '__main__':
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/misaka00251/mysql5.git
[email protected]:misaka00251/mysql5.git
misaka00251
mysql5
mysql5
master

搜索帮助