=== modified file 'innobackupex'
--- innobackupex	2013-06-21 11:39:45 +0000
+++ innobackupex	2013-07-08 09:31:25 +0000
@@ -440,28 +440,40 @@
     $suspend_file = $work_dir . $xb_fn_suspended_at_end;
     wait_for_ibbackup_suspend($suspend_file);
 
-    if ($option_safe_slave_backup) {
-        wait_for_safe_slave(\%mysql);
-    }
-
-    # flush tables with read lock
     if (!$option_no_lock) {
-        # make a prep copy before locking tables, if using rsync
-        backup_files(1);
-
-        # flush tables with read lock
-        mysql_lockall(\%mysql);
-    }
-
-    if ($option_slave_info) {
+      if ($option_safe_slave_backup) {
+        wait_for_safe_slave(\%mysql);
+      }
+
+      # flush tables with read lock
+      # make a prep copy before locking tables, if using rsync
+      backup_files(1);
+
+      # flush tables with read lock
+      mysql_lockall(\%mysql);
+
+      if ($option_slave_info) {
         write_slave_info(\%mysql);
+      }
     }
 
-
     # backup non-InnoDB files and tables
     # (or finalize the backup by syncing changes if using rsync)
     backup_files(0);
 
+    # There is no need to stop slave thread before coping non-Innodb data when
+    # --no-lock option is used because --no-lock option requires that no DDL or
+    # DML to non-transaction tables can occur.
+    if ($option_no_lock)
+    {
+      if ($option_safe_slave_backup)
+      {
+        wait_for_safe_slave(\%mysql);
+      }
+      if ($option_slave_info) {
+        write_slave_info(\%mysql);
+      }
+    }
     # resume XtraBackup and wait till it has finished
     resume_ibbackup($suspend_file);
     $suspend_file = $work_dir . $xb_fn_log_copied;

=== added file 'test/t/bug1182726.sh'
--- test/t/bug1182726.sh	1970-01-01 00:00:00 +0000
+++ test/t/bug1182726.sh	2013-07-08 09:31:25 +0000
@@ -0,0 +1,37 @@
+. inc/common.sh
+########################################################################
+# Bug #1182726: Reduce Replication Delay when Taking Backup from Slave
+# 
+# Using --no-lock, --slave-info and --safe-slave-backup options together must
+# not stop replication while copying non-InnoDB data.
+########################################################################
+
+
+master_id=1
+slave_id=2
+
+start_server_with_id $master_id
+start_server_with_id $slave_id
+
+setup_slave $slave_id $master_id
+
+switch_server $master_id
+load_dbase_schema incremental_sample
+
+# Adding initial rows
+vlog "Adding initial rows to database..."
+numrow=100
+count=0
+while [ "$numrow" -gt "$count" ]
+do
+	${MYSQL} ${MYSQL_ARGS} -e "insert into test values ($count, $numrow);" incremental_sample
+	let "count=count+1"
+done
+vlog "Initial rows added"
+
+# Full backup of the slave server
+switch_server $slave_id
+
+innobackupex --no-timestamp --slave-info --safe-slave-backup --no-lock $topdir/backup
+egrep -q '^CHANGE MASTER TO MASTER_LOG_FILE='\''mysql-bin.[0-9]+'\'', MASTER_LOG_POS=[0-9]+$' \
+    $topdir/backup/xtrabackup_slave_info

