~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/haildb/haildb_version_func.cc

Merge to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <drizzled/item/func.h>
22
22
#include "drizzled/charset.h"
23
23
#include <drizzled/function/str/strfunc.h>
24
 
#include "libinnodb_version_func.h"
 
24
#include "haildb_version_func.h"
25
25
 
26
26
#if defined(HAVE_HAILDB_H)
27
27
# include <haildb.h>
32
32
using namespace std;
33
33
using namespace drizzled;
34
34
 
35
 
class LibinnodbVersionFunction : public Item_str_func
 
35
class HailDBVersionFunction : public Item_str_func
36
36
{
37
37
public:
38
 
  LibinnodbVersionFunction() : Item_str_func() {}
 
38
  HailDBVersionFunction() : Item_str_func() {}
39
39
  String *val_str(String*);
40
40
 
41
41
  void fix_length_and_dec()
45
45
 
46
46
  const char *func_name() const
47
47
  {
48
 
    return "libinnodb_version";
 
48
    return "haildb_version";
49
49
  }
50
50
 
51
51
  bool check_argument_count(int n)
55
55
};
56
56
 
57
57
 
58
 
String *LibinnodbVersionFunction::val_str(String *str)
 
58
String *HailDBVersionFunction::val_str(String *str)
59
59
{
60
60
  assert(fixed == true);
61
61
 
81
81
}
82
82
 
83
83
 
84
 
plugin::Create_function<LibinnodbVersionFunction> *libinnodb_version_func= NULL;
 
84
plugin::Create_function<HailDBVersionFunction> *haildb_version_func= NULL;
85
85
 
86
 
int libinnodb_version_func_initialize(module::Context &context)
 
86
int haildb_version_func_initialize(module::Context &context)
87
87
{
88
 
  libinnodb_version_func= new plugin::Create_function<LibinnodbVersionFunction>("libinnodb_version");
89
 
  context.add(libinnodb_version_func);
 
88
  haildb_version_func= new plugin::Create_function<HailDBVersionFunction>("haildb_version");
 
89
  context.add(haildb_version_func);
90
90
  return 0;
91
91
}