Merge lp:~longbow/dbqp/mysqldump_resultfile into lp:dbqp

Proposed by Valentine Gostev
Status: Merged
Approved by: Patrick Crews
Approved revision: 59
Merged at revision: 59
Proposed branch: lp:~longbow/dbqp/mysqldump_resultfile
Merge into: lp:dbqp
Diff against target: 26 lines (+5/-4)
1 file modified
lib/util/mysql_methods.py (+5/-4)
To merge this branch: bzr merge lp:~longbow/dbqp/mysqldump_resultfile
Reviewer Review Type Date Requested Status
Patrick Crews Pending
Review via email: mp+84118@code.launchpad.net

Description of the change

Updated take_mysqldump method to use --result-file option rather than stdout

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/util/mysql_methods.py'
2--- lib/util/mysql_methods.py 2011-11-18 16:35:12 +0000
3+++ lib/util/mysql_methods.py 2011-12-01 15:30:43 +0000
4@@ -161,9 +161,10 @@
5 if cmd_root:
6 dump_cmd = cmd_root
7 else:
8- dump_cmd = "%s --no-defaults --user=root --port=%d --host=127.0.0.1 --protocol=tcp" % ( server.mysqldump
9- , server.master_port
10- )
11+ dump_cmd = "%s --no-defaults --user=root --port=%d --host=127.0.0.1 --protocol=tcp --result-file=%s" % ( server.mysqldump
12+ , server.master_port
13+ , dump_path
14+ )
15 if databases:
16 if len(databases) > 1:
17 # We have a list of db's that are to be dumped so we handle things
18@@ -171,7 +172,7 @@
19 else:
20 dump_cmd = ' '.join([dump_cmd, databases[0], ' '.join(tables)])
21
22- execute_cmd(dump_cmd, dump_path)
23+ execute_cmd(dump_cmd, os.devnul)
24
25
26 def diff_dumpfiles(orig_file_path, new_file_path):

Subscribers

People subscribed via source and target branches