~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/func.cc

  • Committer: Stewart Smith
  • Date: 2009-08-20 17:15:54 UTC
  • mto: (1119.2.2 merge)
  • mto: This revision was merged to the branch mainline in revision 1124.
  • Revision ID: stewart@flamingspork.com-20090820171554-72eo1tqlc4n64rak
Valgrind 3.5 requires --alignment to be a power of 2 between 16 and 4096. The specifying --alignment is not important for us, so remove it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <drizzled/server_includes.h>
21
21
 
22
22
#include <drizzled/sql_string.h>
23
23
#include <drizzled/sql_list.h>
35
35
 
36
36
using namespace std;
37
37
 
38
 
namespace drizzled
39
 
{
40
 
 
41
 
 
42
38
void Item_func::set_arguments(List<Item> &list)
43
39
{
44
40
  allowed_arg_cols= 1;
45
41
  arg_count=list.elements;
46
42
  args= tmp_arg;                                // If 2 arguments
47
 
  if (arg_count <= 2 || (args=(Item**) memory::sql_alloc(sizeof(Item*)*arg_count)))
 
43
  if (arg_count <= 2 || (args=(Item**) sql_alloc(sizeof(Item*)*arg_count)))
48
44
  {
49
45
    List_iterator_fast<Item> li(list);
50
46
    Item *item;
143
139
        We shouldn't call fix_fields() twice, so check 'fixed' field first
144
140
      */
145
141
      if ((!(*arg)->fixed && (*arg)->fix_fields(session, arg)))
146
 
        return true;
 
142
        return true;        /* purecov: inspected */
147
143
      item= *arg;
148
144
 
149
145
      if (allowed_arg_cols)
465
461
  case STRING_RESULT:
466
462
    return make_string_field(table);
467
463
  case DECIMAL_RESULT:
468
 
    field= new Field_decimal(my_decimal_precision_to_length(decimal_precision(),
469
 
                                                            decimals,
470
 
                                                            unsigned_flag),
471
 
                             maybe_null,
472
 
                             name,
473
 
                             decimals,
474
 
                             unsigned_flag);
 
464
    field= new Field_new_decimal(
 
465
                       my_decimal_precision_to_length(decimal_precision(),
 
466
                                                      decimals,
 
467
                                                      unsigned_flag),
 
468
                       maybe_null, name, decimals, unsigned_flag);
475
469
    break;
476
470
  case ROW_RESULT:
477
471
  default:
632
626
}
633
627
 
634
628
 
635
 
} /* namespace drizzled */