List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:February 14 2009 9:26pm
Subject:bzr commit into mysql-5.1-bugteam branch (alfranio.correia:2798)
View as plain text  
#At file:///home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-42861/mysql-5.1-bugteam/ based on revid:msvensson@stripped

 2798 Alfranio Correia	2009-02-14
      BUG#42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave
      Compiling with debug and assinging an invalid directory to --slave-load-tmpdir
      was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() || can_overwrite_status).
      This assertion assumes that a thread can throw one error before stoping its execution unless the
      overwrite flag (i.e. can_overwrite_status) is true. The cleanup function however was failing and an 
      error was being thrown by my_dir and the replication thread was not aborting the execution.
      To fix the problem we propagate the error from the cleanup function until it reaches a point in which
      the replication code can report the error and stop the execution.

=== modified file 'sql/'
--- a/sql/	2009-02-04 11:08:27 +0000
+++ b/sql/	2009-02-14 21:26:23 +0000
@@ -375,15 +375,16 @@ static char *slave_load_file_stem(char *
   Delete all temporary files used for SQL_LOAD.
-static void cleanup_load_tmpdir()
+static int cleanup_load_tmpdir()
   MY_DIR *dirp;
   FILEINFO *file;
   uint i;
   char fname[FN_REFLEN], prefbuf[31], *p;
+  int error= 0;
   if (!(dirp=my_dir(slave_load_tmpdir,MYF(MY_WME))))
-    return;
+    return 1;
      When we are deleting temporary files, we should only remove
@@ -404,11 +405,14 @@ static void cleanup_load_tmpdir()
     if (is_prefix(file->name, prefbuf))
-      my_delete(fname, MYF(0));
+      if ((error= my_delete(fname, MYF(0)))) 
+        break;
+  return (error);
@@ -3379,7 +3383,10 @@ int Start_log_event_v3::do_apply_event(R
     if (created)
-      cleanup_load_tmpdir();
+      if (cleanup_load_tmpdir())
+      {
+        DBUG_RETURN(1);
+      }

bzr commit into mysql-5.1-bugteam branch (alfranio.correia:2798)Bug#42861Alfranio Correia14 Feb
  • Re: bzr commit into mysql-5.1-bugteam branch (alfranio.correia:2798)Bug#42861He Zhenxing16 Feb