| /redis-3.2.3/deps/jemalloc/src/ |
| H A D | ckh.c | 60 if (cell->key != NULL && ckh->keycomp(key, cell->key)) in ckh_bucket_search() 107 cell->key = key; in ckh_try_bucket_insert() 133 key = *argkey; in ckh_evict_reloc_insert() 150 cell->key = key; cell->data = data; in ckh_evict_reloc_insert() 182 *argkey = key; in ckh_evict_reloc_insert() 232 key = aTab[i].key; in ckh_rebuild() 447 *key = (void *)ckh->tab[i].key; in ckh_iter() 493 *key = (void *)ckh->tab[cell].key; in ckh_remove() 524 *key = (void *)ckh->tab[cell].key; in ckh_search() 537 hash(key, strlen((const char *)key), 0x94122f33U, r_hash); in ckh_string_hash() [all …]
|
| /redis-3.2.3/tests/integration/ |
| H A D | redis-cli.tcl | 58 foreach {key value} $opts { 59 if {$key eq "pipe"} { 62 if {$key eq "path"} { 114 r set key foo 126 assert_equal "bar" [r get key] 128 assert_equal " bar " [r get key] 140 assert_equal "bar" [r get key] 145 assert_equal "bar" [r get key] 154 r set key "tab\tnewline\n" 178 assert_equal "bar" [r get key] [all …]
|
| /redis-3.2.3/deps/lua/src/ |
| H A D | ltable.c | 101 switch (ttype(key)) { in mainposition() 121 if (ttisnumber(key)) { in arrayindex() 140 i = arrayindex(key); in findindex() 212 int k = arrayindex(key); in countint() 425 gkey(mp)->value = key->value; gkey(mp)->tt = key->tt; in newkey() 426 luaC_barriert(L, t, key); in newkey() 438 return &t->array[key-1]; in luaH_getnum() 456 Node *n = hashstr(t, key); in luaH_getstr() 470 switch (ttype(key)) { in luaH_get() 501 else if (ttisnumber(key) && luai_numisnan(nvalue(key))) in luaH_set() [all …]
|
| H A D | ltable.h | 21 LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 22 LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 23 LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 24 LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); 25 LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 26 LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 30 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 35 LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);
|
| H A D | loslib.c | 88 static void setfield (lua_State *L, const char *key, int value) { in setfield() argument 90 lua_setfield(L, -2, key); in setfield() 93 static void setboolfield (lua_State *L, const char *key, int value) { in setboolfield() argument 97 lua_setfield(L, -2, key); in setboolfield() 100 static int getboolfield (lua_State *L, const char *key) { in getboolfield() argument 102 lua_getfield(L, -1, key); in getboolfield() 109 static int getfield (lua_State *L, const char *key, int d) { in getfield() argument 111 lua_getfield(L, -1, key); in getfield() 116 return luaL_error(L, "field " LUA_QS " missing in date table", key); in getfield()
|
| /redis-3.2.3/src/ |
| H A D | db.c | 207 sds key; in dbRandomKey() local 214 keyobj = createStringObject(key,sdslen(key)); in dbRandomKey() 392 robj *key; in randomkeyCommand() local 417 if (allkeys || stringmatchlen(pattern,plen,key,sdslen(key),0)) { in keysCommand() 418 keyobj = createStringObject(key,sdslen(key)); in keysCommand() 843 serverAssertWithInfo(NULL,key,dictFind(db->dict,key->ptr) != NULL); in removeExpire() 868 serverAssertWithInfo(NULL,key,dictFind(db->dict,key->ptr) != NULL); in getExpire() 884 argv[1] = key; in propagateExpire() 968 serverAssertWithInfo(c,key,dbDelete(c->db,key)); in expireGenericCommand() 1241 unsigned int hashslot = keyHashSlot(key->ptr,sdslen(key->ptr)); in slotToKeyAdd() [all …]
|
| H A D | dict.h | 48 void *key; member 131 entry->key = (_key_); \ 139 #define dictHashKey(d, key) (d)->type->hashFunction(key) argument 140 #define dictGetKey(he) ((he)->key) 152 int dictAdd(dict *d, void *key, void *val); 153 dictEntry *dictAddRaw(dict *d, void *key); 154 int dictReplace(dict *d, void *key, void *val); 155 dictEntry *dictReplaceRaw(dict *d, void *key); 156 int dictDelete(dict *d, const void *key); 157 int dictDeleteNoFree(dict *d, const void *key); [all …]
|
| H A D | dict.c | 73 key += ~(key << 15); in dictIntHashFunction() 74 key ^= (key >> 10); in dictIntHashFunction() 75 key += (key << 3); in dictIntHashFunction() 76 key ^= (key >> 6); in dictIntHashFunction() 77 key += ~(key << 11); in dictIntHashFunction() 78 key ^= (key >> 16); in dictIntHashFunction() 79 return key; in dictIntHashFunction() 427 if (key==he->key || dictCompareKeys(d, key, he->key)) { in dictGenericDelete() 504 if (key==he->key || dictCompareKeys(d, key, he->key)) in dictFind() 516 he = dictFind(d,key); in dictFetchValue() [all …]
|
| H A D | zipmap.c | 148 if (key != NULL && k == NULL && l == klen && !memcmp(p+llen,key,l)) { in zipmapLookupRaw() 219 p = zipmapLookupRaw(zm,key,klen,&zmlen); in zipmapSet() 270 memcpy(p,key,klen); in zipmapSet() 283 unsigned char *p = zipmapLookupRaw(zm,key,klen,&zmlen); in zipmapDel() 317 if (key) { in zipmapNext() 318 *key = zm; in zipmapNext() 320 *key += ZIPMAP_LEN_BYTES(*klen); in zipmapNext() 337 if ((p = zipmapLookupRaw(zm,key,klen,NULL)) == NULL) return 0; in zipmapGet() 346 return zipmapLookupRaw(zm,key,klen,NULL) != NULL; in zipmapExists() 460 unsigned char *key, *value; in zipmapTest() local [all …]
|
| H A D | multi.c | 197 robj *key; member 202 void watchForKey(client *c, robj *key) { in watchForKey() argument 212 if (wk->db == c->db && equalStringObjects(key,wk->key)) in watchForKey() 216 clients = dictFetchValue(c->db->watched_keys,key); in watchForKey() 219 dictAdd(c->db->watched_keys,key,clients); in watchForKey() 220 incrRefCount(key); in watchForKey() 225 wk->key = key; in watchForKey() 227 incrRefCount(key); in watchForKey() 254 decrRefCount(wk->key); in unwatchAllKeys() 261 void touchWatchedKey(redisDb *db, robj *key) { in touchWatchedKey() argument [all …]
|
| H A D | zipmap.h | 39 unsigned char *zipmapSet(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned char *v… 40 unsigned char *zipmapDel(unsigned char *zm, unsigned char *key, unsigned int klen, int *deleted); 42 unsigned char *zipmapNext(unsigned char *zm, unsigned char **key, unsigned int *klen, unsigned char… 43 int zipmapGet(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned char **value, unsi… 44 int zipmapExists(unsigned char *zm, unsigned char *key, unsigned int klen);
|
| /redis-3.2.3/tests/unit/ |
| H A D | dump.tcl | 60 r set key "Some Value" 79 r set key "Some Value" 85 assert {[$first exists key] == 1} 89 assert {[$first exists key] == 0} 92 assert {[$second ttl key] == -1} 139 r set key "Some Value" 147 $first expire key 10 153 assert {[$second ttl key] >= 7 && [$second ttl key] <= 10} 159 r del key 184 r del key [all …]
|
| H A D | keyspace.tcl | 17 foreach key {key_x key_y key_z foo_a foo_b foo_c} { 18 r set $key hello 32 foreach key [r keys *] {r del $key} 83 test {RENAME source key should no longer exist} { 87 test {RENAME against already existing key} { 104 test {RENAMENX against already existing key} { 115 test {RENAME against non existing source key} { 156 foreach key [r keys *] { 157 r del $key 164 foreach key [r keys *] { [all …]
|
| /redis-3.2.3/utils/hashtable/ |
| H A D | rehashing.c | 10 unsigned long key = (unsigned long)keyp; in dictKeyHash() local 11 key = dictGenHashFunction(&key,sizeof(key)); in dictKeyHash() 12 key += ~(key << 15); in dictKeyHash() 13 key ^= (key >> 10); in dictKeyHash() 14 key += (key << 3); in dictKeyHash() 15 key ^= (key >> 6); in dictKeyHash() 16 key += ~(key << 11); in dictKeyHash() 17 key ^= (key >> 16); in dictKeyHash() 18 return key; in dictKeyHash()
|
| /redis-3.2.3/deps/hiredis/ |
| H A D | dict.h | 46 void *key; member 52 unsigned int (*hashFunction)(const void *key); 53 void *(*keyDup)(void *privdata, const void *key); 56 void (*keyDestructor)(void *privdata, void *key); 98 entry->key = (_key_); \ 106 #define dictHashKey(ht, key) (ht)->type->hashFunction(key) argument 108 #define dictGetEntryKey(he) ((he)->key) 117 static int dictAdd(dict *ht, void *key, void *val); 118 static int dictReplace(dict *ht, void *key, void *val); 119 static int dictDelete(dict *ht, const void *key); [all …]
|
| H A D | dict.c | 46 static int _dictKeyIndex(dict *ht, const void *key); 141 if ((index = _dictKeyIndex(ht, key)) == -1) in dictAdd() 150 dictSetHashKey(ht, entry, key); in dictAdd() 165 if (dictAdd(ht, key, val) == DICT_OK) in dictReplace() 168 entry = dictFind(ht, key); in dictReplace() 188 h = dictHashKey(ht, key) & ht->sizemask; in dictDelete() 193 if (dictCompareHashKeys(ht,key,de->key)) { in dictDelete() 248 h = dictHashKey(ht, key) & ht->sizemask; in dictFind() 251 if (dictCompareHashKeys(ht, key, he->key)) in dictFind() 328 h = dictHashKey(ht, key) & ht->sizemask; in _dictKeyIndex() [all …]
|
| /redis-3.2.3/deps/jemalloc/test/unit/ |
| H A D | rb.c | 20 uint64_t key; member 30 ret = (a->key > b->key) - (a->key < b->key); in node_cmp() 48 node_t key; in TEST_BEGIN() local 56 key.key = 0; in TEST_BEGIN() 57 key.magic = NODE_MAGIC; in TEST_BEGIN() 60 key.key = 0; in TEST_BEGIN() 61 key.magic = NODE_MAGIC; in TEST_BEGIN() 64 key.key = 0; in TEST_BEGIN() 65 key.magic = NODE_MAGIC; in TEST_BEGIN() 170 assert_u64_ge(search_node->key, node->key, in node_remove() [all …]
|
| H A D | hash.c | 66 uint8_t key[256]; in hash_variant_verify() local 72 memset(key, 0, sizeof(key)); in hash_variant_verify() 81 key[i] = (uint8_t)i; in hash_variant_verify() 85 out = hash_x86_32(key, i, 256-i); in hash_variant_verify() 90 hash_x86_128(key, i, 256-i, out); in hash_variant_verify() 95 hash_x64_128(key, i, 256-i, out); in hash_variant_verify()
|
| /redis-3.2.3/deps/jemalloc/include/jemalloc/internal/ |
| H A D | rtree.h | 110 unsigned rtree_start_level(rtree_t *rtree, uintptr_t key); 130 rtree_start_level(rtree_t *rtree, uintptr_t key) in rtree_start_level() argument 134 if (unlikely(key == 0)) in rtree_start_level() 137 start_level = rtree->start_level[lg_floor(key) >> in rtree_start_level() 144 rtree_subkey(rtree_t *rtree, uintptr_t key, unsigned level) in rtree_subkey() argument 147 return ((key >> ((ZU(1) << (LG_SIZEOF_PTR+3)) - in rtree_subkey() 235 rtree_get(rtree_t *rtree, uintptr_t key, bool dependent) in rtree_get() argument 241 start_level = rtree_start_level(rtree, key); in rtree_get() 247 subkey = rtree_subkey(rtree, key, i); in rtree_get() 269 start_level = rtree_start_level(rtree, key); in rtree_set() [all …]
|
| H A D | ckh.h | 28 const void *key; member 73 bool ckh_iter(ckh_t *ckh, size_t *tabind, void **key, void **data); 74 bool ckh_insert(tsd_t *tsd, ckh_t *ckh, const void *key, const void *data); 75 bool ckh_remove(tsd_t *tsd, ckh_t *ckh, const void *searchkey, void **key, 77 bool ckh_search(ckh_t *ckh, const void *seachkey, void **key, void **data); 78 void ckh_string_hash(const void *key, size_t r_hash[2]); 80 void ckh_pointer_hash(const void *key, size_t r_hash[2]);
|
| H A D | hash.h | 22 uint32_t hash_x86_32(const void *key, int len, uint32_t seed); 23 void hash_x86_128(const void *key, const int len, uint32_t seed, 25 void hash_x64_128(const void *key, const int len, const uint32_t seed, 27 void hash(const void *key, size_t len, const uint32_t seed, 89 hash_x86_32(const void *key, int len, uint32_t seed) in hash_x86_32() argument 91 const uint8_t *data = (const uint8_t *) key; in hash_x86_32() 140 hash_x86_128(const void *key, const int len, uint32_t seed, in hash_x86_128() argument 143 const uint8_t * data = (const uint8_t *) key; in hash_x86_128() 245 const uint8_t *data = (const uint8_t *) key; in hash_x64_128() 325 hash_x64_128(key, len, seed, (uint64_t *)r_hash); in hash() [all …]
|
| /redis-3.2.3/tests/unit/type/ |
| H A D | incr.tcl | 2 test {INCR against non existing key} { 8 test {INCR against key created by incr itself} { 12 test {INCR against key originally set with SET} { 27 test {INCR fails against key with spaces (left)} { 33 test {INCR fails against key with spaces (right)} { 39 test {INCR fails against key with spaces (both)} { 45 test {INCR fails against a key holding a list} { 80 test {INCRBYFLOAT against non existing key} { 88 test {INCRBYFLOAT against key originally set with SET} { 103 test {INCRBYFLOAT fails against key with spaces (left)} { [all …]
|
| /redis-3.2.3/utils/ |
| H A D | speed-regression.tcl | 53 lassign [split $line ","] key value 54 set key [string tolower [string range $key 1 end-1]] 56 if {$key eq [string tolower $name]} { 66 lassign [split $line ","] key value 67 set key [string tolower [string range $key 1 end-1]] 68 lappend names $key
|
| /redis-3.2.3/tests/cluster/tests/ |
| H A D | 04-resharding.tcl | 88 set key "key:$listid" 95 $cluster rpush $key $ele 97 $cluster eval {redis.call("rpush",KEYS[1],ARGV[1])} 1 $key $ele 99 lappend content($key) $ele 117 foreach {key value} [array get content] { 118 assert {[$cluster lrange $key 0 -1] eq $value} 135 foreach {key value} [array get content] { 136 assert {[$cluster lrange $key 0 -1] eq $value}
|
| H A D | 10-manual-failover.tcl | 41 set key "key:$listid" 48 $cluster rpush $key $ele 50 $cluster eval {redis.call("rpush",KEYS[1],ARGV[1])} 1 $key $ele 52 lappend content($key) $ele 84 foreach {key value} [array get content] { 85 assert {[$cluster lrange $key 0 -1] eq $value}
|