~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/func.h

fixed build warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
67
67
 
68
68
  Item_func(void):
69
69
    _session(*current_session),
70
 
    allowed_arg_cols(1), arg_count(0)
 
70
    allowed_arg_cols(1), arg_count(0),
 
71
    const_item_cache(false)
71
72
  {
72
73
    with_sum_func= 0;
73
74
    collation.set(DERIVATION_SYSCONST);
75
76
 
76
77
  Item_func(Item *a):
77
78
    _session(*current_session),
78
 
    allowed_arg_cols(1), arg_count(1)
 
79
    allowed_arg_cols(1), arg_count(1),
 
80
    const_item_cache(false)
79
81
  {
80
82
    args= tmp_arg;
81
83
    args[0]= a;
85
87
  
86
88
  Item_func(Item *a,Item *b):
87
89
    _session(*current_session),
88
 
    allowed_arg_cols(1), arg_count(2)
 
90
    allowed_arg_cols(1), arg_count(2),
 
91
    const_item_cache(false)
89
92
  {
90
93
    args= tmp_arg;
91
94
    args[0]= a; args[1]= b;
95
98
  
96
99
  Item_func(Item *a,Item *b,Item *c):
97
100
    _session(*current_session),
98
 
    allowed_arg_cols(1)
 
101
    allowed_arg_cols(1),
 
102
    const_item_cache(false)
99
103
  {
100
104
    arg_count= 0;
101
105
    if ((args= (Item**) memory::sql_alloc(sizeof(Item*)*3)))
109
113
  
110
114
  Item_func(Item *a,Item *b,Item *c,Item *d):
111
115
    _session(*current_session),
112
 
    allowed_arg_cols(1)
 
116
    allowed_arg_cols(1),
 
117
    const_item_cache(false)
113
118
  {
114
119
    arg_count= 0;
115
120
    if ((args= (Item**) memory::sql_alloc(sizeof(Item*)*4)))
124
129
  
125
130
  Item_func(Item *a,Item *b,Item *c,Item *d,Item* e):
126
131
    _session(*current_session),
127
 
    allowed_arg_cols(1)
 
132
    allowed_arg_cols(1),
 
133
    const_item_cache(false)
128
134
  {
129
135
    arg_count= 5;
130
136
    if ((args= (Item**) memory::sql_alloc(sizeof(Item*)*5)))
183
189
  void count_real_length();
184
190
  void count_decimal_length();
185
191
 
186
 
  bool get_arg0_date(DRIZZLE_TIME *ltime, uint32_t fuzzy_date);
187
 
  bool get_arg0_time(DRIZZLE_TIME *ltime);
 
192
  bool get_arg0_date(type::Time *ltime, uint32_t fuzzy_date);
 
193
  bool get_arg0_time(type::Time *ltime);
188
194
 
189
195
  bool is_null();
190
196
 
 
197
  virtual bool deterministic() const
 
198
  {
 
199
    return false;
 
200
  }
 
201
 
191
202
  void signal_divide_by_null();
192
203
 
193
204
  virtual Field *tmp_table_field() { return result_field; }
195
206
 
196
207
  Item *get_tmp_table_item(Session *session);
197
208
 
198
 
  my_decimal *val_decimal(my_decimal *);
 
209
  type::Decimal *val_decimal(type::Decimal *);
199
210
 
200
211
  bool agg_arg_collations(DTCollation &c, Item **items, uint32_t nitems,
201
212
                          uint32_t flags);