List:Internals« Previous MessageNext Message »
From:msvensson Date:December 8 2005 3:48pm
Subject:bk commit into 5.0 tree (msvensson:1.1979)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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.1979 05/12/08 16:48:37 msvensson@neptunus.(none) +2 -0
  WL#2930 mysqltest++
   - Updated after valgrinding

  mysql-test/mysql-test-run.sh
    1.283 05/12/08 16:48:32 msvensson@neptunus.(none) +12 -0
    Add printout of valgrind errors from mysqltest when test with valgrind  has completed

  client/mysqltest.c
    1.182 05/12/08 16:48:31 msvensson@neptunus.(none) +13 -9
    Move initialisation of dynamic strings to top of function so that variables are always inited before free
    The workaround for 15518 moved to last in function
    Add check for "--" comments without any comment,. to avoid read of uninit memory

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/wl2930/my50-wl2930

--- 1.282/mysql-test/mysql-test-run.sh	2005-12-07 14:54:03 +01:00
+++ 1.283/mysql-test/mysql-test-run.sh	2005-12-08 16:48:32 +01:00
@@ -1002,6 +1002,18 @@
       echo "WARNING: Got errors/warnings while running tests. Please examine"
       echo "$MY_LOG_DIR/warnings for details."
     fi
+
+    fi # USE_RUNNING_SERVER
+
+    # Check valgrind errors from mysqltest
+    if [ ! -z "$VALGRIND_MYSQLTEST" ]
+    then
+      if $GREP "ERROR SUMMARY" $MYSQLTEST_LOG | $GREP -v "0 errors" > /dev/null
+      then
+	  $ECHO "Valgrind detected errors!"
+	  $GREP "ERROR SUMMARY" $MYSQLTEST_LOG | $GREP -v "0 errors"
+	  $ECHO "See $MYSQLTEST_LOG"
+      fi
     fi
 }
 

--- 1.181/client/mysqltest.c	2005-12-07 14:52:33 +01:00
+++ 1.182/client/mysqltest.c	2005-12-08 16:48:31 +01:00
@@ -2676,6 +2676,7 @@
 end:
   while (*p && my_isspace(charset_info, *p))
     p++;
+
   if (!(q->query_buf= q->query= my_strdup(p, MYF(MY_WME))))
     die(NullS);
 
@@ -3573,6 +3574,13 @@
     cur_con->stmt= stmt;
   }
 
+  /* Init dynamic strings for warnings */
+  if (!disable_warnings)
+  {
+    init_dynamic_string(&ds_prepare_warnings, NULL, 0, 256);
+    init_dynamic_string(&ds_execute_warnings, NULL, 0, 256);
+  }
+
   /*
     Prepare the query
   */
@@ -3580,10 +3588,6 @@
   {
     handle_error(query, command,  mysql_stmt_errno(stmt),
 		 mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
-#ifndef BUG15518_FIXED
-    mysql_stmt_close(stmt);
-    cur_con->stmt= NULL;
-#endif
     goto end;
   }
 
@@ -3592,12 +3596,7 @@
     separate string
   */
   if (!disable_warnings)
-  {
-    init_dynamic_string(&ds_prepare_warnings, NULL, 0, 256);
-    init_dynamic_string(&ds_execute_warnings, NULL, 0, 256);
     append_warnings(&ds_prepare_warnings, mysql);
-  }
-
 
   /*
     No need to call mysql_stmt_bind_param() because we have no
@@ -3724,6 +3723,10 @@
     variable then can be used from the test case itself.
   */
   var_set_errno(mysql_stmt_errno(stmt));
+#ifndef BUG15518_FIXED
+  mysql_stmt_close(stmt);
+  cur_con->stmt= NULL;
+#endif
   DBUG_VOID_RETURN;
 }
 
@@ -4050,6 +4053,7 @@
       q->type= Q_COMMENT;
   }
   else if (q->type == Q_COMMENT_WITH_COMMAND &&
+	   q->first_word_len &&
            q->query[q->first_word_len-1] == ';')
   {
     /*
Thread
bk commit into 5.0 tree (msvensson:1.1979)msvensson8 Dec