~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/table_function.cc

  • Committer: Andrew Hutchings
  • Date: 2010-11-09 13:38:01 UTC
  • mto: (1919.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1920.
  • Revision ID: andrew@linuxjedi.co.uk-20101109133801-byjzsao76346395x
Add FLUSH GLOBAL STATUS; command
Clears the global status variables for the server

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include <vector>
30
30
 
 
31
using namespace std;
 
32
 
31
33
namespace drizzled
32
34
{
33
35
 
59
61
  return false;
60
62
}
61
63
 
62
 
plugin::TableFunction *plugin::TableFunction::getFunction(const std::string &arg)
 
64
plugin::TableFunction *plugin::TableFunction::getFunction(const string &arg)
63
65
{
64
66
  return table_functions.getFunction(arg);
65
67
}
66
68
 
67
 
void plugin::TableFunction::getNames(const std::string &arg,
68
 
                                     std::set<std::string> &set_of_names)
 
69
void plugin::TableFunction::getNames(const string &arg,
 
70
                                     set<std::string> &set_of_names)
69
71
{
70
72
  table_functions.getNames(arg, set_of_names);
71
73
}
192
194
  assert(arg);
193
195
  length= length ? length : strlen(arg);
194
196
 
195
 
  if ((*columns_iterator)->char_length() < length)
196
 
    length= (*columns_iterator)->char_length();
197
 
 
198
197
  (*columns_iterator)->store(arg, length, scs);
199
198
  (*columns_iterator)->set_notnull();
200
199
  columns_iterator++;
202
201
 
203
202
void plugin::TableFunction::Generator::push()
204
203
{
205
 
  /* Only accept NULLs */
206
 
  assert((*columns_iterator)->maybe_null());
 
204
#if 0 // @note this needs to be rewritten such that a drizzled::Field object can determine if it should ever be null
 
205
  assert((*columns_iterator)->getTable()->getShare()->getTableProto()->field((*columns_iterator)->getTable()->getFields() - columns_iterator).constraints().is_nullable());
 
206
#endif
207
207
  (*columns_iterator)->set_null();
208
208
  columns_iterator++;
209
209
}