From fbe485794407df342fa9fb6dff44fe3cfab6ddf4 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 23 May 2024 11:23:05 +0800 Subject: [PATCH] Update index.py --- plugins/mariadb/index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 1831d7648..f9afb5b16 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -2710,6 +2710,9 @@ def doFullSyncUser(version=''): writeDbSyncStatus({'code': 4.1, 'msg': '正在导入数据中,别着急...', 'progress': 59}) return False + if os.path.exists(bak_file): + db.execute('reset master') + time_s = time.time() if os.path.exists(bak_file): pwd = pSqliteDb('config').where('id=?', (1,)).getField('mysql_root') @@ -2725,7 +2728,7 @@ def doFullSyncUser(version=''): "' " + sync_db + '<' + bak_file print(my_import_cmd) mw.execShell(my_import_cmd) - + time_e = time.time() import_cos = time_e - time_s print("import cos:", import_cos)