Commit 7b0f8635 authored by monty@narttu.mysql.fi's avatar monty@narttu.mysql.fi

Merge bk-internal.mysql.com:/home/bk/mysql-5.1

into  mysql.com:/home/my/mysql-5.1
parents 3ad6ad75 91c3e28d
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
*.d *.d
*.da *.da
*.exe *.exe
*.gcda
*.gcno
*.gcov *.gcov
*.idb *.idb
*.la *.la
......
...@@ -14,7 +14,7 @@ export LDFLAGS="-fprofile-arcs -ftest-coverage" ...@@ -14,7 +14,7 @@ export LDFLAGS="-fprofile-arcs -ftest-coverage"
# The -fprofile-arcs and -ftest-coverage options cause GCC to instrument the # The -fprofile-arcs and -ftest-coverage options cause GCC to instrument the
# code with profiling information used by gcov. # code with profiling information used by gcov.
# the -DDISABLE_TAO_ASM is needed to avoid build failures in Yassl. # the -DDISABLE_TAO_ASM is needed to avoid build failures in Yassl.
extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM" extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DHAVE_MUTEX_THREAD_ONLY"
extra_configs="$pentium_configs $debug_configs --disable-shared $static_link" extra_configs="$pentium_configs $debug_configs --disable-shared $static_link"
extra_configs="$extra_configs $max_configs" extra_configs="$extra_configs $max_configs"
......
...@@ -623,4 +623,10 @@ delete from mysql.db where user='mysqltest_4'; ...@@ -623,4 +623,10 @@ delete from mysql.db where user='mysqltest_4';
delete from mysql.tables_priv where user='mysqltest_4'; delete from mysql.tables_priv where user='mysqltest_4';
flush privileges; flush privileges;
drop database mysqltest; 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 End of 5.1 tests
...@@ -445,4 +445,17 @@ delete from mysql.tables_priv where user='mysqltest_4'; ...@@ -445,4 +445,17 @@ delete from mysql.tables_priv where user='mysqltest_4';
flush privileges; flush privileges;
drop database mysqltest; 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 --echo End of 5.1 tests
...@@ -548,7 +548,8 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a) ...@@ -548,7 +548,8 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
case HA_KEYTYPE_DOUBLE: case HA_KEYTYPE_DOUBLE:
a= end; a= end;
break; break;
case HA_KEYTYPE_END: case HA_KEYTYPE_END: /* purecov: inspected */
/* keep compiler happy */
DBUG_ASSERT(0); DBUG_ASSERT(0);
break; break;
} }
......
...@@ -688,9 +688,17 @@ static void make_sortkey(register SORTPARAM *param, ...@@ -688,9 +688,17 @@ static void make_sortkey(register SORTPARAM *param,
bzero((char*) to-1,sort_field->length+1); bzero((char*) to-1,sort_field->length+1);
else 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", DBUG_PRINT("warning",
("Got null on something that shouldn't be null")); ("Got null on something that shouldn't be null"));
bzero((char*) to,sort_field->length); // Avoid crash bzero((char*) to,sort_field->length); // Avoid crash
/* purecov: end */
} }
break; break;
} }
...@@ -699,7 +707,7 @@ static void make_sortkey(register SORTPARAM *param, ...@@ -699,7 +707,7 @@ static void make_sortkey(register SORTPARAM *param,
diff=(int) (sort_field_length - length); diff=(int) (sort_field_length - length);
if (diff < 0) if (diff < 0)
{ {
diff=0; /* purecov: inspected */ diff=0;
length= sort_field_length; length= sort_field_length;
} }
if (sort_field->suffix_length) if (sort_field->suffix_length)
......
...@@ -125,6 +125,7 @@ static TABLE_LIST binlog_tables; ...@@ -125,6 +125,7 @@ static TABLE_LIST binlog_tables;
*/ */
#ifndef DBUG_OFF #ifndef DBUG_OFF
/* purecov: begin deadcode */
static void print_records(TABLE *table, const char *record) static void print_records(TABLE *table, const char *record)
{ {
for (uint j= 0; j < table->s->fields; j++) for (uint j= 0; j < table->s->fields; j++)
...@@ -144,6 +145,7 @@ static void print_records(TABLE *table, const char *record) ...@@ -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)); DBUG_PRINT("info",("[%u]field_ptr[0->%d]: %s", j, n, buf));
} }
} }
/* purecov: end */
#else #else
#define print_records(a,b) #define print_records(a,b)
#endif #endif
......
...@@ -5918,6 +5918,7 @@ int Table_map_log_event::exec_event(st_relay_log_info *rli) ...@@ -5918,6 +5918,7 @@ int Table_map_log_event::exec_event(st_relay_log_info *rli)
if (col <= tsh->fields) if (col <= tsh->fields)
{ {
/* purecov: begin inspected */
/* /*
If we get here, the number of columns in the event didn't 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* match the number of columns in the table on the slave, *or*
...@@ -5950,6 +5951,7 @@ int Table_map_log_event::exec_event(st_relay_log_info *rli) ...@@ -5950,6 +5951,7 @@ int Table_map_log_event::exec_event(st_relay_log_info *rli)
thd->query_error= 1; thd->query_error= 1;
error= ERR_BAD_TABLE_DEF; error= ERR_BAD_TABLE_DEF;
goto err; goto err;
/* purecov: end */
} }
/* /*
......
...@@ -3223,9 +3223,11 @@ server."); ...@@ -3223,9 +3223,11 @@ server.");
/* fall back to the log files if tables are not present */ /* fall back to the log files if tables are not present */
if (have_csv_db == SHOW_OPTION_NO) if (have_csv_db == SHOW_OPTION_NO)
{ {
/* purecov: begin inspected */
sql_print_error("CSV engine is not present, falling back to the " sql_print_error("CSV engine is not present, falling back to the "
"log files"); "log files");
log_output_options= (log_output_options & ~LOG_TABLE) | LOG_FILE; 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, logger.set_handlers(LOG_FILE, opt_slow_log ? log_output_options:LOG_NONE,
......
...@@ -5209,7 +5209,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) ...@@ -5209,7 +5209,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
even if the query itself redirects the output. even if the query itself redirects the output.
*/ */
if (!(result= new select_send())) if (!(result= new select_send()))
return 1; return 1; /* purecov: inspected */
thd->send_explain_fields(result); thd->send_explain_fields(result);
res= mysql_explain_union(thd, &thd->lex->unit, result); res= mysql_explain_union(thd, &thd->lex->unit, result);
if (lex->describe & DESCRIBE_EXTENDED) if (lex->describe & DESCRIBE_EXTENDED)
...@@ -5228,7 +5228,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) ...@@ -5228,7 +5228,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
else else
{ {
if (!result && !(result= new select_send())) if (!result && !(result= new select_send()))
return 1; return 1; /* purecov: inspected */
query_cache_store_query(thd, all_tables); query_cache_store_query(thd, all_tables);
res= handle_select(thd, lex, result, 0); res= handle_select(thd, lex, result, 0);
if (result != lex->result) if (result != lex->result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment