Dirty fixing of some more mariadb -> mysql-connector issues....

This commit is contained in:
Cedric
2023-08-05 18:17:57 +02:00
parent e4586a5834
commit 7f55828c5f
5 changed files with 12 additions and 7 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import threading
import time
import mysql.connector
from mysql.connector.cursor import CursorBase
# noinspection PyProtectedMember
from pkg_resources import parse_version
@@ -64,7 +65,8 @@ class DB:
with self.pool.get_connection() as conn:
conn.auto_reconnect = True
conn.autocommit = True
with conn.cursor(dictionary=True) as cur:
with conn.cursor(dictionary=True, buffered=True) as cur:
cur: CursorBase
try:
string: str = sql.upper()
+1 -1
View File
@@ -188,7 +188,7 @@ class PorkService:
org_id, org_name, org_rank_name, org_rank_id, dimension, head_id,
pvp_rating, pvp_title, source, last_updated)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
"""
""".replace("?", "%s")
cur.execute(insert_sql,
[char_info["char_id"], char_info["name"], char_info["first_name"], char_info["last_name"],