2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
23 } ketama_test_cases[99] = {
24 {"SVa_]_V41)", 443691461UL, 445379617UL, "10.0.1.7"},
25 {"*/Z;?V(.\\8", 1422915503UL, 1428303028UL, "10.0.1.1"},
26 {"30C1*Z*S/_", 1473165754UL, 1480075959UL, "10.0.1.2"},
27 {"ERR:EC58G>", 2148406511UL, 2168579133UL, "10.0.1.7"},
28 {"1I=cTMNTKF", 2882686667UL, 2885206587UL, "10.0.1.5"},
29 {"]VG<`I*Z8)", 1103544263UL, 1104827657UL, "10.0.1.5"},
30 {"UUTC`-V159", 3716288206UL, 3727224240UL, "10.0.1.5"},
31 {"@7RU6C6T+Z", 3862737685UL, 3871917949UL, "10.0.1.5"},
32 {"/XLN0@+36;", 1623269830UL, 1627683651UL, "10.0.1.1"},
33 {"4(`X;\\V.^c", 373546328UL, 383925769UL, "10.0.1.1"},
34 {"726bW=9*a4", 4213440020UL, 4213950705UL, "10.0.1.7"},
35 {"\\`)<B)UE,c", 951096736UL, 955226069UL, "10.0.1.1"},
36 {"P1[Ma3=K1/", 1989324036UL, 1994028240UL, "10.0.1.8"},
37 {"C89I.-V?cT", 1604239957UL, 1606398093UL, "10.0.1.8"},
38 {"D[HE+cFXDK", 2117036136UL, 2117124014UL, "10.0.1.3"},
39 {"P1L?NAB[)K", 2129972569UL, 2132542634UL, "10.0.1.1"},
40 {"cDT0)Z5P6,", 176485284UL, 178675413UL, "10.0.1.5"},
41 {"@JW`+[WAO8", 2720940826UL, 2743975456UL, "10.0.1.5"},
42 {"\\39DKW^)N_", 3548879868UL, 3550704865UL, "10.0.1.3"},
43 {"EM75N0+[X1", 1558531507UL, 1559308507UL, "10.0.1.4"},
44 {"`,SS]NBP,b", 1883545960UL, 1884847278UL, "10.0.1.1"},
45 {"XX1a9LT+F?", 653487707UL, 656410408UL, "10.0.1.5"},
46 {"Zc\\-,F-c6V", 1160802451UL, 1171575728UL, "10.0.1.5"},
47 {"1*RTMC7,03", 1602398012UL, 1606398093UL, "10.0.1.8"},
48 {"*Xc+V0P>32", 536016577UL, 539988520UL, "10.0.1.7"},
49 {"U))Fb-(`,.", 4128682289UL, 4136854163UL, "10.0.1.7"},
50 {"R-08RNTaRT", 3718170086UL, 3727224240UL, "10.0.1.5"},
51 {"(LHcO203I3", 1007779411UL, 1014643570UL, "10.0.1.5"},
52 {"=256P+;Qc8", 3976201210UL, 3976304873UL, "10.0.1.5"},
53 {"OI5XZ_BBT(", 2155922164UL, 2168579133UL, "10.0.1.7"},
54 {"2TLRL/UL;:", 1086800909UL, 1095659802UL, "10.0.1.7"},
55 {"WHD\\O1`ZRW", 3087923411UL, 3095471560UL, "10.0.1.5"},
56 {".=54)_c;=T", 2497691631UL, 2502731301UL, "10.0.1.1"},
57 {";G<W-XWZ@b", 2888169733UL, 2888728739UL, "10.0.1.5"},
58 {"(,>E`)FT\\4", 580747448UL, 581063326UL, "10.0.1.2"},
59 {"HZAU*;P*N]", 2564670474UL, 2565697267UL, "10.0.1.7"},
60 {"NZ@ZE=O84_", 533335275UL, 539988520UL, "10.0.1.7"},
61 {"6,cEI`F_P>", 3972869246UL, 3974773167UL, "10.0.1.6"},
62 {"c,5AQ/T5)6", 2835605783UL, 2847870057UL, "10.0.1.8"},
63 {".O,>>BT)RX", 3857978174UL, 3871917949UL, "10.0.1.5"},
64 {"XY\\X::LX50", 1749241099UL, 1752196488UL, "10.0.1.6"},
65 {"+550F^/.01", 3781824099UL, 3783248219UL, "10.0.1.6"},
66 {"<.X9E2S5+9", 3232479481UL, 3234387706UL, "10.0.1.7"},
67 {"]\\.UH8_0a1", 2419699252UL, 2423002920UL, "10.0.1.4"},
68 {"8(6=(T0/Z0", 728266737UL, 729026070UL, "10.0.1.7"},
69 {"8*6a;Sc*X+", 4223431086UL, 4230156966UL, "10.0.1.2"},
70 {"<QW:;3K6;H", 2731158143UL, 2743975456UL, "10.0.1.5"},
71 {"7C@EY@-Y?_", 760770733UL, 761576669UL, "10.0.1.5"},
72 {"aPb3E1WD4K", 2500489218UL, 2502731301UL, "10.0.1.1"},
73 {"?@12R<=1BH", 1494795329UL, 1502505505UL, "10.0.1.8"},
74 {"QR(a+Q=1FU", 3238535074UL, 3238996435UL, "10.0.1.6"},
75 {"`C9^FV,960", 2628553463UL, 2628733766UL, "10.0.1.6"},
76 {"UNHVP..^8H", 977096483UL, 977319837UL, "10.0.1.4"},
77 {":Y.2W2[(35", 2777083668UL, 2784182515UL, "10.0.1.7"},
78 {"M/HV^_HZ4O", 3623390946UL, 3624445007UL, "10.0.1.7"},
79 {"ZY16KQ<ICD", 1831153193UL, 1838563516UL, "10.0.1.4"},
80 {"bV2,`a.PY9", 1962228869UL, 1962648654UL, "10.0.1.1"},
81 {"U;9:-+5N]9", 269504649UL, 277560877UL, "10.0.1.1"},
82 {"1S/:aJ[1(;", 578069729UL, 581063326UL, "10.0.1.2"},
83 {"Nb-X^]M)I:", 330865696UL, 331009896UL, "10.0.1.6"},
84 {"2;M;ES>J5/", 2776949824UL, 2784182515UL, "10.0.1.7"},
85 {"[>RZHG97Q9", 71954686UL, 72034069UL, "10.0.1.6"},
86 {"J3/G[)9<^Z", 2799896459UL, 2805183696UL, "10.0.1.7"},
87 {"N-)88>[O`,", 50404102UL, 51792557UL, "10.0.1.5"},
88 {"NP:=FR\\OaA", 3837333776UL, 3837792034UL, "10.0.1.7"},
89 {"`@L+W;a,O[", 1512157148UL, 1522285852UL, "10.0.1.6"},
90 {"W2`P:-+1T[", 2945171975UL, 2946196424UL, "10.0.1.5"},
91 {"-6G7K^YDIN", 3168617340UL, 3170513015UL, "10.0.1.7"},
92 {"U>*>9ZI6V5", 668514946UL, 674097631UL, "10.0.1.6"},
93 {".I?^6Ic9RK", 938419020UL, 942832691UL, "10.0.1.6"},
94 {"0OZH^9BKM[", 3682518606UL, 3686781297UL, "10.0.1.8"},
95 {"5?50UGZ:ML", 868610882UL, 869425986UL, "10.0.1.5"},
96 {"?K2NF@3=IU", 381218851UL, 383925769UL, "10.0.1.1"},
97 {"YI@G-2X?UB", 3688706179UL, 3693197681UL, "10.0.1.5"},
98 {"7cY</BSaL=", 3976870223UL, 3978903843UL, "10.0.1.6"},
99 {"A(`KF:[RH8", 3292979676UL, 3294849139UL, "10.0.1.6"},
100 {";=ZT\\W^P+H", 1401102653UL, 1416290674UL, "10.0.1.4"},
101 {"b2?WFF56;R", 480494704UL, 486971192UL, "10.0.1.4"},
102 {"CTR74,J+N.", 137446045UL, 146633907UL, "10.0.1.8"},
103 {"<b;*R+QDST", 1304985302UL, 1308223778UL, "10.0.1.5"},
104 {"\\R^7=9UCG`", 126218373UL, 129199837UL, "10.0.1.5"},
105 {"1bQS5]WOXB", 1853470245UL, 1855329369UL, "10.0.1.4"},
106 {"M(@X^b[L:K", 3019630308UL, 3022260113UL, "10.0.1.1"},
107 {"431cBF8,YO", 1679726993UL, 1685224295UL, "10.0.1.7"},
108 {"(bEIQJ:E./", 2922607787UL, 2925521819UL, "10.0.1.6"},
109 {"WS/3H*)7F;", 419488232UL, 422140585UL, "10.0.1.5"},
110 {"ZJF[Ia6Q)+", 3960568056UL, 3962489998UL, "10.0.1.7"},
111 {"<]*QCK8U,>", 2590140172UL, 2598117636UL, "10.0.1.7"},
112 {"\\[a\\^=V_M0", 689410119UL, 698690782UL, "10.0.1.6"},
113 {"7;RM+8J9YC", 1530175299UL, 1531107082UL, "10.0.1.7"},
114 {"4*=.SPR[AV", 3928582722UL, 3928853792UL, "10.0.1.1"},
115 {"-2F+^88P4U", 3023552752UL, 3025823613UL, "10.0.1.7"},
116 {"X;-F`(N?9D", 570465234UL, 572485994UL, "10.0.1.7"},
117 {"R=F_D-K2a]", 1287750228UL, 1290935562UL, "10.0.1.7"},
118 {"X*+2aaC.EG", 3200948713UL, 3201088518UL, "10.0.1.5"},
119 {"[1ZXONX2]a", 4108881567UL, 4109865744UL, "10.0.1.4"},
120 {"FL;\\GWacaV", 458449508UL, 467374054UL, "10.0.1.4"},
121 {"\\MQ_XNT7L-", 1259349383UL, 1259509450UL, "10.0.1.7"},
122 {"VD6D0]ba_\\", 3842502950UL, 3842588691UL, "10.0.1.1"},
130 } ketama_test_cases_spy[99] = {
131 {"SVa_]_V41)", 443691461UL, 445379617UL, "10.0.1.2"},
132 {"*/Z;?V(.\\8", 1422915503UL, 1428303028UL, "10.0.1.4"},
133 {"30C1*Z*S/_", 1473165754UL, 1480075959UL, "10.0.1.2"},
134 {"ERR:EC58G>", 2148406511UL, 2168579133UL, "10.0.1.7"},
135 {"1I=cTMNTKF", 2882686667UL, 2885206587UL, "10.0.1.4"},
136 {"]VG<`I*Z8)", 1103544263UL, 1104827657UL, "10.0.1.5"},
137 {"UUTC`-V159", 3716288206UL, 3727224240UL, "10.0.1.7"},
138 {"@7RU6C6T+Z", 3862737685UL, 3871917949UL, "10.0.1.6"},
139 {"/XLN0@+36;", 1623269830UL, 1627683651UL, "10.0.1.7"},
140 {"4(`X;\\V.^c", 373546328UL, 383925769UL, "10.0.1.6"},
141 {"726bW=9*a4", 4213440020UL, 4213950705UL, "10.0.1.3"},
142 {"\\`)<B)UE,c", 951096736UL, 955226069UL, "10.0.1.8"},
143 {"P1[Ma3=K1/", 1989324036UL, 1994028240UL, "10.0.1.1"},
144 {"C89I.-V?cT", 1604239957UL, 1606398093UL, "10.0.1.5"},
145 {"D[HE+cFXDK", 2117036136UL, 2117124014UL, "10.0.1.5"},
146 {"P1L?NAB[)K", 2129972569UL, 2132542634UL, "10.0.1.7"},
147 {"cDT0)Z5P6,", 176485284UL, 178675413UL, "10.0.1.1"},
148 {"@JW`+[WAO8", 2720940826UL, 2743975456UL, "10.0.1.2"},
149 {"\\39DKW^)N_", 3548879868UL, 3550704865UL, "10.0.1.6"},
150 {"EM75N0+[X1", 1558531507UL, 1559308507UL, "10.0.1.5"},
151 {"`,SS]NBP,b", 1883545960UL, 1884847278UL, "10.0.1.1"},
152 {"XX1a9LT+F?", 653487707UL, 656410408UL, "10.0.1.6"},
153 {"Zc\\-,F-c6V", 1160802451UL, 1171575728UL, "10.0.1.6"},
154 {"1*RTMC7,03", 1602398012UL, 1606398093UL, "10.0.1.5"},
155 {"*Xc+V0P>32", 536016577UL, 539988520UL, "10.0.1.7"},
156 {"U))Fb-(`,.", 4128682289UL, 4136854163UL, "10.0.1.7"},
157 {"R-08RNTaRT", 3718170086UL, 3727224240UL, "10.0.1.5"},
158 {"(LHcO203I3", 1007779411UL, 1014643570UL, "10.0.1.1"},
159 {"=256P+;Qc8", 3976201210UL, 3976304873UL, "10.0.1.3"},
160 {"OI5XZ_BBT(", 2155922164UL, 2168579133UL, "10.0.1.5"},
161 {"2TLRL/UL;:", 1086800909UL, 1095659802UL, "10.0.1.2"},
162 {"WHD\\O1`ZRW", 3087923411UL, 3095471560UL, "10.0.1.1"},
163 {".=54)_c;=T", 2497691631UL, 2502731301UL, "10.0.1.6"},
164 {";G<W-XWZ@b", 2888169733UL, 2888728739UL, "10.0.1.7"},
165 {"(,>E`)FT\\4", 580747448UL, 581063326UL, "10.0.1.5"},
166 {"HZAU*;P*N]", 2564670474UL, 2565697267UL, "10.0.1.1"},
167 {"NZ@ZE=O84_", 533335275UL, 539988520UL, "10.0.1.7"},
168 {"6,cEI`F_P>", 3972869246UL, 3974773167UL, "10.0.1.3"},
169 {"c,5AQ/T5)6", 2835605783UL, 2847870057UL, "10.0.1.7"},
170 {".O,>>BT)RX", 3857978174UL, 3871917949UL, "10.0.1.7"},
171 {"XY\\X::LX50", 1749241099UL, 1752196488UL, "10.0.1.7"},
172 {"+550F^/.01", 3781824099UL, 3783248219UL, "10.0.1.2"},
173 {"<.X9E2S5+9", 3232479481UL, 3234387706UL, "10.0.1.7"},
174 {"]\\.UH8_0a1", 2419699252UL, 2423002920UL, "10.0.1.6"},
175 {"8(6=(T0/Z0", 728266737UL, 729026070UL, "10.0.1.6"},
176 {"8*6a;Sc*X+", 4223431086UL, 4230156966UL, "10.0.1.5"},
177 {"<QW:;3K6;H", 2731158143UL, 2743975456UL, "10.0.1.7"},
178 {"7C@EY@-Y?_", 760770733UL, 761576669UL, "10.0.1.5"},
179 {"aPb3E1WD4K", 2500489218UL, 2502731301UL, "10.0.1.2"},
180 {"?@12R<=1BH", 1494795329UL, 1502505505UL, "10.0.1.1"},
181 {"QR(a+Q=1FU", 3238535074UL, 3238996435UL, "10.0.1.5"},
182 {"`C9^FV,960", 2628553463UL, 2628733766UL, "10.0.1.3"},
183 {"UNHVP..^8H", 977096483UL, 977319837UL, "10.0.1.6"},
184 {":Y.2W2[(35", 2777083668UL, 2784182515UL, "10.0.1.6"},
185 {"M/HV^_HZ4O", 3623390946UL, 3624445007UL, "10.0.1.4"},
186 {"ZY16KQ<ICD", 1831153193UL, 1838563516UL, "10.0.1.7"},
187 {"bV2,`a.PY9", 1962228869UL, 1962648654UL, "10.0.1.7"},
188 {"U;9:-+5N]9", 269504649UL, 277560877UL, "10.0.1.2"},
189 {"1S/:aJ[1(;", 578069729UL, 581063326UL, "10.0.1.5"},
190 {"Nb-X^]M)I:", 330865696UL, 331009896UL, "10.0.1.3"},
191 {"2;M;ES>J5/", 2776949824UL, 2784182515UL, "10.0.1.6"},
192 {"[>RZHG97Q9", 71954686UL, 72034069UL, "10.0.1.4"},
193 {"J3/G[)9<^Z", 2799896459UL, 2805183696UL, "10.0.1.6"},
194 {"N-)88>[O`,", 50404102UL, 51792557UL, "10.0.1.2"},
195 {"NP:=FR\\OaA", 3837333776UL, 3837792034UL, "10.0.1.7"},
196 {"`@L+W;a,O[", 1512157148UL, 1522285852UL, "10.0.1.5"},
197 {"W2`P:-+1T[", 2945171975UL, 2946196424UL, "10.0.1.7"},
198 {"-6G7K^YDIN", 3168617340UL, 3170513015UL, "10.0.1.5"},
199 {"U>*>9ZI6V5", 668514946UL, 674097631UL, "10.0.1.5"},
200 {".I?^6Ic9RK", 938419020UL, 942832691UL, "10.0.1.6"},
201 {"0OZH^9BKM[", 3682518606UL, 3686781297UL, "10.0.1.2"},
202 {"5?50UGZ:ML", 868610882UL, 869425986UL, "10.0.1.6"},
203 {"?K2NF@3=IU", 381218851UL, 383925769UL, "10.0.1.6"},
204 {"YI@G-2X?UB", 3688706179UL, 3693197681UL, "10.0.1.6"},
205 {"7cY</BSaL=", 3976870223UL, 3978903843UL, "10.0.1.7"},
206 {"A(`KF:[RH8", 3292979676UL, 3294849139UL, "10.0.1.6"},
207 {";=ZT\\W^P+H", 1401102653UL, 1416290674UL, "10.0.1.6"},
208 {"b2?WFF56;R", 480494704UL, 486971192UL, "10.0.1.7"},
209 {"CTR74,J+N.", 137446045UL, 146633907UL, "10.0.1.7"},
210 {"<b;*R+QDST", 1304985302UL, 1308223778UL, "10.0.1.5"},
211 {"\\R^7=9UCG`", 126218373UL, 129199837UL, "10.0.1.6"},
212 {"1bQS5]WOXB", 1853470245UL, 1855329369UL, "10.0.1.7"},
213 {"M(@X^b[L:K", 3019630308UL, 3022260113UL, "10.0.1.4"},
214 {"431cBF8,YO", 1679726993UL, 1685224295UL, "10.0.1.1"},
215 {"(bEIQJ:E./", 2922607787UL, 2925521819UL, "10.0.1.7"},
216 {"WS/3H*)7F;", 419488232UL, 422140585UL, "10.0.1.3"},
217 {"ZJF[Ia6Q)+", 3960568056UL, 3962489998UL, "10.0.1.5"},
218 {"<]*QCK8U,>", 2590140172UL, 2598117636UL, "10.0.1.5"},
219 {"\\[a\\^=V_M0", 689410119UL, 698690782UL, "10.0.1.7"},
220 {"7;RM+8J9YC", 1530175299UL, 1531107082UL, "10.0.1.7"},
221 {"4*=.SPR[AV", 3928582722UL, 3928853792UL, "10.0.1.3"},
222 {"-2F+^88P4U", 3023552752UL, 3025823613UL, "10.0.1.7"},
223 {"X;-F`(N?9D", 570465234UL, 572485994UL, "10.0.1.5"},
224 {"R=F_D-K2a]", 1287750228UL, 1290935562UL, "10.0.1.1"},
225 {"X*+2aaC.EG", 3200948713UL, 3201088518UL, "10.0.1.3"},
226 {"[1ZXONX2]a", 4108881567UL, 4109865744UL, "10.0.1.7"},
227 {"FL;\\GWacaV", 458449508UL, 467374054UL, "10.0.1.7"},
228 {"\\MQ_XNT7L-", 1259349383UL, 1259509450UL, "10.0.1.5"},
229 {"VD6D0]ba_\\", 3842502950UL, 3842588691UL, "10.0.1.7"},