Commit 5df928c8 authored by unknown's avatar unknown
Browse files

Added purecov comment for new, not executed code for my recent changeset

(Found by dgcov)


mysql-test/r/show_check.result:
  Test SHOW PLUGIN.
  (Was not covered by test suite before)
mysql-test/t/show_check.test:
  Test SHOW PLUGIN.
  (Was not covered by test suite before)
mysys/my_handler.c:
  Added purecov comment for new, not executed code
sql/filesort.cc:
  Added purecov comment for new, not executed code
  Removed 'purecov: inspected' from code covered by current testsuite
sql/ha_ndbcluster_binlog.cc:
  Added purecov comment for new, not executed code
sql/log_event.cc:
  Added purecov comment for new, not executed code
sql/mysqld.cc:
  Added purecov comment for new, not executed code
sql/sql_parse.cc:
  Added purecov comment for new, not executed code
parent caf21245
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -623,4 +623,10 @@ delete from mysql.db where user='mysqltest_4';
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
+13 −0
Original line number Diff line number Diff line
@@ -445,4 +445,17 @@ delete from mysql.tables_priv where user='mysqltest_4';
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
+2 −1
Original line number Diff line number Diff line
@@ -548,7 +548,8 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
    case HA_KEYTYPE_DOUBLE:
      a= end;
      break;
    case HA_KEYTYPE_END:
    case HA_KEYTYPE_END:                        /* purecov: inspected */
      /* keep compiler happy */
      DBUG_ASSERT(0);
      break;
    }
+9 −1
Original line number Diff line number Diff line
@@ -688,9 +688,17 @@ static void make_sortkey(register SORTPARAM *param,
            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 @@ static void make_sortkey(register SORTPARAM *param,
        diff=(int) (sort_field_length - length);
        if (diff < 0)
        {
          diff=0;				/* purecov: inspected */
          diff=0;
          length= sort_field_length;
        }
        if (sort_field->suffix_length)
+2 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ static TABLE_LIST binlog_tables;
*/

#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 @@ static void print_records(TABLE *table, const char *record)
    DBUG_PRINT("info",("[%u]field_ptr[0->%d]: %s", j, n, buf));
  }
}
/* purecov: end */
#else
#define print_records(a,b)
#endif
Loading