~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/version/versionudf.cc

  • Committer: Jay Pipes
  • Date: 2010-03-09 20:02:29 UTC
  • mto: This revision was merged to the branch mainline in revision 1339.
  • Revision ID: jpipes@serialcoder-20100309200229-dfrliy4fads9vyf4
Fixes Bug #535296 by only incrementing ha_commit_count when its a normal transaction commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#include "config.h"
21
21
#include <drizzled/function/str/strfunc.h>
22
22
#include <drizzled/plugin/function.h>
23
 
#include <drizzled/version.h>
 
23
#include "drizzled/version.h"
24
24
 
25
25
using namespace std;
26
26
using namespace drizzled;
46
46
 
47
47
String *VersionFunction::val_str(String *str)
48
48
{
49
 
  str->set(::drizzled::version().c_str(), ::drizzled::version().size(),
 
49
  str->set(version().c_str(), version().size(),
50
50
           system_charset_info);
51
51
  return str;
52
52
}
53
53
 
54
54
plugin::Create_function<VersionFunction> *versionudf= NULL;
55
55
 
56
 
static int initialize(module::Context &context)
 
56
static int initialize(plugin::Registry &registry)
57
57
{
58
58
  versionudf= new plugin::Create_function<VersionFunction>("version");
59
 
  context.add(versionudf);
 
59
  registry.add(versionudf);
60
60
  return 0;
61
61
}
62
62
 
63
 
DRIZZLE_PLUGIN(initialize, NULL, NULL);
 
63
static int finalize(plugin::Registry &registry)
 
64
{
 
65
   registry.remove(versionudf);
 
66
   delete versionudf;
 
67
   return 0;
 
68
}
 
69
 
 
70
DRIZZLE_PLUGIN(initialize, finalize, NULL);