diff -Narup ./023_mariadb-10.0.15-partition_parallel_search2/sql/mysqld.cc ./024_mariadb-10.0.15-log_result_errors/sql/mysqld.cc
--- ./023_mariadb-10.0.15-partition_parallel_search2/sql/mysqld.cc	2014-11-29 17:01:50.131814500 +0900
+++ ./024_mariadb-10.0.15-log_result_errors/sql/mysqld.cc	2014-11-29 17:05:52.727462663 +0900
@@ -375,6 +375,7 @@ static DYNAMIC_ARRAY all_options;
 bool opt_bin_log, opt_bin_log_used=0, opt_ignore_builtin_innodb= 0;
 my_bool opt_log, opt_slow_log, debug_assert_if_crashed_table= 0, opt_help= 0;
 static my_bool opt_abort;
+uint opt_log_result_errors;
 ulonglong log_output_options;
 my_bool opt_userstat_running;
 my_bool opt_log_queries_not_using_indexes= 0;
diff -Narup ./023_mariadb-10.0.15-partition_parallel_search2/sql/mysqld.h ./024_mariadb-10.0.15-log_result_errors/sql/mysqld.h
--- ./023_mariadb-10.0.15-partition_parallel_search2/sql/mysqld.h	2014-11-29 17:01:38.859797153 +0900
+++ ./024_mariadb-10.0.15-log_result_errors/sql/mysqld.h	2014-11-29 17:05:52.728473191 +0900
@@ -81,6 +81,7 @@ extern MY_BITMAP temp_pool;
 extern bool opt_large_files, server_id_supplied;
 extern bool opt_update_log, opt_bin_log, opt_error_log;
 extern my_bool opt_log, opt_slow_log, opt_bootstrap;
+extern uint opt_log_result_errors;
 extern my_bool opt_backup_history_log;
 extern my_bool opt_backup_progress_log;
 extern ulonglong log_output_options;
diff -Narup ./023_mariadb-10.0.15-partition_parallel_search2/sql/protocol.cc ./024_mariadb-10.0.15-log_result_errors/sql/protocol.cc
--- ./023_mariadb-10.0.15-partition_parallel_search2/sql/protocol.cc	2014-11-29 17:02:32.086759994 +0900
+++ ./024_mariadb-10.0.15-log_result_errors/sql/protocol.cc	2014-11-29 17:05:53.065410450 +0900
@@ -222,6 +222,43 @@ net_send_ok(THD *thd,
     DBUG_RETURN(FALSE);
   }
 
+  if (opt_log_result_errors >= 2 && statement_warn_count > 0)
+  {
+    time_t cur_time = (time_t) time((time_t*) 0);
+    struct tm lt;
+    struct tm *l_time = localtime_r(&cur_time, &lt);
+    fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [WARN RESULT] to %ld:  "
+      "affected_rows: %llu  id: %llu  status: %u  warning_count: %u\n",
+      l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+      l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+      thd->thread_id, affected_rows, id, server_status, statement_warn_count);
+    if (opt_log_result_errors >= 3)
+    {
+      const Sql_condition *warn;
+      Diagnostics_area::Sql_condition_iterator it(thd->get_stmt_da()->
+                                                  sql_conditions());
+      while ((warn = it++))
+      {
+        fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [WARN RESULT] to %ld:  "
+          "Level: %s  Code: %u  Message: %s\n",
+          l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+          l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+          thd->thread_id, warning_level_names[warn->get_level()].str,
+          warn->get_sql_errno(), warn->get_message_text());
+      }
+    }
+  } else if (opt_log_result_errors >= 4)
+  {
+    time_t cur_time = (time_t) time((time_t*) 0);
+    struct tm lt;
+    struct tm *l_time = localtime_r(&cur_time, &lt);
+    fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [INFO RESULT] to %ld:  "
+      "affected_rows: %llu  id: %llu  status: %u  warning_count: %u\n",
+      l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+      l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+      thd->thread_id, affected_rows, id, server_status, statement_warn_count);
+  }
+
   buff[0]=0;					// No fields
   pos=net_store_length(buff+1,affected_rows);
   pos=net_store_length(pos, id);
@@ -302,6 +339,45 @@ net_send_eof(THD *thd, uint server_statu
     thd->get_stmt_da()->set_overwrite_status(false);
     DBUG_PRINT("info", ("EOF sent, so no more error sending allowed"));
   }
+
+  if (opt_log_result_errors >= 2 && statement_warn_count > 0)
+  {
+    time_t cur_time = (time_t) time((time_t*) 0);
+    struct tm lt;
+    struct tm *l_time = localtime_r(&cur_time, &lt);
+    fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [WARN RESULT] to %ld:  "
+      "found_rows: %llu  status: %u  warning_count: %u\n",
+      l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+      l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+      thd->thread_id, thd->limit_found_rows, server_status,
+      statement_warn_count);
+    if (opt_log_result_errors >= 3)
+    {
+      const Sql_condition *warn;
+      Diagnostics_area::Sql_condition_iterator it(thd->get_stmt_da()->
+                                                  sql_conditions());
+      while ((warn = it++))
+      {
+        fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [WARN RESULT] to %ld:  "
+          "Level: %s  Code: %u  Message: %s\n",
+          l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+          l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+          thd->thread_id, warning_level_names[warn->get_level()].str,
+          warn->get_sql_errno(), warn->get_message_text());
+      }
+    }
+  } else if (opt_log_result_errors >= 4)
+  {
+    time_t cur_time = (time_t) time((time_t*) 0);
+    struct tm lt;
+    struct tm *l_time = localtime_r(&cur_time, &lt);
+    fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [INFO RESULT] to %ld:  "
+      "found_rows: %llu  status: %u  warning_count: %u\n",
+      l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+      l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+      thd->thread_id, thd->limit_found_rows, server_status,
+      statement_warn_count);
+  }
   DBUG_RETURN(error);
 }
 
@@ -387,6 +463,18 @@ bool net_send_error_packet(THD *thd, uin
     DBUG_RETURN(FALSE);
   }
 
+  if (opt_log_result_errors >= 1)
+  {
+    time_t cur_time = (time_t) time((time_t*) 0);
+    struct tm lt;
+    struct tm *l_time = localtime_r(&cur_time, &lt);
+    fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [ERROR RESULT] to %ld: "
+      "%d %s\n",
+      l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+      l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+      thd->thread_id, sql_errno, err);
+  }
+
   int2store(buff,sql_errno);
   pos= buff+2;
   if (thd->client_capabilities & CLIENT_PROTOCOL_41)
diff -Narup ./023_mariadb-10.0.15-partition_parallel_search2/sql/sql_cache.cc ./024_mariadb-10.0.15-log_result_errors/sql/sql_cache.cc
--- ./023_mariadb-10.0.15-partition_parallel_search2/sql/sql_cache.cc	2014-11-22 06:02:53.000000000 +0900
+++ ./024_mariadb-10.0.15-log_result_errors/sql/sql_cache.cc	2014-11-29 17:05:54.065462120 +0900
@@ -2144,6 +2144,18 @@ def_week_frmt: %lu, in_trans: %d, autoco
   else
     status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
 
+  if (opt_log_result_errors >= 4)
+  {
+    time_t cur_time = (time_t) time((time_t*) 0);
+    struct tm lt;
+    struct tm *l_time = localtime_r(&cur_time, &lt);
+    fprintf(stderr, "%04d%02d%02d %02d:%02d:%02d [INFO RESULT] to %ld:  "
+      "qcache:  found_rows: %llu  status: %u\n",
+      l_time->tm_year + 1900, l_time->tm_mon + 1, l_time->tm_mday,
+      l_time->tm_hour, l_time->tm_min, l_time->tm_sec,
+      thd->thread_id, thd->limit_found_rows, thd->server_status);
+  }
+
   /*
     End the statement transaction potentially started by an
     engine callback. We ignore the return value for now,
diff -Narup ./023_mariadb-10.0.15-partition_parallel_search2/sql/sys_vars.cc ./024_mariadb-10.0.15-log_result_errors/sql/sys_vars.cc
--- ./023_mariadb-10.0.15-partition_parallel_search2/sql/sys_vars.cc	2014-11-29 17:01:41.024408957 +0900
+++ ./024_mariadb-10.0.15-log_result_errors/sql/sys_vars.cc	2014-11-29 17:05:54.730380566 +0900
@@ -4000,6 +4000,11 @@ static bool fix_log_state(sys_var *self,
   return res;
 }
 
+static Sys_var_uint Sys_log_result_errors(
+       "log_result_errors", "log result errors into error log file",
+       GLOBAL_VAR(opt_log_result_errors), CMD_LINE(REQUIRED_ARG),
+       VALID_RANGE(0, 4), DEFAULT(0), BLOCK_SIZE(1));
+
 static bool check_not_empty_set(sys_var *self, THD *thd, set_var *var)
 {
   return var->save_result.ulonglong_value == 0;
