From 391be0f52ba4b1e7d97ff74b7b76b44b00eadd38 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 2 Aug 2022 23:29:12 +0800 Subject: [PATCH] up --- class/plugin/orm.py | 4 ++-- plugins/mysql/conf/my8.0.cnf | 2 +- plugins/mysql/index.py | 10 ---------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/class/plugin/orm.py b/class/plugin/orm.py index 64ffd1790..562d16906 100755 --- a/class/plugin/orm.py +++ b/class/plugin/orm.py @@ -26,11 +26,11 @@ class ORM: try: self.__DB_CONN = pymysql.connect(host=self.__DB_HOST, user=self.__DB_USER, passwd=self.__DB_PASS, - port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, cursorclass=pymysql.cursors.DictCursor) + port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, unix_socket=self.__DB_SOCKET, cursorclass=pymysql.cursors.DictCursor) except Exception as e: self.__DB_HOST = '127.0.0.1' self.__DB_CONN = pymysql.connect(host=self.__DB_HOST, user=self.__DB_USER, passwd=self.__DB_PASS, - port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, cursorclass=pymysql.cursors.DictCursor) + port=int(self.__DB_PORT), charset=self.__DB_CHARSET, connect_timeout=1, unix_socket=self.__DB_SOCKET, cursorclass=pymysql.cursors.DictCursor) self.__DB_CUR = self.__DB_CONN.cursor() return True diff --git a/plugins/mysql/conf/my8.0.cnf b/plugins/mysql/conf/my8.0.cnf index 448a8fe1d..21526ddca 100644 --- a/plugins/mysql/conf/my8.0.cnf +++ b/plugins/mysql/conf/my8.0.cnf @@ -51,7 +51,7 @@ slow-query-log-file={$SERVER_APP_PATH}/data/mysql-slow.log long_query_time=10 log_queries_not_using_indexes=1 log_slow_admin_statements=1 -log_slow_slave_statements=1 +log_slow_replica_statements=1 binlog_expire_logs_seconds=2592000 relay-log=mdserver diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index fb7023a7d..816b4be67 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -732,16 +732,6 @@ def isSqlError(mysqlMsg): return None -def mapToList(map_obj): - # map to list - try: - if type(map_obj) != list and type(map_obj) != str: - map_obj = list(map_obj) - return map_obj - except: - return [] - - def __createUser(dbname, username, password, address): pdb = pMysqlDb()