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
=== modified file 'lib/util/mysql_methods.py'
--- lib/util/mysql_methods.py 2011-11-18 16:35:12 +0000
+++ lib/util/mysql_methods.py 2011-12-01 15:30:43 +0000
@@ -161,9 +161,10 @@
161 if cmd_root:161 if cmd_root:
162 dump_cmd = cmd_root162 dump_cmd = cmd_root
163 else:163 else:
164 dump_cmd = "%s --no-defaults --user=root --port=%d --host=127.0.0.1 --protocol=tcp" % ( server.mysqldump164 dump_cmd = "%s --no-defaults --user=root --port=%d --host=127.0.0.1 --protocol=tcp --result-file=%s" % ( server.mysqldump
165 , server.master_port165 , server.master_port
166 )166 , dump_path
167 )
167 if databases:168 if databases:
168 if len(databases) > 1:169 if len(databases) > 1:
169 # We have a list of db's that are to be dumped so we handle things170 # We have a list of db's that are to be dumped so we handle things
@@ -171,7 +172,7 @@
171 else:172 else:
172 dump_cmd = ' '.join([dump_cmd, databases[0], ' '.join(tables)])173 dump_cmd = ' '.join([dump_cmd, databases[0], ' '.join(tables)])
173174
174 execute_cmd(dump_cmd, dump_path)175 execute_cmd(dump_cmd, os.devnul)
175176
176177
177def diff_dumpfiles(orig_file_path, new_file_path):178def diff_dumpfiles(orig_file_path, new_file_path):

Subscribers

People subscribed via source and target branches