~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/data_engine/function.cc

Additional plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
 
81
81
static drizzled::plugin::StorageEngine *function_plugin= NULL;
82
 
static CharacterSetsTool *character_sets;
83
 
static CollationsTool *collations;
84
 
static ModulesTool *modules;
85
 
static PluginsTool *plugins;
86
 
static ProcesslistTool *processlist;
87
 
static StatementsTool *global_statements;
88
 
static StatementsTool *session_statements;
89
 
static StatusTool *global_status;
90
 
static StatusTool *session_status;
91
 
static VariablesTool *global_variables;
92
 
static VariablesTool *session_variables;
93
 
 
94
82
 
95
83
static int init(drizzled::plugin::Registry &registry)
96
84
{
97
85
  function_plugin= new(std::nothrow) Function("FunctionEngine");
 
86
 
98
87
  if (not function_plugin)
99
88
  {
100
89
    return 1;
101
90
  }
102
91
 
103
 
  character_sets= new(std::nothrow)CharacterSetsTool;
104
 
  collations= new(std::nothrow)CollationsTool;
105
 
  modules= new(std::nothrow)ModulesTool;
106
 
  plugins= new(std::nothrow)PluginsTool;
107
 
  processlist= new(std::nothrow)ProcesslistTool;
108
 
  global_statements= new(std::nothrow)StatementsTool(true);
109
 
  global_status= new(std::nothrow)StatusTool(true);
110
 
  session_statements= new(std::nothrow)StatementsTool(false);
111
 
  session_status= new(std::nothrow)StatusTool(false);
112
 
  global_variables= new(std::nothrow)VariablesTool(true);
113
 
  session_variables= new(std::nothrow)VariablesTool(false);
114
 
 
115
92
  registry.add(function_plugin);
116
93
 
117
 
  registry.add(character_sets);
118
 
  registry.add(collations);
119
 
  registry.add(global_statements);
120
 
  registry.add(global_status);
121
 
  registry.add(global_variables);
122
 
  registry.add(modules);
123
 
  registry.add(plugins);
124
 
  registry.add(processlist);
125
 
  registry.add(session_statements);
126
 
  registry.add(session_status);
127
 
  registry.add(session_variables);
128
 
  
129
94
  return 0;
130
95
}
131
96
 
134
99
  registry.remove(function_plugin);
135
100
  delete function_plugin;
136
101
 
137
 
  delete character_sets;
138
 
  delete collations;
139
 
  delete global_statements;
140
 
  delete global_status;
141
 
  delete global_variables;
142
 
  delete modules;
143
 
  delete plugins;
144
 
  delete processlist;
145
 
  delete session_statements;
146
 
  delete session_status;
147
 
  delete session_variables;
148
 
 
149
102
  return 0;
150
103
}
151
104