Index: commands/sql/sql.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/sql/sql.drush.inc,v
retrieving revision 1.29
diff -u -p -r1.29 sql.drush.inc
--- commands/sql/sql.drush.inc	10 Nov 2009 03:17:39 -0000	1.29
+++ commands/sql/sql.drush.inc	20 Nov 2009 22:32:23 -0000
@@ -178,22 +178,26 @@ function drush_sql_dump_execute() {
  */
 function drush_sql_dump($db_spec = NULL) {
   $ignores = array();
-  
+
   // Skip large core tables if instructed.  Also used by 'sql load' command.
   $skip_tables = _drush_sql_get_table_list('skip-tables');
   // Skip any structure-tables as well.
   $structure_tables = _drush_sql_get_table_list('structure-tables');
-  $skip_tables += $structure_tables;  
+  $skip_tables += $structure_tables;
   // Dump only the specified tables.  Takes precedence over skip-tables and structure-tables.
   $tables = _drush_sql_get_table_list('tables');
   $clean = drush_get_option('clean');
   $data_only = drush_get_option('data-only');
+  // The backup_friendly option is only supported by MySQL for now.
+  // @todo add documention once a hook for drush_get_option_help() is available.
+  // see drush_get_option_help() in drush.inc
+  $backup_friendly = drush_get_option('backup-friendly');
 
   if (is_null($db_spec)) {
     $db_spec = _drush_sql_get_db_spec();
   }
   $database = $db_spec['database'];
-  
+
   switch (_drush_sql_get_scheme($db_spec)) {
     case 'mysql':
       $exec = 'mysqldump' . (drush_get_context('DRUSH_VERBOSE') ? ' -v' : '');
@@ -204,8 +208,11 @@ function drush_sql_dump($db_spec = NULL)
       if (isset($data_only)) {
         $extra .= ' --no-create-info';
       }
+      if (isset($backup_friendly)) {
+        $extra .= ' --skip-extended-insert --order-by-primary';
+      }
       $exec .= $extra;
-      
+
       if (!empty($tables)) {
         $exec .= ' ' . implode(' ', $tables);
       }
