List:Internals« Previous MessageNext Message »
From:msvensson Date:September 19 2005 12:25pm
Subject:bk commit into 4.1 tree (msvensson:1.2409)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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.2409 05/09/19 12:24:59 msvensson@neptunus.(none) +1 -0
  Clean up printout of line numbers

  client/mysqltest.c
    1.181 05/09/19 12:24:55 msvensson@neptunus.(none) +11 -16
    Only print line no if start_lineno > 0
    Remove lineno in calls to verbose_msg and die, this is handled by the function.

# 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/fix_mysqltest/my41-fix_mysqltest

--- 1.180/client/mysqltest.c	2005-09-06 22:03:01 +02:00
+++ 1.181/client/mysqltest.c	2005-09-19 12:24:55 +02:00
@@ -610,7 +610,9 @@
 
   va_start(args, fmt);
 
-  fprintf(stderr, "mysqltest: At line %u: ", start_lineno);
+  fprintf(stderr, "mysqltest: ");
+  if (start_lineno > 0)
+    fprintf(stderr, "At line %u: ", start_lineno);
   vfprintf(stderr, fmt, args);
   fprintf(stderr, "\n");
   va_end(args);
@@ -1345,9 +1347,7 @@
   int rpl_parse;
 
   if (!master_pos.file[0])
-  {
-    die("Line %u: Calling 'sync_with_master' without calling 'save_master_pos'",
start_lineno);
-  }
+    die("Calling 'sync_with_master' without calling 'save_master_pos'");
   rpl_parse= mysql_rpl_parse_enabled(mysql);
   mysql_disable_rpl_parse(mysql);
 
@@ -1357,14 +1357,13 @@
 wait_for_position:
 
   if (mysql_query(mysql, query_buf))
-    die("line %u: failed in %s: %d: %s", start_lineno, query_buf,
-	mysql_errno(mysql), mysql_error(mysql));
+    die("failed in %s: %d: %s", query_buf, mysql_errno(mysql),
+        mysql_error(mysql));
 
   if (!(last_result= res= mysql_store_result(mysql)))
-    die("line %u: mysql_store_result() returned NULL for '%s'", start_lineno,
-	query_buf);
+    die("mysql_store_result() returned NULL for '%s'", query_buf);
   if (!(row= mysql_fetch_row(res)))
-    die("line %u: empty result in %s", start_lineno, query_buf);
+    die("empty result in %s", query_buf);
   if (!row[0])
   {
     /*
@@ -1372,10 +1371,7 @@
       SLAVE has been issued ?
     */
     if (tries++ == 3)
-    {
-      die("line %u: could not sync with master ('%s' returned NULL)", 
-          start_lineno, query_buf);
-    }
+      die("could not sync with master ('%s' returned NULL)", query_buf);
     sleep(1); /* So at most we will wait 3 seconds and make 4 tries */
     mysql_free_result(res);
     goto wait_for_position;
@@ -1421,10 +1417,9 @@
 	mysql_errno(mysql), mysql_error(mysql));
 
   if (!(last_result =res = mysql_store_result(mysql)))
-    die("line %u: mysql_store_result() retuned NULL for '%s'", start_lineno,
-	query);
+    die("mysql_store_result() retuned NULL for '%s'", query);
   if (!(row = mysql_fetch_row(res)))
-    die("line %u: empty result in show master status", start_lineno);
+    die("empty result in show master status");
   strnmov(master_pos.file, row[0], sizeof(master_pos.file)-1);
   master_pos.pos = strtoul(row[1], (char**) 0, 10);
   mysql_free_result(res); last_result=0;
Thread
bk commit into 4.1 tree (msvensson:1.2409)msvensson19 Sep