~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_func.cc

MergedĀ trunkĀ up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3020
3020
  For the moment, UDF functions are returning DECIMAL values as strings
3021
3021
*/
3022
3022
 
3023
 
my_decimal *udf_handler::val_decimal(my_bool *null_value, my_decimal *dec_buf)
 
3023
my_decimal *udf_handler::val_decimal(bool *null_value, my_decimal *dec_buf)
3024
3024
{
3025
3025
  char buf[DECIMAL_MAX_STR_LENGTH+1], *end;
3026
3026
  ulong res_length= DECIMAL_MAX_STR_LENGTH;
3227
3227
  inline bool initialized() { return key != 0; }
3228
3228
  friend void item_user_lock_release(User_level_lock *ull);
3229
3229
  friend uchar *ull_get_key(const User_level_lock *ull, size_t *length,
3230
 
                            my_bool not_used);
 
3230
                            bool not_used);
3231
3231
};
3232
3232
 
3233
3233
uchar *ull_get_key(const User_level_lock *ull, size_t *length,
3234
 
                   my_bool not_used __attribute__((unused)))
 
3234
                   bool not_used __attribute__((unused)))
3235
3235
{
3236
3236
  *length= ull->key_length;
3237
3237
  return ull->key;
3622
3622
 
3623
3623
/** Get the value of a variable as a double. */
3624
3624
 
3625
 
double user_var_entry::val_real(my_bool *null_value)
 
3625
double user_var_entry::val_real(bool *null_value)
3626
3626
{
3627
3627
  if ((*null_value= (value == 0)))
3628
3628
    return 0.0;
3650
3650
 
3651
3651
/** Get the value of a variable as an integer. */
3652
3652
 
3653
 
int64_t user_var_entry::val_int(my_bool *null_value) const
 
3653
int64_t user_var_entry::val_int(bool *null_value) const
3654
3654
{
3655
3655
  if ((*null_value= (value == 0)))
3656
3656
    return 0LL;
3681
3681
 
3682
3682
/** Get the value of a variable as a string. */
3683
3683
 
3684
 
String *user_var_entry::val_str(my_bool *null_value, String *str,
 
3684
String *user_var_entry::val_str(bool *null_value, String *str,
3685
3685
                                uint decimals)
3686
3686
{
3687
3687
  if ((*null_value= (value == 0)))
3712
3712
 
3713
3713
/** Get the value of a variable as a decimal. */
3714
3714
 
3715
 
my_decimal *user_var_entry::val_decimal(my_bool *null_value, my_decimal *val)
 
3715
my_decimal *user_var_entry::val_decimal(bool *null_value, my_decimal *val)
3716
3716
{
3717
3717
  if ((*null_value= (value == 0)))
3718
3718
    return 0;