70
70
counters.push_back(new drizzled::plugin::ListenCounter(new std::string("failed_connections"), &getCounters().failedConnections));
73
const std::string ListenMySQLProtocol::getHost(void) const
73
const std::string ListenMySQLProtocol::getHost() const
78
in_port_t ListenMySQLProtocol::getPort(void) const
78
in_port_t ListenMySQLProtocol::getPort() const
259
259
/* See comment above. */
260
260
/* Restore read timeout value */
261
drizzleclient_net_set_read_timeout(&net,
262
session->variables.net_read_timeout);
261
drizzleclient_net_set_read_timeout(&net, session->variables.net_read_timeout);
579
578
void ClientMySQLProtocol::store(int32_t from)
582
netStoreData(buff, (internal::int10_to_str(from, buff, -10) - buff));
581
netStoreData(buff, internal::int10_to_str(from, buff, -10) - buff);
585
584
void ClientMySQLProtocol::store(uint32_t from)
588
netStoreData(buff, (size_t) (internal::int10_to_str(from, buff, 10) - buff));
587
netStoreData(buff, internal::int10_to_str(from, buff, 10) - buff);
591
590
void ClientMySQLProtocol::store(int64_t from)
594
netStoreData(buff, (size_t) (internal::int64_t10_to_str(from, buff, -10) - buff));
593
netStoreData(buff, internal::int64_t10_to_str(from, buff, -10) - buff);
597
596
void ClientMySQLProtocol::store(uint64_t from)
600
netStoreData(buff, (size_t) (internal::int64_t10_to_str(from, buff, 10) - buff));
599
netStoreData(buff, internal::int64_t10_to_str(from, buff, 10) - buff);
603
602
void ClientMySQLProtocol::store(double from, uint32_t decimals, String *buffer)
695
694
packet.alloc(buffer_length.get());
697
696
client_capabilities= uint2korr(net.read_pos);
698
if (!(client_capabilities & CLIENT_PROTOCOL_MYSQL41))
697
if (not (client_capabilities & CLIENT_PROTOCOL_MYSQL41))
700
699
my_error(ER_HANDSHAKE_ERROR, MYF(0), user_identifier->address().c_str());
848
847
unsigned char *ClientMySQLProtocol::storeLength(unsigned char *buffer, uint64_t length)
850
if (length < (uint64_t) 251LL)
852
*buffer=(unsigned char) length;
851
*buffer= (unsigned char) length;
855
854
/* 251 is reserved for NULL */
856
if (length < (uint64_t) 65536LL)
859
int2store(buffer,(uint32_t) length);
858
int2store(buffer, (uint32_t) length);
862
if (length < (uint64_t) 16777216LL)
861
if (length < 16777216)
865
int3store(buffer,(uint32_t) length);
864
int3store(buffer, (uint32_t) length);
869
int8store(buffer,length);
868
int8store(buffer, length);