diff --git a/sql/item.cc b/sql/item.cc index a1b0e576109..07d5200784d 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -4390,9 +4390,8 @@ my_decimal *Item_cache_real::val_decimal(my_decimal *decimal_val) void Item_cache_decimal::store(Item *item) { my_decimal *val= item->val_decimal_result(&decimal_value); - if (val != &decimal_value && !item->null_value) + if (!(null_value= item->null_value) && val != &decimal_value) my_decimal2decimal(val, &decimal_value); - null_value= item->null_value; } double Item_cache_decimal::val_real() diff --git a/sql/protocol.cc b/sql/protocol.cc index 81444500421..a05f4c6079b 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -326,7 +326,7 @@ send_ok(THD *thd, ha_rows affected_rows, ulonglong id, const char *message) /* We can't anymore send an error to the client */ thd->net.report_error= 0; thd->net.no_send_error= 1; - DBUG_PRINT("info", ("OK sent, so no more error sendong allowed")); + DBUG_PRINT("info", ("OK sent, so no more error sending allowed")); DBUG_VOID_RETURN; } @@ -388,7 +388,7 @@ send_eof(THD *thd, bool no_flush) VOID(net_flush(net)); } thd->net.no_send_error= 1; - DBUG_PRINT("info", ("EOF sent, so no more error sendong allowed")); + DBUG_PRINT("info", ("EOF sent, so no more error sending allowed")); } DBUG_VOID_RETURN; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 207803af280..db6c5ce530d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2363,7 +2363,10 @@ mysql_execute_command(THD *thd) lex->sql_command != SQLCOM_LOCK_TABLES && lex->sql_command != SQLCOM_UNLOCK_TABLES) { - if (process_nested_sp(thd, lex, &locked_tables)) + thd->no_warnings_for_error= 1; + res= process_nested_sp(thd, lex, &locked_tables); + thd->no_warnings_for_error= 0; + if (res) DBUG_RETURN(TRUE); } @@ -3819,9 +3822,9 @@ unsent_create_error: } #endif /*!NO_EMBEDDED_ACCESS_CHECKS*/ case SQLCOM_RESET: - /* - RESET commands are never written to the binary log, so we have to - initialize this variable because RESET shares the same code as FLUSH + /* + RESET commands are never written to the binary log, so we have to + initialize this variable because RESET shares the same code as FLUSH */ lex->no_write_to_binlog= 1; case SQLCOM_FLUSH: @@ -4180,8 +4183,9 @@ unsent_create_error: thd->row_count_func= 0; res= sp->execute_procedure(thd, &lex->value_list); - /* If warnings have been cleared, we have to clear total_warn_count - * too, otherwise the clients get confused. + /* + If warnings have been cleared, we have to clear total_warn_count + too, otherwise the clients get confused. */ if (thd->warn_list.is_empty()) thd->total_warn_count= 0; diff --git a/sql/table.cc b/sql/table.cc index dc791b384be..31d20271707 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1800,7 +1800,8 @@ bool st_table_list::setup_ancestor(THD *thd, Item **conds, alloc(select->item_list.elements * sizeof(Field_translator))))) { - DBUG_RETURN(TRUE); + res= TRUE; + goto ok; // Restore thd } select_lex->no_wrap_view_item= 1;