-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
"Multi=True" got removed from MySQLCursor.execute()
See https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-execute.html
I got it working with the changes below. As I don't know how logging was looking before, I did not create a Pull Request for this.
diff --git a/resources/lib/storeMySqlSetup.py b/resources/lib/storeMySqlSetup.py
index 0be44c6..a88a7de 100644
--- a/resources/lib/storeMySqlSetup.py
+++ b/resources/lib/storeMySqlSetup.py
@@ -89,12 +89,9 @@ INSERT INTO status values ('UNINIT',0,0,0,3);
#
con = self.conn.getConnection()
cursor = con.cursor()
- for result in cursor.execute(self._setupScript, multi=True):
- if result.with_rows:
- self.logger.debug("Rows produced by statement '{}':", result.statement)
- self.logger.debug(result.fetchall())
- else:
- self.logger.debug("Number of rows affected by statement '{}': {}", result.statement, result.rowcount)
+ cursor.execute(self._setupScript, map_results=True)
+ for statement, result in cursor.fetchsets():
+ self.logger.debug(statement)
cursor.close()
con.commit()
self.logger.debug('End DB setup')
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels