return 0;
}
+/*
+ From Andrei on IRC
+*/
+
+test_return user_supplied_bug19(memcached_st *memc)
+{
+ memcached_st *m;
+ memcached_server_st *s;
+ memcached_return res;
+
+ (void)memc;
+
+ m= memcached_create(NULL);
+ memcached_server_add_with_weight(m, "localhost", 11311, 100);
+ memcached_server_add_with_weight(m, "localhost", 11312, 100);
+
+ s= memcached_server_by_key(m, "a", 1, &res);
+ memcached_server_free(s);
+
+ memcached_free(m);
+}
+
#include "ketama_test_cases.h"
test_return user_supplied_bug18(memcached_st *memc)
{
{"user_supplied_bug16", 1, user_supplied_bug16 },
{"user_supplied_bug17", 1, user_supplied_bug17 },
// {"user_supplied_bug18", 1, user_supplied_bug18 },
+ {"user_supplied_bug19", 1, user_supplied_bug19 },
{0, 0, 0}
};
Error 30 -> A TIMEOUT OCCURRED
Error 31 -> ACTION QUEUED
Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE
+Error 0 -> SUCCESS
+Error 1 -> FAILURE
+Error 2 -> HOSTNAME LOOKUP FAILURE
+Error 3 -> CONNECTION FAILURE
+Error 4 -> CONNECTION BIND FAILURE
+Error 5 -> WRITE FAILURE
+Error 6 -> READ FAILURE
+Error 7 -> UNKNOWN READ FAILURE
+Error 8 -> PROTOCOL ERROR
+Error 9 -> CLIENT ERROR
+Error 10 -> SERVER ERROR
+Error 11 -> CONNECTION SOCKET CREATE FAILURE
+Error 12 -> CONNECTION DATA EXISTS
+Error 13 -> CONNECTION DATA DOES NOT EXIST
+Error 14 -> NOT STORED
+Error 15 -> STORED
+Error 16 -> NOT FOUND
+Error 17 -> MEMORY ALLOCATION FAILURE
+Error 18 -> PARTIAL READ
+Error 19 -> SOME ERRORS WERE REPORTED
+Error 20 -> NO SERVERS DEFINED
+Error 21 -> SERVER END
+Error 22 -> SERVER DELETE
+Error 23 -> SERVER VALUE
+Error 24 -> STAT VALUE
+Error 25 -> SYSTEM ERROR
+Error 26 -> COULD NOT OPEN UNIX SOCKET
+Error 27 -> ACTION NOT SUPPORTED
+Error 28 -> A KEY LENGTH OF ZERO WAS PROVIDED
+Error 29 -> FETCH WAS NOT COMPLETED
+Error 30 -> A TIMEOUT OCCURRED
+Error 31 -> ACTION QUEUED
+Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE
+Error 0 -> SUCCESS
+Error 1 -> FAILURE
+Error 2 -> HOSTNAME LOOKUP FAILURE
+Error 3 -> CONNECTION FAILURE
+Error 4 -> CONNECTION BIND FAILURE
+Error 5 -> WRITE FAILURE
+Error 6 -> READ FAILURE
+Error 7 -> UNKNOWN READ FAILURE
+Error 8 -> PROTOCOL ERROR
+Error 9 -> CLIENT ERROR
+Error 10 -> SERVER ERROR
+Error 11 -> CONNECTION SOCKET CREATE FAILURE
+Error 12 -> CONNECTION DATA EXISTS
+Error 13 -> CONNECTION DATA DOES NOT EXIST
+Error 14 -> NOT STORED
+Error 15 -> STORED
+Error 16 -> NOT FOUND
+Error 17 -> MEMORY ALLOCATION FAILURE
+Error 18 -> PARTIAL READ
+Error 19 -> SOME ERRORS WERE REPORTED
+Error 20 -> NO SERVERS DEFINED
+Error 21 -> SERVER END
+Error 22 -> SERVER DELETE
+Error 23 -> SERVER VALUE
+Error 24 -> STAT VALUE
+Error 25 -> SYSTEM ERROR
+Error 26 -> COULD NOT OPEN UNIX SOCKET
+Error 27 -> ACTION NOT SUPPORTED
+Error 28 -> A KEY LENGTH OF ZERO WAS PROVIDED
+Error 29 -> FETCH WAS NOT COMPLETED
+Error 30 -> A TIMEOUT OCCURRED
+Error 31 -> ACTION QUEUED
+Error 32 -> A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
-server 0|localhost|11221 bytes: 2805141
+server 0|localhost|11221 bytes: 1106784
-server 1|localhost|11222 bytes: 2033190
+server 1|localhost|11222 bytes: 965601
-server 2|localhost|11223 bytes: 1961432
+server 2|localhost|11223 bytes: 1307502
-server 3|localhost|11224 bytes: 2202898
+server 3|localhost|11224 bytes: 1240596
-server 4|localhost|11225 bytes: 1715263
+server 4|localhost|11225 bytes: 1049517
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|6666|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160
+ketama_weighted:localhost|11221|1|160
+ketama_weighted:localhost|11222|1|160
+ketama_weighted:localhost|11223|1|160
+ketama_weighted:localhost|11224|1|160
+ketama_weighted:localhost|11225|1|160