List:Commits« Previous MessageNext Message »
From:sayantan.dutta Date:December 12 2012 9:48am
Subject:bzr push into mysql-5.1 branch (sayantan.dutta:3883 to 3884) Bug#14737171
View as plain text  
 3884 sayantan.dutta@stripped	2012-12-12
      Bug #14737171:MTR DOES NOT PRESERVE TEST CASE LOGS ON RETRY-FAIL

    modified:
      mysql-test/mysql-test-run.pl
 3883 Dmitry Lenev	2012-12-11
      Bug #15954872 "MAKE MDL SUBSYSTEM AND TABLE DEFINITION CACHE 
      ROBUST AGAINST BUGS IN CALLERS".
      
      Both MDL subsystems and Table Definition Cache code assume 
      that callers ensure that names of objects passed to them are 
      not longer than NAME_LEN bytes. Unfortunately due to bugs in 
      callers this assumption might be broken in some cases. As
      result we get nasty bugs causing buffer overruns when we
      construct MDL key or TDC key from object names.
      
      This patch makes TDC code more robust against such bugs by 
      ensuring that we always checking size of result buffer when
      constructing TDC keys. This doesn't free its callers from 
      ensuring that both db and table names are shorter than 
      NAME_LEN bytes. But at least this steps prevents buffer 
      overruns in case of bug in caller, replacing them with less 
      harmful behavior.
      
      This is 5.1-only version of patch.
      
      This patch introduces new version of create_table_def_key()
      helper function which constructs TDC key without risk of
      result buffer overrun. Places in code that construct TDC keys 
      were changed to use this function.
      
      Also changed rm_temporary_table() and open_new_frm() functions
      to avoid use of "unsafe" strmov() and strxmov() functions and 
      use safer strnxmov() instead.

    modified:
      sql/mysql_priv.h
      sql/sql_base.cc
      sql/sql_cache.cc
      sql/sql_trigger.cc
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2012-12-11 13:04:04 +0000
+++ b/mysql-test/mysql-test-run.pl	2012-12-12 09:39:31 +0000
@@ -616,7 +616,9 @@ sub run_test_server ($$$) {
 	    else {
 	      mtr_report("\nRetrying test $tname, ".
 			 "attempt($retries/$opt_retry)...\n");
-              my $log_file_name= $opt_vardir."/log/".$result->{shortname}.".log";
+              #saving the log file as filename.failed in case of retry
+              my $worker_logdir= $result->{savedir};
+              my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
               rename $log_file_name,$log_file_name.".failed";
 	      delete($result->{result});
 	      $result->{retries}= $retries+1;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (sayantan.dutta:3883 to 3884) Bug#14737171sayantan.dutta12 Dec