Update index.py

pull/577/head
Mr Chen 1 year ago
parent ea7310502f
commit c89ee89061
  1. 12
      plugins/mysql/index.py

@ -3119,12 +3119,12 @@ def doFullSyncUser(version=''):
db.execute('reset master') db.execute('reset master')
# 不锁表,需要删除原来数据表 # 不锁表,需要删除原来数据表
tables = db.query('show tables from `%s`' % sync_db_import) # tables = db.query('show tables from `%s`' % sync_db_import)
table_key = "Tables_in_" + sync_db_import # table_key = "Tables_in_" + sync_db_import
for tname in tables: # for tname in tables:
drop_db_cmd = 'drop table if exists '+sync_db_import+'.'+tname[table_key] # drop_db_cmd = 'drop table if exists '+sync_db_import+'.'+tname[table_key]
# print(drop_db_cmd) # # print(drop_db_cmd)
db.query(drop_db_cmd) # db.query(drop_db_cmd)
pwd = pSqliteDb('config').where('id=?', (1,)).getField('mysql_root') pwd = pSqliteDb('config').where('id=?', (1,)).getField('mysql_root')
sock = getSocketFile() sock = getSocketFile()

Loading…
Cancel
Save