Update index.py

pull/149/head
midoks 3 years ago
parent 656d9b6d89
commit fb843c3072
  1. 35
      plugins/mysql/index.py

@ -1428,22 +1428,25 @@ def setDbrunMode(version=''):
db = pMysqlDb() db = pMysqlDb()
# The value of @@GLOBAL.GTID_MODE can only be changed one step at a if version == '5.6':
# time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that dbreload = 'yes'
# this value must be stepped up or down simultaneously on all servers. else:
# See the Manual for instructions. # The value of @@GLOBAL.GTID_MODE can only be changed one step at a
if mode == 'classic': # time: OFF <-> OFF_PERMISSIVE <-> ON_PERMISSIVE <-> ON. Also note that
db.query('set global enforce_gtid_consistency=off') # this value must be stepped up or down simultaneously on all servers.
db.query('set global gtid_mode=on') # See the Manual for instructions.
db.query('set global gtid_mode=on_permissive') if mode == 'classic':
db.query('set global gtid_mode=off_permissive') db.query('set global enforce_gtid_consistency=off')
db.query('set global gtid_mode=off') db.query('set global gtid_mode=on')
elif mode == 'gtid': db.query('set global gtid_mode=on_permissive')
db.query('set global enforce_gtid_consistency=on') db.query('set global gtid_mode=off_permissive')
db.query('set global gtid_mode=off') db.query('set global gtid_mode=off')
db.query('set global gtid_mode=off_permissive') elif mode == 'gtid':
db.query('set global gtid_mode=on_permissive') db.query('set global enforce_gtid_consistency=on')
db.query('set global gtid_mode=on') db.query('set global gtid_mode=off')
db.query('set global gtid_mode=off_permissive')
db.query('set global gtid_mode=on_permissive')
db.query('set global gtid_mode=on')
if dbreload == "yes": if dbreload == "yes":
restart(version) restart(version)

Loading…
Cancel
Save