~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/syslog/function.cc

Merge in Stewart's FK work

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 "config.h"
21
21
 
22
22
#include <drizzled/gettext.h>
23
23
#include <drizzled/session.h>
25
25
#include "function.h"
26
26
#include "wrap.h"
27
27
 
28
 
namespace drizzle_plugin
29
 
{
 
28
using namespace drizzled;
30
29
 
31
 
udf::Syslog::Syslog()
 
30
Function_syslog::Function_syslog()
32
31
  : Item_str_func()
33
 
{ }
 
32
{
 
33
  WrapSyslog::singleton().openlog(syslog_module::sysvar_ident);
 
34
}
34
35
 
35
 
drizzled::String *udf::Syslog::val_str(drizzled::String *s)
 
36
String *Function_syslog::val_str(String *s)
36
37
{
37
38
 
38
39
  if (args[0]->null_value || args[1]->null_value || args[2]->null_value)
63
64
  return args[2]->val_str(s);
64
65
}
65
66
 
66
 
void udf::Syslog::fix_length_and_dec()
 
67
void Function_syslog::fix_length_and_dec()
67
68
{
68
69
  max_length= args[0]->max_length;
69
70
}
70
71
 
71
 
bool udf::Syslog::check_argument_count(int n)
 
72
bool Function_syslog::check_argument_count(int n)
72
73
{
73
74
  return (n == 3);
74
75
}
75
76
 
76
 
} /* namespace drizzle_plugin */