34 #include <drizzled/function/str/strfunc.h>
36 #include "memcached_functions.h"
39 #include <libmemcached/memcached.h>
55 if ((arg_count != 3 && arg_count != 4) ||
56 ! (master_key= args[0]->val_str(&value)) ||
57 ! (key= args[1]->val_str(&value)) ||
58 ! (res= args[2]->val_str(&value)) ||
66 String *tmp_exp= args[3]->val_str(&value);;
68 expiration= (time_t)atoi(tmp_exp->c_ptr());
71 rc= memcached_add_by_key(memc,
72 master_key->c_ptr(), master_key->length(),
73 key->c_ptr(), key->length(),
74 res->c_ptr(), res->length(),
75 expiration, (uint16_t) 0);
77 if (rc != MEMCACHED_SUCCESS)
TODO: Rename this file - func.h is stupid.