~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/table_function.cc

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
mergeĀ lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
{
164
164
  columns_iterator= columns;
165
165
  bool ret= populate();
166
 
  uint64_t difference= columns_iterator - columns;
167
 
 
168
166
  if (ret)
169
 
    assert(difference == field_size);
 
167
    assert(columns_iterator == columns + field_size);
170
168
  return ret;
171
169
}
172
170
 
188
186
{
189
187
  assert(columns_iterator);
190
188
  assert(*columns_iterator);
191
 
  assert(arg);
192
 
  length= length ? length : strlen(arg);
 
189
  if (arg && not length)
 
190
    length= strlen(arg);
193
191
 
194
192
  if ((*columns_iterator)->char_length() < length)
195
193
    length= (*columns_iterator)->char_length();
207
205
  columns_iterator++;
208
206
}
209
207
 
210
 
void plugin::TableFunction::Generator::push(const std::string& arg)
 
208
void plugin::TableFunction::Generator::push(str_ref arg)
211
209
{
212
 
  push(arg.c_str(), arg.length());
 
210
  push(arg.data(), arg.size());
213
211
}
214
212
 
215
213
void plugin::TableFunction::Generator::push(bool arg)