mirror of https://github.com/sysown/proxysql
parent
7830689dd9
commit
ba7993ee69
@ -1,33 +0,0 @@
|
||||
Copyright 2008, Google Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Code generated by the Protocol Buffer compiler is owned by the owner
|
||||
of the input file used when generating it. This code is not
|
||||
standalone and requires a support library to be linked with it. This
|
||||
support library is itself covered by the above license.
|
||||
@ -1 +0,0 @@
|
||||
protobuf-2.6.1
|
||||
Binary file not shown.
@ -1,767 +0,0 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: mysql_logger.proto
|
||||
|
||||
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
||||
#include "mysql_logger.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/stubs/once.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/wire_format_lite_inl.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace mysql_logger {
|
||||
|
||||
namespace {
|
||||
|
||||
const ::google::protobuf::Descriptor* event_descriptor_ = NULL;
|
||||
const ::google::protobuf::internal::GeneratedMessageReflection*
|
||||
event_reflection_ = NULL;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
void protobuf_AssignDesc_mysql_5flogger_2eproto() {
|
||||
protobuf_AddDesc_mysql_5flogger_2eproto();
|
||||
const ::google::protobuf::FileDescriptor* file =
|
||||
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
|
||||
"mysql_logger.proto");
|
||||
GOOGLE_CHECK(file != NULL);
|
||||
event_descriptor_ = file->message_type(0);
|
||||
static const int event_offsets_[9] = {
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, thread_id_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, username_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, schemaname_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, start_time_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, end_time_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, query_digest_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, query_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, server_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, client_),
|
||||
};
|
||||
event_reflection_ =
|
||||
new ::google::protobuf::internal::GeneratedMessageReflection(
|
||||
event_descriptor_,
|
||||
event::default_instance_,
|
||||
event_offsets_,
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, _has_bits_[0]),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, _unknown_fields_),
|
||||
-1,
|
||||
::google::protobuf::DescriptorPool::generated_pool(),
|
||||
::google::protobuf::MessageFactory::generated_factory(),
|
||||
sizeof(event));
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
|
||||
inline void protobuf_AssignDescriptorsOnce() {
|
||||
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
|
||||
&protobuf_AssignDesc_mysql_5flogger_2eproto);
|
||||
}
|
||||
|
||||
void protobuf_RegisterTypes(const ::std::string&) {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
||||
event_descriptor_, &event::default_instance());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void protobuf_ShutdownFile_mysql_5flogger_2eproto() {
|
||||
delete event::default_instance_;
|
||||
delete event_reflection_;
|
||||
}
|
||||
|
||||
void protobuf_AddDesc_mysql_5flogger_2eproto() {
|
||||
static bool already_here = false;
|
||||
if (already_here) return;
|
||||
already_here = true;
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
||||
"\n\022mysql_logger.proto\022\014mysql_logger\"\253\001\n\005e"
|
||||
"vent\022\021\n\tthread_id\030\001 \002(\r\022\020\n\010username\030\002 \002("
|
||||
"\t\022\022\n\nschemaname\030\003 \002(\t\022\022\n\nstart_time\030\004 \002("
|
||||
"\004\022\020\n\010end_time\030\005 \002(\004\022\024\n\014query_digest\030\006 \001("
|
||||
"\004\022\r\n\005query\030\007 \002(\t\022\016\n\006server\030\010 \001(\t\022\016\n\006clie"
|
||||
"nt\030\t \001(\t", 208);
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
||||
"mysql_logger.proto", &protobuf_RegisterTypes);
|
||||
event::default_instance_ = new event();
|
||||
event::default_instance_->InitAsDefaultInstance();
|
||||
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_mysql_5flogger_2eproto);
|
||||
}
|
||||
|
||||
// Force AddDescriptors() to be called at static initialization time.
|
||||
struct StaticDescriptorInitializer_mysql_5flogger_2eproto {
|
||||
StaticDescriptorInitializer_mysql_5flogger_2eproto() {
|
||||
protobuf_AddDesc_mysql_5flogger_2eproto();
|
||||
}
|
||||
} static_descriptor_initializer_mysql_5flogger_2eproto_;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
const int event::kThreadIdFieldNumber;
|
||||
const int event::kUsernameFieldNumber;
|
||||
const int event::kSchemanameFieldNumber;
|
||||
const int event::kStartTimeFieldNumber;
|
||||
const int event::kEndTimeFieldNumber;
|
||||
const int event::kQueryDigestFieldNumber;
|
||||
const int event::kQueryFieldNumber;
|
||||
const int event::kServerFieldNumber;
|
||||
const int event::kClientFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
|
||||
event::event()
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
// @@protoc_insertion_point(constructor:mysql_logger.event)
|
||||
}
|
||||
|
||||
void event::InitAsDefaultInstance() {
|
||||
}
|
||||
|
||||
event::event(const event& from)
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
MergeFrom(from);
|
||||
// @@protoc_insertion_point(copy_constructor:mysql_logger.event)
|
||||
}
|
||||
|
||||
void event::SharedCtor() {
|
||||
::google::protobuf::internal::GetEmptyString();
|
||||
_cached_size_ = 0;
|
||||
thread_id_ = 0u;
|
||||
username_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
schemaname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
start_time_ = GOOGLE_ULONGLONG(0);
|
||||
end_time_ = GOOGLE_ULONGLONG(0);
|
||||
query_digest_ = GOOGLE_ULONGLONG(0);
|
||||
query_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
server_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
client_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
}
|
||||
|
||||
event::~event() {
|
||||
// @@protoc_insertion_point(destructor:mysql_logger.event)
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void event::SharedDtor() {
|
||||
if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete username_;
|
||||
}
|
||||
if (schemaname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete schemaname_;
|
||||
}
|
||||
if (query_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete query_;
|
||||
}
|
||||
if (server_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete server_;
|
||||
}
|
||||
if (client_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete client_;
|
||||
}
|
||||
if (this != default_instance_) {
|
||||
}
|
||||
}
|
||||
|
||||
void event::SetCachedSize(int size) const {
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
}
|
||||
const ::google::protobuf::Descriptor* event::descriptor() {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
return event_descriptor_;
|
||||
}
|
||||
|
||||
const event& event::default_instance() {
|
||||
if (default_instance_ == NULL) protobuf_AddDesc_mysql_5flogger_2eproto();
|
||||
return *default_instance_;
|
||||
}
|
||||
|
||||
event* event::default_instance_ = NULL;
|
||||
|
||||
event* event::New() const {
|
||||
return new event;
|
||||
}
|
||||
|
||||
void event::Clear() {
|
||||
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
|
||||
&reinterpret_cast<event*>(16)->f) - \
|
||||
reinterpret_cast<char*>(16))
|
||||
|
||||
#define ZR_(first, last) do { \
|
||||
size_t f = OFFSET_OF_FIELD_(first); \
|
||||
size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
|
||||
::memset(&first, 0, n); \
|
||||
} while (0)
|
||||
|
||||
if (_has_bits_[0 / 32] & 255) {
|
||||
ZR_(start_time_, query_digest_);
|
||||
thread_id_ = 0u;
|
||||
if (has_username()) {
|
||||
if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
username_->clear();
|
||||
}
|
||||
}
|
||||
if (has_schemaname()) {
|
||||
if (schemaname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
schemaname_->clear();
|
||||
}
|
||||
}
|
||||
if (has_query()) {
|
||||
if (query_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
query_->clear();
|
||||
}
|
||||
}
|
||||
if (has_server()) {
|
||||
if (server_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
server_->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (has_client()) {
|
||||
if (client_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
client_->clear();
|
||||
}
|
||||
}
|
||||
|
||||
#undef OFFSET_OF_FIELD_
|
||||
#undef ZR_
|
||||
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
mutable_unknown_fields()->Clear();
|
||||
}
|
||||
|
||||
bool event::MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
|
||||
::google::protobuf::uint32 tag;
|
||||
// @@protoc_insertion_point(parse_start:mysql_logger.event)
|
||||
for (;;) {
|
||||
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
|
||||
tag = p.first;
|
||||
if (!p.second) goto handle_unusual;
|
||||
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// required uint32 thread_id = 1;
|
||||
case 1: {
|
||||
if (tag == 8) {
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
|
||||
input, &thread_id_)));
|
||||
set_has_thread_id();
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(18)) goto parse_username;
|
||||
break;
|
||||
}
|
||||
|
||||
// required string username = 2;
|
||||
case 2: {
|
||||
if (tag == 18) {
|
||||
parse_username:
|
||||
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_username()));
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->username().data(), this->username().length(),
|
||||
::google::protobuf::internal::WireFormat::PARSE,
|
||||
"username");
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(26)) goto parse_schemaname;
|
||||
break;
|
||||
}
|
||||
|
||||
// required string schemaname = 3;
|
||||
case 3: {
|
||||
if (tag == 26) {
|
||||
parse_schemaname:
|
||||
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_schemaname()));
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->schemaname().data(), this->schemaname().length(),
|
||||
::google::protobuf::internal::WireFormat::PARSE,
|
||||
"schemaname");
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(32)) goto parse_start_time;
|
||||
break;
|
||||
}
|
||||
|
||||
// required uint64 start_time = 4;
|
||||
case 4: {
|
||||
if (tag == 32) {
|
||||
parse_start_time:
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
||||
input, &start_time_)));
|
||||
set_has_start_time();
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(40)) goto parse_end_time;
|
||||
break;
|
||||
}
|
||||
|
||||
// required uint64 end_time = 5;
|
||||
case 5: {
|
||||
if (tag == 40) {
|
||||
parse_end_time:
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
||||
input, &end_time_)));
|
||||
set_has_end_time();
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(48)) goto parse_query_digest;
|
||||
break;
|
||||
}
|
||||
|
||||
// optional uint64 query_digest = 6;
|
||||
case 6: {
|
||||
if (tag == 48) {
|
||||
parse_query_digest:
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
||||
input, &query_digest_)));
|
||||
set_has_query_digest();
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(58)) goto parse_query;
|
||||
break;
|
||||
}
|
||||
|
||||
// required string query = 7;
|
||||
case 7: {
|
||||
if (tag == 58) {
|
||||
parse_query:
|
||||
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_query()));
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->query().data(), this->query().length(),
|
||||
::google::protobuf::internal::WireFormat::PARSE,
|
||||
"query");
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(66)) goto parse_server;
|
||||
break;
|
||||
}
|
||||
|
||||
// optional string server = 8;
|
||||
case 8: {
|
||||
if (tag == 66) {
|
||||
parse_server:
|
||||
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_server()));
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->server().data(), this->server().length(),
|
||||
::google::protobuf::internal::WireFormat::PARSE,
|
||||
"server");
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectTag(74)) goto parse_client;
|
||||
break;
|
||||
}
|
||||
|
||||
// optional string client = 9;
|
||||
case 9: {
|
||||
if (tag == 74) {
|
||||
parse_client:
|
||||
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
||||
input, this->mutable_client()));
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->client().data(), this->client().length(),
|
||||
::google::protobuf::internal::WireFormat::PARSE,
|
||||
"client");
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
if (input->ExpectAtEnd()) goto success;
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0 ||
|
||||
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
||||
goto success;
|
||||
}
|
||||
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
||||
input, tag, mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
success:
|
||||
// @@protoc_insertion_point(parse_success:mysql_logger.event)
|
||||
return true;
|
||||
failure:
|
||||
// @@protoc_insertion_point(parse_failure:mysql_logger.event)
|
||||
return false;
|
||||
#undef DO_
|
||||
}
|
||||
|
||||
void event::SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const {
|
||||
// @@protoc_insertion_point(serialize_start:mysql_logger.event)
|
||||
// required uint32 thread_id = 1;
|
||||
if (has_thread_id()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->thread_id(), output);
|
||||
}
|
||||
|
||||
// required string username = 2;
|
||||
if (has_username()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->username().data(), this->username().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"username");
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
2, this->username(), output);
|
||||
}
|
||||
|
||||
// required string schemaname = 3;
|
||||
if (has_schemaname()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->schemaname().data(), this->schemaname().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"schemaname");
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
3, this->schemaname(), output);
|
||||
}
|
||||
|
||||
// required uint64 start_time = 4;
|
||||
if (has_start_time()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->start_time(), output);
|
||||
}
|
||||
|
||||
// required uint64 end_time = 5;
|
||||
if (has_end_time()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteUInt64(5, this->end_time(), output);
|
||||
}
|
||||
|
||||
// optional uint64 query_digest = 6;
|
||||
if (has_query_digest()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->query_digest(), output);
|
||||
}
|
||||
|
||||
// required string query = 7;
|
||||
if (has_query()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->query().data(), this->query().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"query");
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
7, this->query(), output);
|
||||
}
|
||||
|
||||
// optional string server = 8;
|
||||
if (has_server()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->server().data(), this->server().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"server");
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
8, this->server(), output);
|
||||
}
|
||||
|
||||
// optional string client = 9;
|
||||
if (has_client()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->client().data(), this->client().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"client");
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
||||
9, this->client(), output);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
||||
unknown_fields(), output);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_end:mysql_logger.event)
|
||||
}
|
||||
|
||||
::google::protobuf::uint8* event::SerializeWithCachedSizesToArray(
|
||||
::google::protobuf::uint8* target) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:mysql_logger.event)
|
||||
// required uint32 thread_id = 1;
|
||||
if (has_thread_id()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->thread_id(), target);
|
||||
}
|
||||
|
||||
// required string username = 2;
|
||||
if (has_username()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->username().data(), this->username().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"username");
|
||||
target =
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
||||
2, this->username(), target);
|
||||
}
|
||||
|
||||
// required string schemaname = 3;
|
||||
if (has_schemaname()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->schemaname().data(), this->schemaname().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"schemaname");
|
||||
target =
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
||||
3, this->schemaname(), target);
|
||||
}
|
||||
|
||||
// required uint64 start_time = 4;
|
||||
if (has_start_time()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->start_time(), target);
|
||||
}
|
||||
|
||||
// required uint64 end_time = 5;
|
||||
if (has_end_time()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(5, this->end_time(), target);
|
||||
}
|
||||
|
||||
// optional uint64 query_digest = 6;
|
||||
if (has_query_digest()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->query_digest(), target);
|
||||
}
|
||||
|
||||
// required string query = 7;
|
||||
if (has_query()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->query().data(), this->query().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"query");
|
||||
target =
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
||||
7, this->query(), target);
|
||||
}
|
||||
|
||||
// optional string server = 8;
|
||||
if (has_server()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->server().data(), this->server().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"server");
|
||||
target =
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
||||
8, this->server(), target);
|
||||
}
|
||||
|
||||
// optional string client = 9;
|
||||
if (has_client()) {
|
||||
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
|
||||
this->client().data(), this->client().length(),
|
||||
::google::protobuf::internal::WireFormat::SERIALIZE,
|
||||
"client");
|
||||
target =
|
||||
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
||||
9, this->client(), target);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
unknown_fields(), target);
|
||||
}
|
||||
// @@protoc_insertion_point(serialize_to_array_end:mysql_logger.event)
|
||||
return target;
|
||||
}
|
||||
|
||||
int event::ByteSize() const {
|
||||
int total_size = 0;
|
||||
|
||||
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
// required uint32 thread_id = 1;
|
||||
if (has_thread_id()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::UInt32Size(
|
||||
this->thread_id());
|
||||
}
|
||||
|
||||
// required string username = 2;
|
||||
if (has_username()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::StringSize(
|
||||
this->username());
|
||||
}
|
||||
|
||||
// required string schemaname = 3;
|
||||
if (has_schemaname()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::StringSize(
|
||||
this->schemaname());
|
||||
}
|
||||
|
||||
// required uint64 start_time = 4;
|
||||
if (has_start_time()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
||||
this->start_time());
|
||||
}
|
||||
|
||||
// required uint64 end_time = 5;
|
||||
if (has_end_time()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
||||
this->end_time());
|
||||
}
|
||||
|
||||
// optional uint64 query_digest = 6;
|
||||
if (has_query_digest()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
||||
this->query_digest());
|
||||
}
|
||||
|
||||
// required string query = 7;
|
||||
if (has_query()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::StringSize(
|
||||
this->query());
|
||||
}
|
||||
|
||||
// optional string server = 8;
|
||||
if (has_server()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::StringSize(
|
||||
this->server());
|
||||
}
|
||||
|
||||
}
|
||||
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
|
||||
// optional string client = 9;
|
||||
if (has_client()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::StringSize(
|
||||
this->client());
|
||||
}
|
||||
|
||||
}
|
||||
if (!unknown_fields().empty()) {
|
||||
total_size +=
|
||||
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
unknown_fields());
|
||||
}
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = total_size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void event::MergeFrom(const ::google::protobuf::Message& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
const event* source =
|
||||
::google::protobuf::internal::dynamic_cast_if_available<const event*>(
|
||||
&from);
|
||||
if (source == NULL) {
|
||||
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void event::MergeFrom(const event& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
if (from.has_thread_id()) {
|
||||
set_thread_id(from.thread_id());
|
||||
}
|
||||
if (from.has_username()) {
|
||||
set_username(from.username());
|
||||
}
|
||||
if (from.has_schemaname()) {
|
||||
set_schemaname(from.schemaname());
|
||||
}
|
||||
if (from.has_start_time()) {
|
||||
set_start_time(from.start_time());
|
||||
}
|
||||
if (from.has_end_time()) {
|
||||
set_end_time(from.end_time());
|
||||
}
|
||||
if (from.has_query_digest()) {
|
||||
set_query_digest(from.query_digest());
|
||||
}
|
||||
if (from.has_query()) {
|
||||
set_query(from.query());
|
||||
}
|
||||
if (from.has_server()) {
|
||||
set_server(from.server());
|
||||
}
|
||||
}
|
||||
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
|
||||
if (from.has_client()) {
|
||||
set_client(from.client());
|
||||
}
|
||||
}
|
||||
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
||||
}
|
||||
|
||||
void event::CopyFrom(const ::google::protobuf::Message& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void event::CopyFrom(const event& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool event::IsInitialized() const {
|
||||
if ((_has_bits_[0] & 0x0000005f) != 0x0000005f) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void event::Swap(event* other) {
|
||||
if (other != this) {
|
||||
std::swap(thread_id_, other->thread_id_);
|
||||
std::swap(username_, other->username_);
|
||||
std::swap(schemaname_, other->schemaname_);
|
||||
std::swap(start_time_, other->start_time_);
|
||||
std::swap(end_time_, other->end_time_);
|
||||
std::swap(query_digest_, other->query_digest_);
|
||||
std::swap(query_, other->query_);
|
||||
std::swap(server_, other->server_);
|
||||
std::swap(client_, other->client_);
|
||||
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||||
_unknown_fields_.Swap(&other->_unknown_fields_);
|
||||
std::swap(_cached_size_, other->_cached_size_);
|
||||
}
|
||||
}
|
||||
|
||||
::google::protobuf::Metadata event::GetMetadata() const {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::Metadata metadata;
|
||||
metadata.descriptor = event_descriptor_;
|
||||
metadata.reflection = event_reflection_;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace mysql_logger
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
@ -1,721 +0,0 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: mysql_logger.proto
|
||||
|
||||
#ifndef PROTOBUF_mysql_5flogger_2eproto__INCLUDED
|
||||
#define PROTOBUF_mysql_5flogger_2eproto__INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
|
||||
#if GOOGLE_PROTOBUF_VERSION < 2006000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace mysql_logger {
|
||||
|
||||
// Internal implementation detail -- do not call these.
|
||||
void protobuf_AddDesc_mysql_5flogger_2eproto();
|
||||
void protobuf_AssignDesc_mysql_5flogger_2eproto();
|
||||
void protobuf_ShutdownFile_mysql_5flogger_2eproto();
|
||||
|
||||
class event;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class event : public ::google::protobuf::Message {
|
||||
public:
|
||||
event();
|
||||
virtual ~event();
|
||||
|
||||
event(const event& from);
|
||||
|
||||
inline event& operator=(const event& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
return _unknown_fields_;
|
||||
}
|
||||
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
return &_unknown_fields_;
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const event& default_instance();
|
||||
|
||||
void Swap(event* other);
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
event* New() const;
|
||||
void CopyFrom(const ::google::protobuf::Message& from);
|
||||
void MergeFrom(const ::google::protobuf::Message& from);
|
||||
void CopyFrom(const event& from);
|
||||
void MergeFrom(const event& from);
|
||||
void Clear();
|
||||
bool IsInitialized() const;
|
||||
|
||||
int ByteSize() const;
|
||||
bool MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input);
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const;
|
||||
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
|
||||
int GetCachedSize() const { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const;
|
||||
public:
|
||||
::google::protobuf::Metadata GetMetadata() const;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
// required uint32 thread_id = 1;
|
||||
inline bool has_thread_id() const;
|
||||
inline void clear_thread_id();
|
||||
static const int kThreadIdFieldNumber = 1;
|
||||
inline ::google::protobuf::uint32 thread_id() const;
|
||||
inline void set_thread_id(::google::protobuf::uint32 value);
|
||||
|
||||
// required string username = 2;
|
||||
inline bool has_username() const;
|
||||
inline void clear_username();
|
||||
static const int kUsernameFieldNumber = 2;
|
||||
inline const ::std::string& username() const;
|
||||
inline void set_username(const ::std::string& value);
|
||||
inline void set_username(const char* value);
|
||||
inline void set_username(const char* value, size_t size);
|
||||
inline ::std::string* mutable_username();
|
||||
inline ::std::string* release_username();
|
||||
inline void set_allocated_username(::std::string* username);
|
||||
|
||||
// required string schemaname = 3;
|
||||
inline bool has_schemaname() const;
|
||||
inline void clear_schemaname();
|
||||
static const int kSchemanameFieldNumber = 3;
|
||||
inline const ::std::string& schemaname() const;
|
||||
inline void set_schemaname(const ::std::string& value);
|
||||
inline void set_schemaname(const char* value);
|
||||
inline void set_schemaname(const char* value, size_t size);
|
||||
inline ::std::string* mutable_schemaname();
|
||||
inline ::std::string* release_schemaname();
|
||||
inline void set_allocated_schemaname(::std::string* schemaname);
|
||||
|
||||
// required uint64 start_time = 4;
|
||||
inline bool has_start_time() const;
|
||||
inline void clear_start_time();
|
||||
static const int kStartTimeFieldNumber = 4;
|
||||
inline ::google::protobuf::uint64 start_time() const;
|
||||
inline void set_start_time(::google::protobuf::uint64 value);
|
||||
|
||||
// required uint64 end_time = 5;
|
||||
inline bool has_end_time() const;
|
||||
inline void clear_end_time();
|
||||
static const int kEndTimeFieldNumber = 5;
|
||||
inline ::google::protobuf::uint64 end_time() const;
|
||||
inline void set_end_time(::google::protobuf::uint64 value);
|
||||
|
||||
// optional uint64 query_digest = 6;
|
||||
inline bool has_query_digest() const;
|
||||
inline void clear_query_digest();
|
||||
static const int kQueryDigestFieldNumber = 6;
|
||||
inline ::google::protobuf::uint64 query_digest() const;
|
||||
inline void set_query_digest(::google::protobuf::uint64 value);
|
||||
|
||||
// required string query = 7;
|
||||
inline bool has_query() const;
|
||||
inline void clear_query();
|
||||
static const int kQueryFieldNumber = 7;
|
||||
inline const ::std::string& query() const;
|
||||
inline void set_query(const ::std::string& value);
|
||||
inline void set_query(const char* value);
|
||||
inline void set_query(const char* value, size_t size);
|
||||
inline ::std::string* mutable_query();
|
||||
inline ::std::string* release_query();
|
||||
inline void set_allocated_query(::std::string* query);
|
||||
|
||||
// optional string server = 8;
|
||||
inline bool has_server() const;
|
||||
inline void clear_server();
|
||||
static const int kServerFieldNumber = 8;
|
||||
inline const ::std::string& server() const;
|
||||
inline void set_server(const ::std::string& value);
|
||||
inline void set_server(const char* value);
|
||||
inline void set_server(const char* value, size_t size);
|
||||
inline ::std::string* mutable_server();
|
||||
inline ::std::string* release_server();
|
||||
inline void set_allocated_server(::std::string* server);
|
||||
|
||||
// optional string client = 9;
|
||||
inline bool has_client() const;
|
||||
inline void clear_client();
|
||||
static const int kClientFieldNumber = 9;
|
||||
inline const ::std::string& client() const;
|
||||
inline void set_client(const ::std::string& value);
|
||||
inline void set_client(const char* value);
|
||||
inline void set_client(const char* value, size_t size);
|
||||
inline ::std::string* mutable_client();
|
||||
inline ::std::string* release_client();
|
||||
inline void set_allocated_client(::std::string* client);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:mysql_logger.event)
|
||||
private:
|
||||
inline void set_has_thread_id();
|
||||
inline void clear_has_thread_id();
|
||||
inline void set_has_username();
|
||||
inline void clear_has_username();
|
||||
inline void set_has_schemaname();
|
||||
inline void clear_has_schemaname();
|
||||
inline void set_has_start_time();
|
||||
inline void clear_has_start_time();
|
||||
inline void set_has_end_time();
|
||||
inline void clear_has_end_time();
|
||||
inline void set_has_query_digest();
|
||||
inline void clear_has_query_digest();
|
||||
inline void set_has_query();
|
||||
inline void clear_has_query();
|
||||
inline void set_has_server();
|
||||
inline void clear_has_server();
|
||||
inline void set_has_client();
|
||||
inline void clear_has_client();
|
||||
|
||||
::google::protobuf::UnknownFieldSet _unknown_fields_;
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[1];
|
||||
mutable int _cached_size_;
|
||||
::std::string* username_;
|
||||
::std::string* schemaname_;
|
||||
::google::protobuf::uint64 start_time_;
|
||||
::google::protobuf::uint64 end_time_;
|
||||
::google::protobuf::uint64 query_digest_;
|
||||
::std::string* query_;
|
||||
::std::string* server_;
|
||||
::std::string* client_;
|
||||
::google::protobuf::uint32 thread_id_;
|
||||
friend void protobuf_AddDesc_mysql_5flogger_2eproto();
|
||||
friend void protobuf_AssignDesc_mysql_5flogger_2eproto();
|
||||
friend void protobuf_ShutdownFile_mysql_5flogger_2eproto();
|
||||
|
||||
void InitAsDefaultInstance();
|
||||
static event* default_instance_;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
// event
|
||||
|
||||
// required uint32 thread_id = 1;
|
||||
inline bool event::has_thread_id() const {
|
||||
return (_has_bits_[0] & 0x00000001u) != 0;
|
||||
}
|
||||
inline void event::set_has_thread_id() {
|
||||
_has_bits_[0] |= 0x00000001u;
|
||||
}
|
||||
inline void event::clear_has_thread_id() {
|
||||
_has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline void event::clear_thread_id() {
|
||||
thread_id_ = 0u;
|
||||
clear_has_thread_id();
|
||||
}
|
||||
inline ::google::protobuf::uint32 event::thread_id() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.thread_id)
|
||||
return thread_id_;
|
||||
}
|
||||
inline void event::set_thread_id(::google::protobuf::uint32 value) {
|
||||
set_has_thread_id();
|
||||
thread_id_ = value;
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.thread_id)
|
||||
}
|
||||
|
||||
// required string username = 2;
|
||||
inline bool event::has_username() const {
|
||||
return (_has_bits_[0] & 0x00000002u) != 0;
|
||||
}
|
||||
inline void event::set_has_username() {
|
||||
_has_bits_[0] |= 0x00000002u;
|
||||
}
|
||||
inline void event::clear_has_username() {
|
||||
_has_bits_[0] &= ~0x00000002u;
|
||||
}
|
||||
inline void event::clear_username() {
|
||||
if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
username_->clear();
|
||||
}
|
||||
clear_has_username();
|
||||
}
|
||||
inline const ::std::string& event::username() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.username)
|
||||
return *username_;
|
||||
}
|
||||
inline void event::set_username(const ::std::string& value) {
|
||||
set_has_username();
|
||||
if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
username_ = new ::std::string;
|
||||
}
|
||||
username_->assign(value);
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.username)
|
||||
}
|
||||
inline void event::set_username(const char* value) {
|
||||
set_has_username();
|
||||
if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
username_ = new ::std::string;
|
||||
}
|
||||
username_->assign(value);
|
||||
// @@protoc_insertion_point(field_set_char:mysql_logger.event.username)
|
||||
}
|
||||
inline void event::set_username(const char* value, size_t size) {
|
||||
set_has_username();
|
||||
if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
username_ = new ::std::string;
|
||||
}
|
||||
username_->assign(reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_set_pointer:mysql_logger.event.username)
|
||||
}
|
||||
inline ::std::string* event::mutable_username() {
|
||||
set_has_username();
|
||||
if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
username_ = new ::std::string;
|
||||
}
|
||||
// @@protoc_insertion_point(field_mutable:mysql_logger.event.username)
|
||||
return username_;
|
||||
}
|
||||
inline ::std::string* event::release_username() {
|
||||
clear_has_username();
|
||||
if (username_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
return NULL;
|
||||
} else {
|
||||
::std::string* temp = username_;
|
||||
username_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
inline void event::set_allocated_username(::std::string* username) {
|
||||
if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete username_;
|
||||
}
|
||||
if (username) {
|
||||
set_has_username();
|
||||
username_ = username;
|
||||
} else {
|
||||
clear_has_username();
|
||||
username_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:mysql_logger.event.username)
|
||||
}
|
||||
|
||||
// required string schemaname = 3;
|
||||
inline bool event::has_schemaname() const {
|
||||
return (_has_bits_[0] & 0x00000004u) != 0;
|
||||
}
|
||||
inline void event::set_has_schemaname() {
|
||||
_has_bits_[0] |= 0x00000004u;
|
||||
}
|
||||
inline void event::clear_has_schemaname() {
|
||||
_has_bits_[0] &= ~0x00000004u;
|
||||
}
|
||||
inline void event::clear_schemaname() {
|
||||
if (schemaname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
schemaname_->clear();
|
||||
}
|
||||
clear_has_schemaname();
|
||||
}
|
||||
inline const ::std::string& event::schemaname() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.schemaname)
|
||||
return *schemaname_;
|
||||
}
|
||||
inline void event::set_schemaname(const ::std::string& value) {
|
||||
set_has_schemaname();
|
||||
if (schemaname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
schemaname_ = new ::std::string;
|
||||
}
|
||||
schemaname_->assign(value);
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.schemaname)
|
||||
}
|
||||
inline void event::set_schemaname(const char* value) {
|
||||
set_has_schemaname();
|
||||
if (schemaname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
schemaname_ = new ::std::string;
|
||||
}
|
||||
schemaname_->assign(value);
|
||||
// @@protoc_insertion_point(field_set_char:mysql_logger.event.schemaname)
|
||||
}
|
||||
inline void event::set_schemaname(const char* value, size_t size) {
|
||||
set_has_schemaname();
|
||||
if (schemaname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
schemaname_ = new ::std::string;
|
||||
}
|
||||
schemaname_->assign(reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_set_pointer:mysql_logger.event.schemaname)
|
||||
}
|
||||
inline ::std::string* event::mutable_schemaname() {
|
||||
set_has_schemaname();
|
||||
if (schemaname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
schemaname_ = new ::std::string;
|
||||
}
|
||||
// @@protoc_insertion_point(field_mutable:mysql_logger.event.schemaname)
|
||||
return schemaname_;
|
||||
}
|
||||
inline ::std::string* event::release_schemaname() {
|
||||
clear_has_schemaname();
|
||||
if (schemaname_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
return NULL;
|
||||
} else {
|
||||
::std::string* temp = schemaname_;
|
||||
schemaname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
inline void event::set_allocated_schemaname(::std::string* schemaname) {
|
||||
if (schemaname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete schemaname_;
|
||||
}
|
||||
if (schemaname) {
|
||||
set_has_schemaname();
|
||||
schemaname_ = schemaname;
|
||||
} else {
|
||||
clear_has_schemaname();
|
||||
schemaname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:mysql_logger.event.schemaname)
|
||||
}
|
||||
|
||||
// required uint64 start_time = 4;
|
||||
inline bool event::has_start_time() const {
|
||||
return (_has_bits_[0] & 0x00000008u) != 0;
|
||||
}
|
||||
inline void event::set_has_start_time() {
|
||||
_has_bits_[0] |= 0x00000008u;
|
||||
}
|
||||
inline void event::clear_has_start_time() {
|
||||
_has_bits_[0] &= ~0x00000008u;
|
||||
}
|
||||
inline void event::clear_start_time() {
|
||||
start_time_ = GOOGLE_ULONGLONG(0);
|
||||
clear_has_start_time();
|
||||
}
|
||||
inline ::google::protobuf::uint64 event::start_time() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.start_time)
|
||||
return start_time_;
|
||||
}
|
||||
inline void event::set_start_time(::google::protobuf::uint64 value) {
|
||||
set_has_start_time();
|
||||
start_time_ = value;
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.start_time)
|
||||
}
|
||||
|
||||
// required uint64 end_time = 5;
|
||||
inline bool event::has_end_time() const {
|
||||
return (_has_bits_[0] & 0x00000010u) != 0;
|
||||
}
|
||||
inline void event::set_has_end_time() {
|
||||
_has_bits_[0] |= 0x00000010u;
|
||||
}
|
||||
inline void event::clear_has_end_time() {
|
||||
_has_bits_[0] &= ~0x00000010u;
|
||||
}
|
||||
inline void event::clear_end_time() {
|
||||
end_time_ = GOOGLE_ULONGLONG(0);
|
||||
clear_has_end_time();
|
||||
}
|
||||
inline ::google::protobuf::uint64 event::end_time() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.end_time)
|
||||
return end_time_;
|
||||
}
|
||||
inline void event::set_end_time(::google::protobuf::uint64 value) {
|
||||
set_has_end_time();
|
||||
end_time_ = value;
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.end_time)
|
||||
}
|
||||
|
||||
// optional uint64 query_digest = 6;
|
||||
inline bool event::has_query_digest() const {
|
||||
return (_has_bits_[0] & 0x00000020u) != 0;
|
||||
}
|
||||
inline void event::set_has_query_digest() {
|
||||
_has_bits_[0] |= 0x00000020u;
|
||||
}
|
||||
inline void event::clear_has_query_digest() {
|
||||
_has_bits_[0] &= ~0x00000020u;
|
||||
}
|
||||
inline void event::clear_query_digest() {
|
||||
query_digest_ = GOOGLE_ULONGLONG(0);
|
||||
clear_has_query_digest();
|
||||
}
|
||||
inline ::google::protobuf::uint64 event::query_digest() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.query_digest)
|
||||
return query_digest_;
|
||||
}
|
||||
inline void event::set_query_digest(::google::protobuf::uint64 value) {
|
||||
set_has_query_digest();
|
||||
query_digest_ = value;
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.query_digest)
|
||||
}
|
||||
|
||||
// required string query = 7;
|
||||
inline bool event::has_query() const {
|
||||
return (_has_bits_[0] & 0x00000040u) != 0;
|
||||
}
|
||||
inline void event::set_has_query() {
|
||||
_has_bits_[0] |= 0x00000040u;
|
||||
}
|
||||
inline void event::clear_has_query() {
|
||||
_has_bits_[0] &= ~0x00000040u;
|
||||
}
|
||||
inline void event::clear_query() {
|
||||
if (query_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
query_->clear();
|
||||
}
|
||||
clear_has_query();
|
||||
}
|
||||
inline const ::std::string& event::query() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.query)
|
||||
return *query_;
|
||||
}
|
||||
inline void event::set_query(const ::std::string& value) {
|
||||
set_has_query();
|
||||
if (query_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
query_ = new ::std::string;
|
||||
}
|
||||
query_->assign(value);
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.query)
|
||||
}
|
||||
inline void event::set_query(const char* value) {
|
||||
set_has_query();
|
||||
if (query_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
query_ = new ::std::string;
|
||||
}
|
||||
query_->assign(value);
|
||||
// @@protoc_insertion_point(field_set_char:mysql_logger.event.query)
|
||||
}
|
||||
inline void event::set_query(const char* value, size_t size) {
|
||||
set_has_query();
|
||||
if (query_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
query_ = new ::std::string;
|
||||
}
|
||||
query_->assign(reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_set_pointer:mysql_logger.event.query)
|
||||
}
|
||||
inline ::std::string* event::mutable_query() {
|
||||
set_has_query();
|
||||
if (query_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
query_ = new ::std::string;
|
||||
}
|
||||
// @@protoc_insertion_point(field_mutable:mysql_logger.event.query)
|
||||
return query_;
|
||||
}
|
||||
inline ::std::string* event::release_query() {
|
||||
clear_has_query();
|
||||
if (query_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
return NULL;
|
||||
} else {
|
||||
::std::string* temp = query_;
|
||||
query_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
inline void event::set_allocated_query(::std::string* query) {
|
||||
if (query_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete query_;
|
||||
}
|
||||
if (query) {
|
||||
set_has_query();
|
||||
query_ = query;
|
||||
} else {
|
||||
clear_has_query();
|
||||
query_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:mysql_logger.event.query)
|
||||
}
|
||||
|
||||
// optional string server = 8;
|
||||
inline bool event::has_server() const {
|
||||
return (_has_bits_[0] & 0x00000080u) != 0;
|
||||
}
|
||||
inline void event::set_has_server() {
|
||||
_has_bits_[0] |= 0x00000080u;
|
||||
}
|
||||
inline void event::clear_has_server() {
|
||||
_has_bits_[0] &= ~0x00000080u;
|
||||
}
|
||||
inline void event::clear_server() {
|
||||
if (server_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
server_->clear();
|
||||
}
|
||||
clear_has_server();
|
||||
}
|
||||
inline const ::std::string& event::server() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.server)
|
||||
return *server_;
|
||||
}
|
||||
inline void event::set_server(const ::std::string& value) {
|
||||
set_has_server();
|
||||
if (server_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
server_ = new ::std::string;
|
||||
}
|
||||
server_->assign(value);
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.server)
|
||||
}
|
||||
inline void event::set_server(const char* value) {
|
||||
set_has_server();
|
||||
if (server_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
server_ = new ::std::string;
|
||||
}
|
||||
server_->assign(value);
|
||||
// @@protoc_insertion_point(field_set_char:mysql_logger.event.server)
|
||||
}
|
||||
inline void event::set_server(const char* value, size_t size) {
|
||||
set_has_server();
|
||||
if (server_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
server_ = new ::std::string;
|
||||
}
|
||||
server_->assign(reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_set_pointer:mysql_logger.event.server)
|
||||
}
|
||||
inline ::std::string* event::mutable_server() {
|
||||
set_has_server();
|
||||
if (server_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
server_ = new ::std::string;
|
||||
}
|
||||
// @@protoc_insertion_point(field_mutable:mysql_logger.event.server)
|
||||
return server_;
|
||||
}
|
||||
inline ::std::string* event::release_server() {
|
||||
clear_has_server();
|
||||
if (server_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
return NULL;
|
||||
} else {
|
||||
::std::string* temp = server_;
|
||||
server_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
inline void event::set_allocated_server(::std::string* server) {
|
||||
if (server_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete server_;
|
||||
}
|
||||
if (server) {
|
||||
set_has_server();
|
||||
server_ = server;
|
||||
} else {
|
||||
clear_has_server();
|
||||
server_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:mysql_logger.event.server)
|
||||
}
|
||||
|
||||
// optional string client = 9;
|
||||
inline bool event::has_client() const {
|
||||
return (_has_bits_[0] & 0x00000100u) != 0;
|
||||
}
|
||||
inline void event::set_has_client() {
|
||||
_has_bits_[0] |= 0x00000100u;
|
||||
}
|
||||
inline void event::clear_has_client() {
|
||||
_has_bits_[0] &= ~0x00000100u;
|
||||
}
|
||||
inline void event::clear_client() {
|
||||
if (client_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
client_->clear();
|
||||
}
|
||||
clear_has_client();
|
||||
}
|
||||
inline const ::std::string& event::client() const {
|
||||
// @@protoc_insertion_point(field_get:mysql_logger.event.client)
|
||||
return *client_;
|
||||
}
|
||||
inline void event::set_client(const ::std::string& value) {
|
||||
set_has_client();
|
||||
if (client_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
client_ = new ::std::string;
|
||||
}
|
||||
client_->assign(value);
|
||||
// @@protoc_insertion_point(field_set:mysql_logger.event.client)
|
||||
}
|
||||
inline void event::set_client(const char* value) {
|
||||
set_has_client();
|
||||
if (client_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
client_ = new ::std::string;
|
||||
}
|
||||
client_->assign(value);
|
||||
// @@protoc_insertion_point(field_set_char:mysql_logger.event.client)
|
||||
}
|
||||
inline void event::set_client(const char* value, size_t size) {
|
||||
set_has_client();
|
||||
if (client_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
client_ = new ::std::string;
|
||||
}
|
||||
client_->assign(reinterpret_cast<const char*>(value), size);
|
||||
// @@protoc_insertion_point(field_set_pointer:mysql_logger.event.client)
|
||||
}
|
||||
inline ::std::string* event::mutable_client() {
|
||||
set_has_client();
|
||||
if (client_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
client_ = new ::std::string;
|
||||
}
|
||||
// @@protoc_insertion_point(field_mutable:mysql_logger.event.client)
|
||||
return client_;
|
||||
}
|
||||
inline ::std::string* event::release_client() {
|
||||
clear_has_client();
|
||||
if (client_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
return NULL;
|
||||
} else {
|
||||
::std::string* temp = client_;
|
||||
client_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
inline void event::set_allocated_client(::std::string* client) {
|
||||
if (client_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
|
||||
delete client_;
|
||||
}
|
||||
if (client) {
|
||||
set_has_client();
|
||||
client_ = client;
|
||||
} else {
|
||||
clear_has_client();
|
||||
client_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
||||
}
|
||||
// @@protoc_insertion_point(field_set_allocated:mysql_logger.event.client)
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace mysql_logger
|
||||
|
||||
#ifndef SWIG
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
|
||||
|
||||
} // namespace google
|
||||
} // namespace protobuf
|
||||
#endif // SWIG
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#endif // PROTOBUF_mysql_5flogger_2eproto__INCLUDED
|
||||
@ -1,13 +0,0 @@
|
||||
package mysql_logger;
|
||||
|
||||
message event {
|
||||
required uint32 thread_id = 1;
|
||||
required string username = 2;
|
||||
required string schemaname = 3;
|
||||
required uint64 start_time = 4;
|
||||
required uint64 end_time = 5;
|
||||
optional uint64 query_digest = 6;
|
||||
required string query = 7;
|
||||
optional string server = 8;
|
||||
optional string client = 9;
|
||||
}
|
||||
Loading…
Reference in new issue