~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/connection_id/connection_id.cc

  • Committer: Brian Aker
  • Date: 2009-12-03 04:18:00 UTC
  • mto: (1237.3.3 push)
  • mto: This revision was merged to the branch mainline in revision 1238.
  • Revision ID: brian@gaz-20091203041800-rxbans14m0bo0xcs
Final move of index flags up to Engine (new interface still needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <drizzled/server_includes.h>
21
21
#include <drizzled/function/math/int.h>
22
22
#include <drizzled/plugin/function.h>
23
23
#include <drizzled/session.h>
68
68
 
69
69
plugin::Create_function<ConnectionIdFunction> *connection_idudf= NULL;
70
70
 
71
 
static int initialize(module::Context &context)
 
71
static int initialize(plugin::Registry &registry)
72
72
{
73
73
  connection_idudf=
74
74
    new plugin::Create_function<ConnectionIdFunction>("connection_id");
75
 
  context.add(connection_idudf);
 
75
  registry.add(connection_idudf);
76
76
  return 0;
77
77
}
78
78
 
79
 
DRIZZLE_DECLARE_PLUGIN
80
 
{
81
 
  DRIZZLE_VERSION_ID,
 
79
static int finalize(plugin::Registry &registry)
 
80
{
 
81
   registry.remove(connection_idudf);
 
82
   delete connection_idudf;
 
83
   return 0;
 
84
}
 
85
 
 
86
drizzle_declare_plugin
 
87
{
82
88
  "connection_id",
83
89
  "1.0",
84
90
  "Devananda van der Veen",
85
91
  "Return the current connection_id",
86
92
  PLUGIN_LICENSE_GPL,
87
93
  initialize, /* Plugin Init */
 
94
  finalize,   /* Plugin Deinit */
 
95
  NULL,   /* status variables */
88
96
  NULL,   /* system variables */
89
97
  NULL    /* config options */
90
98
}
91
 
DRIZZLE_DECLARE_PLUGIN_END;
 
99
drizzle_declare_plugin_end;