~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/sleep/sleep.cc

  • Committer: Stewart Smith
  • Date: 2009-12-02 06:01:21 UTC
  • mto: (1237.1.2 push)
  • mto: This revision was merged to the branch mainline in revision 1238.
  • Revision ID: stewart@flamingspork.com-20091202060121-68gyfqifqcjcmi2v
my_end() no longer requires an argument (we removed them all)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 *  along with this program; if not, write to the Free Software
22
22
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23
23
 */
24
 
 
25
 
#include "config.h"
26
24
 
27
25
#include <unistd.h>
28
26
#include <time.h>
29
27
 
 
28
#include <drizzled/server_includes.h>
30
29
#include <drizzled/session.h>
31
30
#include <drizzled/item/func.h>
32
 
#include "drizzled/internal/my_pthread.h"
 
31
#include <mysys/my_pthread.h>
33
32
#include <drizzled/function/str/strfunc.h>
34
33
 
35
34
#include <string>
128
127
 
129
128
plugin::Create_function<Item_func_sleep> *sleep_udf= NULL;
130
129
 
131
 
static int sleep_plugin_init(drizzled::plugin::Context &context)
 
130
static int sleep_plugin_init(drizzled::plugin::Registry &registry)
132
131
{
133
132
  sleep_udf= new plugin::Create_function<Item_func_sleep>("sleep");
134
 
  context.add(sleep_udf);
135
 
 
136
 
  return 0;
137
 
}
138
 
 
139
 
DRIZZLE_PLUGIN(sleep_plugin_init, NULL);
 
133
  registry.add(sleep_udf);
 
134
 
 
135
  return 0;
 
136
}
 
137
 
 
138
static int sleep_plugin_deinit(drizzled::plugin::Registry &registry)
 
139
{
 
140
  registry.remove(sleep_udf);
 
141
  delete sleep_udf;
 
142
 
 
143
  return 0;
 
144
}
 
145
 
 
146
 
 
147
drizzle_declare_plugin
 
148
{
 
149
  "sleep",
 
150
  "1.0",
 
151
  "Patrick Galbraith",
 
152
  "sleep()",
 
153
  PLUGIN_LICENSE_GPL,
 
154
  sleep_plugin_init, /* Plugin Init */
 
155
  sleep_plugin_deinit, /* Plugin Deinit */
 
156
  NULL,   /* status variables */
 
157
  NULL,   /* system variables */
 
158
  NULL    /* config options */
 
159
}
 
160
drizzle_declare_plugin_end;