List:Commits« Previous MessageNext Message »
From:monty Date:June 28 2006 11:03am
Subject:bk commit into 5.1 tree (monty:1.2211)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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.2211 06/06/28 14:03:08 monty@stripped +8 -0
  Added purecov comment for new, not executed code for my recent changeset
  (Found by dgcov)

  sql/sql_parse.cc
    1.564 06/06/28 14:03:04 monty@stripped +2 -2
    Added purecov comment for new, not executed code

  sql/mysqld.cc
    1.564 06/06/28 14:03:04 monty@stripped +2 -0
    Added purecov comment for new, not executed code

  sql/log_event.cc
    1.229 06/06/28 14:03:04 monty@stripped +2 -0
    Added purecov comment for new, not executed code

  sql/ha_ndbcluster_binlog.cc
    1.70 06/06/28 14:03:04 monty@stripped +2 -0
    Added purecov comment for new, not executed code

  sql/filesort.cc
    1.109 06/06/28 14:03:04 monty@stripped +9 -1
    Added purecov comment for new, not executed code
    Removed 'purecov: inspected' from code covered by current testsuite 

  mysys/my_handler.c
    1.26 06/06/28 14:03:04 monty@stripped +2 -1
    Added purecov comment for new, not executed code

  mysql-test/t/show_check.test
    1.65 06/06/28 14:03:04 monty@stripped +13 -0
    Test SHOW PLUGIN.
    (Was not covered by test suite before)

  mysql-test/r/show_check.result
    1.97 06/06/28 14:03:04 monty@stripped +6 -0
    Test SHOW PLUGIN.
    (Was not covered by test suite before)

# 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.1

--- 1.108/sql/filesort.cc	2006-06-19 12:45:29 +03:00
+++ 1.109/sql/filesort.cc	2006-06-28 14:03:04 +03:00
@@ -688,9 +688,17 @@
             bzero((char*) to-1,sort_field->length+1);
           else
           {
+            /* purecov: begin deadcode */
+            /*
+              This should only happen during extreme conditions if we run out
+              of memory or have an item marked not null when it can be null.
+              This code is here mainly to avoid a hard crash in this case.
+            */
+            DBUG_ASSERT(0);
             DBUG_PRINT("warning",
                        ("Got null on something that shouldn't be null"));
             bzero((char*) to,sort_field->length);	// Avoid crash
+            /* purecov: end */
           }
           break;
         }
@@ -699,7 +707,7 @@
         diff=(int) (sort_field_length - length);
         if (diff < 0)
         {
-          diff=0;				/* purecov: inspected */
+          diff=0;
           length= sort_field_length;
         }
         if (sort_field->suffix_length)

--- 1.228/sql/log_event.cc	2006-06-23 10:35:41 +03:00
+++ 1.229/sql/log_event.cc	2006-06-28 14:03:04 +03:00
@@ -5918,6 +5918,7 @@
 
     if (col <= tsh->fields)
     {
+      /* purecov: begin inspected */
       /*
         If we get here, the number of columns in the event didn't
         match the number of columns in the table on the slave, *or*
@@ -5950,6 +5951,7 @@
       thd->query_error= 1;
       error= ERR_BAD_TABLE_DEF;
       goto err;
+      /* purecov: end */
     }
 
     /*

--- 1.563/sql/mysqld.cc	2006-06-23 02:49:15 +03:00
+++ 1.564/sql/mysqld.cc	2006-06-28 14:03:04 +03:00
@@ -3223,9 +3223,11 @@
     /* fall back to the log files if tables are not present */
     if (have_csv_db == SHOW_OPTION_NO)
     {
+      /* purecov: begin inspected */
       sql_print_error("CSV engine is not present, falling back to the "
                       "log files");
       log_output_options= (log_output_options & ~LOG_TABLE) | LOG_FILE;
+      /* purecov: end */
     }
 
     logger.set_handlers(LOG_FILE, opt_slow_log ? log_output_options:LOG_NONE,

--- 1.563/sql/sql_parse.cc	2006-06-22 12:20:19 +03:00
+++ 1.564/sql/sql_parse.cc	2006-06-28 14:03:04 +03:00
@@ -5212,7 +5212,7 @@
         even if the query itself redirects the output.
       */
       if (!(result= new select_send()))
-        return 1;
+        return 1;                               /* purecov: inspected */
       thd->send_explain_fields(result);
       res= mysql_explain_union(thd, &thd->lex->unit, result);
       if (lex->describe & DESCRIBE_EXTENDED)
@@ -5231,7 +5231,7 @@
     else
     {
       if (!result && !(result= new select_send()))
-        return 1;
+        return 1;                               /* purecov: inspected */
       query_cache_store_query(thd, all_tables);
       res= handle_select(thd, lex, result, 0);
       if (result != lex->result)

--- 1.25/mysys/my_handler.c	2006-06-23 02:49:15 +03:00
+++ 1.26/mysys/my_handler.c	2006-06-28 14:03:04 +03:00
@@ -548,7 +548,8 @@
     case HA_KEYTYPE_DOUBLE:
       a= end;
       break;
-    case HA_KEYTYPE_END:
+    case HA_KEYTYPE_END:                        /* purecov: inspected */
+      /* keep compiler happy */
       DBUG_ASSERT(0);
       break;
     }

--- 1.96/mysql-test/r/show_check.result	2006-06-21 18:50:26 +03:00
+++ 1.97/mysql-test/r/show_check.result	2006-06-28 14:03:04 +03:00
@@ -623,4 +623,10 @@
 delete from mysql.tables_priv where user='mysqltest_4';
 flush privileges;
 drop database mysqltest;
+show full plugin;
+show warnings;
+Level	Code	Message
+Warning	1541	The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead.
+show plugin;
+show plugins;
 End of 5.1 tests

--- 1.64/mysql-test/t/show_check.test	2006-06-01 12:53:10 +03:00
+++ 1.65/mysql-test/t/show_check.test	2006-06-28 14:03:04 +03:00
@@ -445,4 +445,17 @@
 flush privileges;
 drop database mysqltest;
 
+#
+# Ensure that show plugin code is tested
+#
+
+--disable_result_log
+show full plugin;
+--enable_result_log
+show warnings;
+--disable_result_log
+show plugin;
+show plugins;
+--enable_result_log
+
 --echo End of 5.1 tests

--- 1.69/sql/ha_ndbcluster_binlog.cc	2006-06-23 02:49:15 +03:00
+++ 1.70/sql/ha_ndbcluster_binlog.cc	2006-06-28 14:03:04 +03:00
@@ -125,6 +125,7 @@
 */
 
 #ifndef DBUG_OFF
+/* purecov: begin deadcode */
 static void print_records(TABLE *table, const char *record)
 {
   for (uint j= 0; j < table->s->fields; j++)
@@ -144,6 +145,7 @@
     DBUG_PRINT("info",("[%u]field_ptr[0->%d]: %s", j, n, buf));
   }
 }
+/* purecov: end */
 #else
 #define print_records(a,b)
 #endif
Thread
bk commit into 5.1 tree (monty:1.2211)monty28 Jun