Merge pull request #735 from midoks/dev

mysql9的同步优化
This commit is contained in:
Mr Chen 2025-05-16 02:51:06 +08:00 committed by GitHub
commit fe441c7afe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -2858,8 +2858,11 @@ def initSlaveStatusSyncUser(version=''):
# print(data)
pdb = pMysqlDb()
if len(slave_data) == 1:
dlist = pdb.query('show slave status')
if len(dlist) > 0:
cmd_slave = 'show slave status'
if pk_version.parse(version) < pk_version.parse("8.0"):
cmd_slave = 'SHOW REPLICA STATUS'
dlist = pdb.query(cmd_slave)
if dlist and len(dlist) > 0:
return mw.returnJson(False, '已经初始化好了zz...')
msg = ''