sh autogen.sh sh bootstrap.sh make && make install |
#!/bin/sh base=$(cd "$(dirname "$0")"; pwd) cd $base ./configure --with-mysql=/usr/local/mysql/bin/mysql_config --prefix=/usr/local/mysql-proxy CFLAGS="-s -O0" CPPFLAGS="-I/usr/local/mysql/include/" LDFLAGS="-lm -ldl -lcrypto -ljemalloc" LUA_CFLAGS="-I/usr/include/" LUA_LIBS="-L/usr/lib64 -llua" |
network-mysqld-packet.c: In function 'network_mysqld_auth_challenge_new': network-mysqld-packet.c:1470:9: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function) CLIENT_SECURE_CONNECTION | ^ network-mysqld-packet.c:1470:9: note: each undeclared identifier is reported only once for each function it appears in network-mysqld-packet.c: In function 'network_mysqld_proto_get_auth_challenge': network-mysqld-packet.c:1583:31: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function) if (shake->capabilities & CLIENT_SECURE_CONNECTION) { ^ network-mysqld-packet.c: In function 'network_mysqld_auth_response_new': network-mysqld-packet.c:1695:26: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function) auth->capabilities = CLIENT_SECURE_CONNECTION | CLIENT_PROTOCOL_41; ^ network-mysqld-packet.c: In function 'network_mysqld_proto_get_auth_response': network-mysqld-packet.c:1772:34: error: 'CLIENT_SECURE_CONNECTION' undeclared (first use in this function) if (auth->capabilities & CLIENT_SECURE_CONNECTION) { |
1467 shake->challenge = g_string_sized_new(20);
1468 shake->capabilities =
1469 CLIENT_PROTOCOL_41 |
1470 /* CLIENT_SECURE_CONNECTION | */
1471 CLIENT_RESERVED2 |
1472 0;
1584 if (shake->capabilities & /*CLIENT_SECURE_CONNECTION*/ CLIENT_RESERVED2) {
1585 err = network_mysqld_proto_get_string_len(packet, &scramble_2, 12);
1586 if (err != 0) {
1587 msg = "get auth challenge's 12-bytes challenge random number failed";
1588 goto funcexit;
1589 }
1590 }
|
1685 network_mysqld_auth_response *network_mysqld_auth_response_new() {
1686 network_mysqld_auth_response *auth;
1687
1688 auth = g_new0(network_mysqld_auth_response, 1);
1689
1690 /* we have to make sure scramble->buf is not-NULL to get
1691 * the "empty string" and not a "NULL-string"
1692 */
1693 auth->response = g_string_new("");
1694 auth->username = g_string_new("");
1695 auth->database = g_string_new("");
1696 auth->capabilities = /*CLIENT_SECURE_CONNECTION*/CLIENT_RESERVED2 | CLIENT_PROTOCOL_41;
1697
1698 return auth;
1699 }
|
1773
1773 if (auth->capabilities & CLIENT_RESERVED2 /*CLIENT_SECURE_CONNECTION*/) {
1774 err = network_mysqld_proto_get_lenenc_gstring(packet, auth->response);
1775 if (err != 0) {
1776 msg = "get auth response failed with CLIENT_RESERVED2";
1777 goto fun_exit;
1778 }
1779 } else {
1780 err = network_mysqld_proto_get_gstring(packet, auth->response);
1781 if (err != 0) {
1782 msg = "get auth response failed without CLIENT_RESERVED2";
1783 goto fun_exit;
1784 }
1785 }
|
208 NETWORK_MYSQLD_PLUGIN_PROTO(server_con_init) {
209 network_mysqld_auth_challenge *challenge;
210 GString *packet;
211
212 challenge = network_mysqld_auth_challenge_new();
213 challenge->server_version_str = g_strdup("5.0.99-agent-admin");
214 challenge->server_version = 50099;
215 challenge->charset = 0x08; /* latin1 */
216 challenge->capabilities = CLIENT_PROTOCOL_41 | /*CLIENT_SECURE_CONNECTION*/ CLIENT_RESERVED2 | CLIENT_LONG_PASSWORD;
217 challenge->server_status = SERVER_STATUS_AUTOCOMMIT;
218 challenge->thread_id
= 1;
219
|
285 g_assert((con->client->response->capabilities
286 & (CLIENT_COMPRESS | CLIENT_PLUGIN_AUTH)) == 0);
287
288 g_assert((con->client->response->capabilities
289 & (CLIENT_PROTOCOL_41 | CLIENT_RESERVED2 /*CLIENT_SECURE_CONNECTION*/)) != 0);
290
|
1107 if (!(auth->capabilities & CLIENT_RESERVED2 /*CLIENT_SECURE_CONNECTION*/)) {
1108 gchar *msg = "Old Password Authentication is not supported";
1109 CON_MSG_HANDLE(g_warning, con, msg);
1110 SEND_INTERNAL_ERR(msg);
1111 network_mysqld_auth_response_free(auth);
1112 return NETWORK_SOCKET_ERROR;
1113
}
|
48 // 不支持CLIENT_CONNECT_ATTRS
49 #define MYSQL_PROTOCOL_CAPABILITIES (CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB | \
50 CLIENT_PROTOCOL_41 | CLIENT_TRANSACTIONS | CLIENT_RESERVED2 /*CLIENT_SECURE_CONNECTION*/)
51
|