~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/func.cc

  • Committer: Mark Atwood
  • Date: 2011-05-13 18:04:43 UTC
  • mfrom: (2297.2.3 drizzle-ga)
  • Revision ID: me@mark.atwood.name-20110513180443-qeuvd6tqajgy3ww6
mergeĀ lp:~brianaker/drizzle/func-no-session

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
 
45
45
Item_func::Item_func(void):
46
 
  _session(*current_session),
47
46
  allowed_arg_cols(1), arg_count(0),
48
47
  const_item_cache(false)
49
48
  {
52
51
  }
53
52
 
54
53
Item_func::Item_func(Item *a):
55
 
  _session(*current_session),
56
54
  allowed_arg_cols(1), arg_count(1),
57
55
  const_item_cache(false)
58
56
  {
63
61
  }
64
62
 
65
63
Item_func::Item_func(Item *a,Item *b):
66
 
  _session(*current_session),
67
64
  allowed_arg_cols(1), arg_count(2),
68
65
  const_item_cache(false)
69
66
  {
74
71
  }
75
72
 
76
73
Item_func::Item_func(Item *a,Item *b,Item *c):
77
 
  _session(*current_session),
78
74
  allowed_arg_cols(1),
79
75
  const_item_cache(false)
80
76
  {
89
85
  }
90
86
 
91
87
Item_func::Item_func(Item *a,Item *b,Item *c,Item *d):
92
 
  _session(*current_session),
93
88
  allowed_arg_cols(1),
94
89
  const_item_cache(false)
95
90
  {
105
100
  }
106
101
 
107
102
Item_func::Item_func(Item *a,Item *b,Item *c,Item *d,Item* e):
108
 
  _session(*current_session),
109
103
  allowed_arg_cols(1),
110
104
  const_item_cache(false)
111
105
  {
141
135
}
142
136
 
143
137
Item_func::Item_func(List<Item> &list) :
144
 
  _session(*current_session),
145
138
  allowed_arg_cols(1),
146
139
  const_item_cache(false)
147
140
{
151
144
 
152
145
Item_func::Item_func(Session *session, Item_func *item) :
153
146
  Item_result_field(session, item),
154
 
  _session(*current_session),
155
147
  allowed_arg_cols(item->allowed_arg_cols),
156
148
  arg_count(item->arg_count),
157
149
  used_tables_cache(item->used_tables_cache),
164
156
      args= tmp_arg;
165
157
    else
166
158
    {
167
 
      if (!(args=(Item**) session->getMemRoot()->allocate(sizeof(Item*)*arg_count)))
 
159
      if (!(args=(Item**) getSession().getMemRoot()->allocate(sizeof(Item*)*arg_count)))
168
160
        return;
169
161
    }
170
162
    memcpy(args, item->args, sizeof(Item*)*arg_count);