Commit d9111e7d authored by Vincent Pelletier's avatar Vincent Pelletier

Allow providing SQL script by file name.

parent 29e65e56
...@@ -41,6 +41,14 @@ def updateMysql(args): ...@@ -41,6 +41,14 @@ def updateMysql(args):
conf = args[0] conf = args[0]
sleep = 30 sleep = 30
is_succeed = False is_succeed = False
try:
script_filename = conf.pop('mysql_script_file')
except KeyError:
pass
else:
assert 'mysql_script' not in conf
with open(script_filename) as script_file:
conf['mysql_script'] = script_file.read()
while True: while True:
mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--no-defaults', '--user=root'] mysql_upgrade_list = [conf['mysql_upgrade_binary'], '--no-defaults', '--user=root']
if 'socket' in conf: if 'socket' in conf:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment