Index: commands/sql/sql.drush.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/sql/sql.drush.inc,v retrieving revision 1.27 diff -u -p -r1.27 sql.drush.inc --- commands/sql/sql.drush.inc 31 Oct 2009 02:21:18 -0000 1.27 +++ commands/sql/sql.drush.inc 3 Nov 2009 20:21:31 -0000 @@ -117,6 +117,7 @@ function sql_drush_command() { '--target-remote-port' => '', '--target-remote-host' => '', '--target-dump' => '', + '--temp' => 'Use a temporary file to hold dump files. Implies --no-cache.', '--create-db' => 'Create a new database before importing the database dump on the target machine.', '--db-su' => 'Remote account to use when creating a new database. Optional.', ), Index: commands/sql/sync.sql.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/sql/sync.sql.inc,v retrieving revision 1.4 diff -u -p -r1.4 sync.sql.inc --- commands/sql/sync.sql.inc 30 Oct 2009 06:13:21 -0000 1.4 +++ commands/sql/sync.sql.inc 3 Nov 2009 20:21:31 -0000 @@ -77,6 +77,7 @@ function _drush_sql_sync($source, $desti // and local files and hope for the best. $source_dump = drush_get_option('source-dump'); $target_dump = drush_get_option('target-dump'); + $use_temp_files = drush_get_option('temp'); $source_is_tmp = FALSE; $target_is_tmp = FALSE; $local_is_tmp = FALSE; @@ -113,6 +114,12 @@ function _drush_sql_sync($source, $desti $local_file = $target_dump; } + // Check to see if we are using a temporary file in a situation + // where the user did not specify "--temp". + if (($source_is_tmp || $target_is_tmp) && (!isset($use_temp_files))) { + drush_print(dt('WARNING: Using temporary files to store and transfer sql dump. It is recommended that you specify --source-dump and --target-dump options on the command line, or set \'!dump\' in the path-aliases section of your site alias records.')); + } + // If source is remote, then use ssh to dump the database and then rsync to local machine // If source is local, call drush_sql_dump to dump the database to local machine // In either case, the '--no-dump' option will cause the sql dump step to be skipped, and