List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:March 24 2011 12:38pm
Subject:bzr commit into mysql-trunk branch (alfranio.correia:3306)
View as plain text  
#At file:///home/acorreia/workspace.oracle/repository.mysql/bzrwork/bug-11766392/mysql-trunk/ based on revid:vinay.fisrekar@stripped

 3306 Alfranio Correia	2011-03-24
      RPL.RPL_READ_OLD_RELAY_LOG_INFO FAILS INTERMITTENTLY IN PB2
      
      rpl_read_old_relay_log_info has been failed intermittently,
      apparently, due to some environment problem in PB2.
      
      To track the problem, we have augmented the code to print out
      additional information if there is an issue while checking the
      availability of replication's repositories.
     @ sql/rpl_info_factory.cc
        Printing an error message if there is no repository available.
     @ sql/rpl_info_file.cc
        Printing out information on the reason to not be able to access the
        repository.
     @ sql/rpl_info_table.cc
        Printing out information on the reason to not be able to access the
        repository.

    modified:
      sql/rpl_info_factory.cc
      sql/rpl_info_file.cc
      sql/rpl_info_table.cc
=== modified file 'sql/rpl_info_factory.cc'
--- a/sql/rpl_info_factory.cc	2010-12-21 09:33:41 +0000
+++ b/sql/rpl_info_factory.cc	2011-03-24 12:38:34 +0000
@@ -276,6 +276,12 @@ bool Rpl_info_factory::decide_repository
           "the correct one to choose.";
     DBUG_RETURN(error);
   }
+  else if (!is_t && !is_f)
+  {
+    *msg= "There is no valid repository available. Unable to "
+          "open and configure one.";
+    DBUG_RETURN(error);
+  }
 
   if (is_table)
   {

=== modified file 'sql/rpl_info_file.cc'
--- a/sql/rpl_info_file.cc	2010-10-29 09:07:21 +0000
+++ b/sql/rpl_info_file.cc	2011-03-24 12:38:34 +0000
@@ -122,7 +122,14 @@ int Rpl_info_file::do_prepare_info_for_w
 
 int Rpl_info_file::do_check_info()
 {
-  return (access(info_fname,F_OK));
+  int ret= my_access(info_fname, F_OK);
+
+  if (ret)
+    sql_print_information("File repository is not ready to be used. File "
+                          "'%s' cannot be accessed (errno %d).", info_fname,
+                          errno);
+  
+  return (ret == -1 ? 1 : 0);
 }
 
 int Rpl_info_file::do_flush_info(const bool force)

=== modified file 'sql/rpl_info_table.cc'
--- a/sql/rpl_info_table.cc	2010-12-03 00:15:40 +0000
+++ b/sql/rpl_info_table.cc	2011-03-24 12:38:34 +0000
@@ -285,7 +285,12 @@ int Rpl_info_table::do_check_info()
   if (access->open_table(thd, str_schema, str_table,
                          get_number_info(), TL_READ,
                          &table, &backup))
+  {
+    sql_print_information("Table repository is not ready to be used. Table "
+                          "'%s.%s' cannot be opened.", str_schema.str,
+                          str_table.str);
     goto end;
+  }
 
   /*
     Points the cursor at the row to be deleted where the the master_id
@@ -300,6 +305,8 @@ int Rpl_info_table::do_check_info()
        really means that there was a failure but only that the
        record was not found.
     */
+    sql_print_information("Table repository is not ready to be used. Rows were not "
+                          "found at '%s.%s'.", str_schema.str, str_table.str);
     goto end;
   }
   error= 0;


Attachment: [text/bzr-bundle] bzr/alfranio.correia@oracle.com-20110324123834-gwhm1mbx5g6988iv.bundle
Thread
bzr commit into mysql-trunk branch (alfranio.correia:3306) Alfranio Correia24 Mar