diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 4f8b83e530c..9d588ce0eb1 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -366,7 +366,7 @@ Item *Item_func::transform(THD *thd, Item_transformer transformer, uchar *argume callback functions. First the function applies the analyzer to the root node of - the Item_func object. Then if the analizer succeeeds (returns TRUE) + the Item_func object. Then if the analyzer succeeds (returns TRUE) the function recursively applies the compile method to each argument of the Item_func node. If the call of the method for an argument item returns a new item @@ -1701,6 +1701,8 @@ my_decimal *Item_func_div::decimal_op(my_decimal *decimal_value) null_value= 1; return 0; } + my_decimal_round(E_DEC_FATAL_ERROR, decimal_value, + decimals, FALSE, decimal_value); return decimal_value; } @@ -1769,7 +1771,7 @@ bool Item_func_div::fix_length_and_dec() case TIME_RESULT: DBUG_ASSERT(0); } - maybe_null= 1; // devision by zero + maybe_null= 1; // division by zero DBUG_RETURN(FALSE); } @@ -1843,7 +1845,7 @@ longlong Item_func_int_div::val_int() bool Item_func_int_div::fix_length_and_dec() { Item_result argtype= args[0]->result_type(); - /* use precision ony for the data type it is applicable for and valid */ + /* use precision only for the data type it is applicable for and valid */ uint32 char_length= args[0]->max_char_length() - (argtype == DECIMAL_RESULT || argtype == INT_RESULT ? args[0]->decimals : 0); @@ -4822,7 +4824,7 @@ bool Item_func_set_user_var::register_field_in_bitmap(void *arg) @param type type of new value @param cs charset info for new value @param dv derivation for new value - @param unsigned_arg indiates if a value of type INT_RESULT is unsigned + @param unsigned_arg indicates if a value of type INT_RESULT is unsigned @note Sets error and fatal error if allocation fails. @@ -6567,7 +6569,7 @@ void my_missing_function_error(const LEX_STRING &token, const char *func_name) @brief Initialize the result field by creating a temporary dummy table and assign it to a newly created field object. Meta data used to create the field is fetched from the sp_head belonging to the stored - proceedure found in the stored procedure functon cache. + procedure found in the stored procedure function cache. @note This function should be called from fix_fields to init the result field. It is some what related to Item_field. @@ -6871,7 +6873,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) /* Here we check privileges of the stored routine only during view creation, in order to validate the view. A runtime check is - perfomed in Item_func_sp::execute(), and this method is not + performed in Item_func_sp::execute(), and this method is not called during context analysis. Notice, that during view creation we do not infer into stored routine bodies and do not check privileges of its statements, which would probably be a |