List:Commits« Previous MessageNext Message »
From:monty Date:May 4 2006 7:19pm
Subject:bk commit into 5.0 tree (monty:1.2108)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2108 06/05/04 22:19:31 monty@stripped +4 -0
  Fixed wrong free in sql_view.cc
  mysql-test-run now fails in case of warnings

  sql/sql_view.cc
    1.88 06/05/04 22:19:28 monty@stripped +3 -2
    Fixed problem with unaligned memory (wrong free)

  sql/sql_lex.cc
    1.181 06/05/04 22:19:28 monty@stripped +5 -1
    Initalize st_lex properly

  mysql-test/mysql-test-run.sh
    1.304 06/05/04 22:19:28 monty@stripped +7 -5
    Fail if find warnings

  mysql-test/lib/mtr_report.pl
    1.22 06/05/04 22:19:28 monty@stripped +4 -2
    Fail if find warnings

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	monty
# Host:	narttu.mysql.fi
# Root:	/home/my/mysql-5.0

--- 1.303/mysql-test/mysql-test-run.sh	2006-05-03 13:55:30 +03:00
+++ 1.304/mysql-test/mysql-test-run.sh	2006-05-04 22:19:28 +03:00
@@ -199,6 +199,7 @@
 TOT_PASS=0
 TOT_FAIL=0
 TOT_TEST=0
+GOT_WARNINGS=0
 USERT=0
 SYST=0
 REALT=0
@@ -1023,17 +1024,16 @@
         | $SED -e 's!Warning:  Table:.* on rename!!g' \
         > $MY_LOG_DIR/warnings.tmp
 
-    found_error=0
     # Find errors
     for i in "^Warning:" "^Error:" "^==.* at 0x" "InnoDB: Warning"
     do
       if $GREP "$i" $MY_LOG_DIR/warnings.tmp >> $MY_LOG_DIR/warnings
       then
-        found_error=1
+        GOT_WARNINGS=1
       fi
     done
     $RM -f $MY_LOG_DIR/warnings.tmp
-    if [ $found_error = "1" ]
+    if [ $GOT_WARNINGS = "1" ]
     then
       echo "WARNING: Got errors/warnings while running tests. Please examine"
       echo "$MY_LOG_DIR/warnings for details."
@@ -2217,6 +2217,8 @@
   $ECHO "mysql-test-run in $TEST_MODE mode: *** Failing the test(s):$FAILED_CASES"
   $ECHO
   exit 1
-else
-  exit 0
 fi
+if [ $GOT_WARNINGS -ne 0 ]; then
+  exit 1
+fi
+exit 0

--- 1.180/sql/sql_lex.cc	2006-03-10 02:44:01 +02:00
+++ 1.181/sql/sql_lex.cc	2006-05-04 22:19:28 +03:00
@@ -191,8 +191,11 @@
 
 void lex_end(LEX *lex)
 {
+  DBUG_ENTER("lex_end");
+  DBUG_PRINT("enter", ("lex: 0x%lx", (long) lex));
   x_free(lex->yacc_yyss);
   x_free(lex->yacc_yyvs);
+  DBUG_VOID_RETURN;
 }
 
 
@@ -1626,7 +1629,8 @@
 */
 
 st_lex::st_lex()
-  :result(0), sql_command(SQLCOM_END), query_tables_own_last(0)
+  :result(0), yacc_yyss(0), yacc_yyvs(0),
+   sql_command(SQLCOM_END), query_tables_own_last(0)
 {
   hash_init(&sroutines, system_charset_info, 0, 0, 0, sp_sroutine_key, 0, 0);
   sroutines_list.empty();

--- 1.87/sql/sql_view.cc	2006-05-04 17:11:35 +03:00
+++ 1.88/sql/sql_view.cc	2006-05-04 22:19:28 +03:00
@@ -941,7 +941,6 @@
         goto err;
     }
 
-
     if (!(table->view_tables=
           (List<TABLE_LIST>*) new(thd->mem_root) List<TABLE_LIST>))
       goto err;
@@ -1192,14 +1191,16 @@
     old_lex->time_zone_tables_used= thd->lex->time_zone_tables_used;
   result= !table->prelocking_placeholder && table->prepare_security(thd);
 
+  lex_end(thd->lex);
 end:
   if (arena)
     thd->restore_active_arena(arena, &backup);
-  lex_end(thd->lex);
   thd->lex= old_lex;
   DBUG_RETURN(result);
 
 err:
+  DBUG_ASSERT(thd->lex == table->view);
+  lex_end(thd->lex);
   delete table->view;
   table->view= 0;	// now it is not VIEW placeholder
   result= 1;

--- 1.21/mysql-test/lib/mtr_report.pl	2006-03-23 22:48:27 +02:00
+++ 1.22/mysql-test/lib/mtr_report.pl	2006-05-04 22:19:28 +03:00
@@ -157,6 +157,7 @@
   my $tot_passed= 0;
   my $tot_failed= 0;
   my $tot_tests=  0;
+  my $found_problems= 0;            # Some warnings are errors...
 
   foreach my $tinfo (@$tests)
   {
@@ -214,8 +215,6 @@
     }
     else
     {
-      my $found_problems= 0;            # Some warnings are errors...
-
       # We report different types of problems in order
       foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x" )
       {
@@ -266,6 +265,9 @@
       }
     }
     print "\n";
+  }
+  if ( $tot_failed != 0 || $found_problems)
+  {
     mtr_error("there where failing test cases");
   }
 }
Thread
bk commit into 5.0 tree (monty:1.2108)monty4 May