From 525bcc909f20d947f6c1d449cee53eaa65062f31 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 13 Jun 2024 20:21:43 +0800 Subject: [PATCH] update --- plugins/mysql-apt/index.py | 8 ++++---- plugins/mysql-yum/index.py | 8 ++++---- plugins/mysql/index.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index fca1cf053..d535368c5 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -280,7 +280,7 @@ def getPidFile(): return tmp.groups()[0].strip() -def binLog(): +def binLog(version=''): args = getArgs() conf = getConf() con = mw.readFile(conf) @@ -291,7 +291,7 @@ def binLog(): con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin') con = con.replace('#binlog_format=mixed', 'binlog_format=mixed') mw.execShell('sync') - restart() + restart(version) else: path = getDataDir() if 'status' in args: @@ -305,7 +305,7 @@ def binLog(): con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin') con = con.replace('binlog_format=mixed', '#binlog_format=mixed') mw.execShell('sync') - restart() + restart(version) mw.execShell('rm -f ' + path + '/mysql-bin.*') mw.writeFile(conf, con) @@ -3549,7 +3549,7 @@ if __name__ == "__main__": elif func == 'conf': print(getConf()) elif func == 'bin_log': - print(binLog()) + print(binLog(version)) elif func == 'binlog_list': print(binLogList()) elif func == 'clean_bin_log': diff --git a/plugins/mysql-yum/index.py b/plugins/mysql-yum/index.py index 3f89828db..032b153ad 100755 --- a/plugins/mysql-yum/index.py +++ b/plugins/mysql-yum/index.py @@ -270,7 +270,7 @@ def status(version=''): return 'start' -def binLog(): +def binLog(version=''): args = getArgs() conf = getConf() con = mw.readFile(conf) @@ -281,7 +281,7 @@ def binLog(): con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin') con = con.replace('#binlog_format=mixed', 'binlog_format=mixed') mw.execShell('sync') - restart() + restart(version) else: path = getDataDir() if 'status' in args: @@ -295,7 +295,7 @@ def binLog(): con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin') con = con.replace('binlog_format=mixed', '#binlog_format=mixed') mw.execShell('sync') - restart() + restart(version) mw.execShell('rm -f ' + path + '/mysql-bin.*') mw.writeFile(conf, con) @@ -3528,7 +3528,7 @@ if __name__ == "__main__": elif func == 'conf': print(getConf()) elif func == 'bin_log': - print(binLog()) + print(binLog(version)) elif func == 'binlog_list': print(binLogList()) elif func == 'clean_bin_log': diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index b71a9f91a..ecb7d5a6e 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -323,7 +323,7 @@ def getPidFile(): return tmp.groups()[0].strip() -def binLog(): +def binLog(version = ''): args = getArgs() conf = getConf() con = mw.readFile(conf) @@ -334,7 +334,7 @@ def binLog(): con = con.replace('#log-bin=mysql-bin', 'log-bin=mysql-bin') con = con.replace('#binlog_format=mixed', 'binlog_format=mixed') mw.execShell('sync') - restart() + restart(version) else: path = getDataDir() if 'status' in args: @@ -348,7 +348,7 @@ def binLog(): con = con.replace('log-bin=mysql-bin', '#log-bin=mysql-bin') con = con.replace('binlog_format=mixed', '#binlog_format=mixed') mw.execShell('sync') - restart() + restart(version) mw.execShell('rm -f ' + path + '/mysql-bin.*') mw.writeFile(conf, con) @@ -3804,7 +3804,7 @@ if __name__ == "__main__": elif func == 'conf': print(getConf()) elif func == 'bin_log': - print(binLog()) + print(binLog(version)) elif func == 'binlog_list': print(binLogList()) elif func == 'clean_bin_log':