projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge in fetch updates/break out memory/create error bits for host failures.
[m6w6/libmemcached]
/
libmemcached
/
options
/
parser.yy
diff --git
a/libmemcached/options/parser.yy
b/libmemcached/options/parser.yy
index a628ac22968f3dd0b9f495184fd10c08fbcac8ba..7a8283ec490fd46f1590b55a318e2d9533289d21 100644
(file)
--- a/
libmemcached/options/parser.yy
+++ b/
libmemcached/options/parser.yy
@@
-39,14
+39,13
@@
#include <stdint.h>
#include <stdint.h>
+#include <libmemcached/common.h>
#include <libmemcached/options/context.h>
#include <libmemcached/options/string.h>
#include <libmemcached/options/symbol.h>
#include <libmemcached/options/context.h>
#include <libmemcached/options/string.h>
#include <libmemcached/options/symbol.h>
-#include <libmemcached/visibility.h>
-#include <libmemcached/prefix_key.h>
+#include <libmemcached/options/scanner.h>
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wold-style-cast"
-#include <libmemcached/options/scanner.h>
int conf_lex(YYSTYPE* lvalp, void* scanner);
int conf_lex(YYSTYPE* lvalp, void* scanner);
@@
-80,7
+79,7
@@
inline void config_error(Context *context, yyscan_t *scanner, const char *error)
%token CONNECT_TIMEOUT
%token DISTRIBUTION
%token HASH
%token CONNECT_TIMEOUT
%token DISTRIBUTION
%token HASH
-%token HASH_WITH_
PREFIX_KEY
+%token HASH_WITH_
NAMESPACE
%token IO_BYTES_WATERMARK
%token IO_KEY_PREFETCH
%token IO_MSG_WATERMARK
%token IO_BYTES_WATERMARK
%token IO_KEY_PREFETCH
%token IO_MSG_WATERMARK
@@
-106,7
+105,11
@@
inline void config_error(Context *context, yyscan_t *scanner, const char *error)
%token _TCP_NODELAY
/* Callbacks */
%token _TCP_NODELAY
/* Callbacks */
-%token PREFIX_KEY
+%token NAMESPACE
+
+/* Pool */
+%token POOL_MIN
+%token POOL_MAX
/* Hash types */
%token MD5
/* Hash types */
%token MD5
@@
-210,11
+213,19
@@
expression:
{
memcached_set_configuration_file(context->memc, $2.c_str, $2.length);
}
{
memcached_set_configuration_file(context->memc, $2.c_str, $2.length);
}
+ | POOL_MIN NUMBER
+ {
+ context->memc->configure.initial_pool_size= $2;
+ }
+ | POOL_MAX NUMBER
+ {
+ context->memc->configure.max_pool_size= $2;
+ }
| behaviors
;
behaviors:
| behaviors
;
behaviors:
-
PREFIX_KEY
string
+
NAMESPACE
string
{
if ((context->rc= memcached_set_prefix_key(context->memc, $2.c_str, $2.length)) != MEMCACHED_SUCCESS)
{
{
if ((context->rc= memcached_set_prefix_key(context->memc, $2.c_str, $2.length)) != MEMCACHED_SUCCESS)
{
@@
-325,7
+336,7
@@
behavior_boolean:
{
$$= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
}
{
$$= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS;
}
- | HASH_WITH_
PREFIX_KEY
+ | HASH_WITH_
NAMESPACE
{
$$= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
}
{
$$= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY;
}