[GitHub] [incubator-brpc] yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, only support text protocol now, not support trans…

2019-03-29 Thread GitBox
yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, 
only support text protocol now, not support trans…
URL: https://github.com/apache/incubator-brpc/pull/692#discussion_r270436885
 
 

 ##
 File path: src/brpc/mysql.cpp
 ##
 @@ -0,0 +1,516 @@
+// Copyright (c) 2019 Baidu, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Authors: Yang,Liming (yanglimin...@baidu.com)
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "butil/string_printf.h"
+#include "butil/macros.h"
+#include "brpc/controller.h"
+#include "brpc/mysql.h"
+#include "brpc/mysql_command.h"
+#include "brpc/mysql_reply.h"
+
+namespace brpc {
+
+DEFINE_int32(mysql_default_replies_size, 10, "default replies size in one 
MysqlResponse");
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl();
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto();
+
+namespace {
+
+const ::google::protobuf::Descriptor* MysqlRequest_descriptor_ = NULL;
+const ::google::protobuf::Descriptor* MysqlResponse_descriptor_ = NULL;
+
+}  // namespace
+
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+const ::google::protobuf::FileDescriptor* file =
+::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+"baidu/rpc/mysql_base.proto");
+GOOGLE_CHECK(file != NULL);
+MysqlRequest_descriptor_ = file->message_type(0);
+MysqlResponse_descriptor_ = file->message_type(1);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+::google::protobuf::GoogleOnceInit(_AssignDescriptors_once_,
+   
_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+protobuf_AssignDescriptorsOnce();
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlRequest_descriptor_, ::default_instance());
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlResponse_descriptor_, ::default_instance());
+}
+
+}  // namespace
+
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto() {
+delete MysqlRequest::default_instance_;
+delete MysqlResponse::default_instance_;
+}
+
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl() {
+GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#if GOOGLE_PROTOBUF_VERSION >= 3002000
+::google::protobuf::internal::InitProtobufDefaults();
+#else
+
::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+#endif
+::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+"\n\032baidu/rpc/mysql_base.proto\022\tbaidu.rpc\032"
+" google/protobuf/descriptor.proto\"\016\n\014Mys"
+"qlRequest\"\017\n\rMysqlResponseB\003\200\001\001",
+111);
+
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile("baidu/rpc/mysql_base.proto",
+  
_RegisterTypes);
+MysqlRequest::default_instance_ = new MysqlRequest();
+MysqlResponse::default_instance_ = new MysqlResponse();
+MysqlRequest::default_instance_->InitAsDefaultInstance();
+MysqlResponse::default_instance_->InitAsDefaultInstance();
+::google::protobuf::internal::OnShutdown(
+_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once);
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+
::google::protobuf::GoogleOnceInit(_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once,
+   
_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto {
+StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+}
+} static_descriptor_initializer_baidu_2frpc_2fmysql_5fbase_2eproto_;
+
+
+// 

[GitHub] [incubator-brpc] yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, only support text protocol now, not support trans…

2019-03-29 Thread GitBox
yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, 
only support text protocol now, not support trans…
URL: https://github.com/apache/incubator-brpc/pull/692#discussion_r270414806
 
 

 ##
 File path: src/brpc/mysql.cpp
 ##
 @@ -0,0 +1,516 @@
+// Copyright (c) 2019 Baidu, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Authors: Yang,Liming (yanglimin...@baidu.com)
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "butil/string_printf.h"
+#include "butil/macros.h"
+#include "brpc/controller.h"
+#include "brpc/mysql.h"
+#include "brpc/mysql_command.h"
+#include "brpc/mysql_reply.h"
+
+namespace brpc {
+
+DEFINE_int32(mysql_default_replies_size, 10, "default replies size in one 
MysqlResponse");
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl();
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto();
+
+namespace {
+
+const ::google::protobuf::Descriptor* MysqlRequest_descriptor_ = NULL;
+const ::google::protobuf::Descriptor* MysqlResponse_descriptor_ = NULL;
+
+}  // namespace
+
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+const ::google::protobuf::FileDescriptor* file =
+::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+"baidu/rpc/mysql_base.proto");
+GOOGLE_CHECK(file != NULL);
+MysqlRequest_descriptor_ = file->message_type(0);
+MysqlResponse_descriptor_ = file->message_type(1);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+::google::protobuf::GoogleOnceInit(_AssignDescriptors_once_,
+   
_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+protobuf_AssignDescriptorsOnce();
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlRequest_descriptor_, ::default_instance());
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlResponse_descriptor_, ::default_instance());
+}
+
+}  // namespace
+
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto() {
+delete MysqlRequest::default_instance_;
+delete MysqlResponse::default_instance_;
+}
+
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl() {
+GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#if GOOGLE_PROTOBUF_VERSION >= 3002000
+::google::protobuf::internal::InitProtobufDefaults();
+#else
+
::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+#endif
+::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+"\n\032baidu/rpc/mysql_base.proto\022\tbaidu.rpc\032"
+" google/protobuf/descriptor.proto\"\016\n\014Mys"
+"qlRequest\"\017\n\rMysqlResponseB\003\200\001\001",
+111);
+
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile("baidu/rpc/mysql_base.proto",
+  
_RegisterTypes);
+MysqlRequest::default_instance_ = new MysqlRequest();
+MysqlResponse::default_instance_ = new MysqlResponse();
+MysqlRequest::default_instance_->InitAsDefaultInstance();
+MysqlResponse::default_instance_->InitAsDefaultInstance();
+::google::protobuf::internal::OnShutdown(
+_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once);
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+
::google::protobuf::GoogleOnceInit(_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once,
+   
_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto {
+StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+}
+} static_descriptor_initializer_baidu_2frpc_2fmysql_5fbase_2eproto_;
+
+
+// 

[GitHub] [incubator-brpc] yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, only support text protocol now, not support trans…

2019-03-29 Thread GitBox
yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, 
only support text protocol now, not support trans…
URL: https://github.com/apache/incubator-brpc/pull/692#discussion_r270414806
 
 

 ##
 File path: src/brpc/mysql.cpp
 ##
 @@ -0,0 +1,516 @@
+// Copyright (c) 2019 Baidu, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Authors: Yang,Liming (yanglimin...@baidu.com)
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "butil/string_printf.h"
+#include "butil/macros.h"
+#include "brpc/controller.h"
+#include "brpc/mysql.h"
+#include "brpc/mysql_command.h"
+#include "brpc/mysql_reply.h"
+
+namespace brpc {
+
+DEFINE_int32(mysql_default_replies_size, 10, "default replies size in one 
MysqlResponse");
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl();
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto();
+
+namespace {
+
+const ::google::protobuf::Descriptor* MysqlRequest_descriptor_ = NULL;
+const ::google::protobuf::Descriptor* MysqlResponse_descriptor_ = NULL;
+
+}  // namespace
+
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+const ::google::protobuf::FileDescriptor* file =
+::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+"baidu/rpc/mysql_base.proto");
+GOOGLE_CHECK(file != NULL);
+MysqlRequest_descriptor_ = file->message_type(0);
+MysqlResponse_descriptor_ = file->message_type(1);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+::google::protobuf::GoogleOnceInit(_AssignDescriptors_once_,
+   
_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+protobuf_AssignDescriptorsOnce();
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlRequest_descriptor_, ::default_instance());
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlResponse_descriptor_, ::default_instance());
+}
+
+}  // namespace
+
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto() {
+delete MysqlRequest::default_instance_;
+delete MysqlResponse::default_instance_;
+}
+
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl() {
+GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#if GOOGLE_PROTOBUF_VERSION >= 3002000
+::google::protobuf::internal::InitProtobufDefaults();
+#else
+
::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+#endif
+::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+"\n\032baidu/rpc/mysql_base.proto\022\tbaidu.rpc\032"
+" google/protobuf/descriptor.proto\"\016\n\014Mys"
+"qlRequest\"\017\n\rMysqlResponseB\003\200\001\001",
+111);
+
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile("baidu/rpc/mysql_base.proto",
+  
_RegisterTypes);
+MysqlRequest::default_instance_ = new MysqlRequest();
+MysqlResponse::default_instance_ = new MysqlResponse();
+MysqlRequest::default_instance_->InitAsDefaultInstance();
+MysqlResponse::default_instance_->InitAsDefaultInstance();
+::google::protobuf::internal::OnShutdown(
+_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once);
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+
::google::protobuf::GoogleOnceInit(_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once,
+   
_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto {
+StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+}
+} static_descriptor_initializer_baidu_2frpc_2fmysql_5fbase_2eproto_;
+
+
+// 

[GitHub] [incubator-brpc] yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, only support text protocol now, not support trans…

2019-03-29 Thread GitBox
yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, 
only support text protocol now, not support trans…
URL: https://github.com/apache/incubator-brpc/pull/692#discussion_r270414806
 
 

 ##
 File path: src/brpc/mysql.cpp
 ##
 @@ -0,0 +1,516 @@
+// Copyright (c) 2019 Baidu, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Authors: Yang,Liming (yanglimin...@baidu.com)
+
+#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "butil/string_printf.h"
+#include "butil/macros.h"
+#include "brpc/controller.h"
+#include "brpc/mysql.h"
+#include "brpc/mysql_command.h"
+#include "brpc/mysql_reply.h"
+
+namespace brpc {
+
+DEFINE_int32(mysql_default_replies_size, 10, "default replies size in one 
MysqlResponse");
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl();
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto();
+
+namespace {
+
+const ::google::protobuf::Descriptor* MysqlRequest_descriptor_ = NULL;
+const ::google::protobuf::Descriptor* MysqlResponse_descriptor_ = NULL;
+
+}  // namespace
+
+void protobuf_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+const ::google::protobuf::FileDescriptor* file =
+::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
+"baidu/rpc/mysql_base.proto");
+GOOGLE_CHECK(file != NULL);
+MysqlRequest_descriptor_ = file->message_type(0);
+MysqlResponse_descriptor_ = file->message_type(1);
+}
+
+namespace {
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
+inline void protobuf_AssignDescriptorsOnce() {
+::google::protobuf::GoogleOnceInit(_AssignDescriptors_once_,
+   
_AssignDesc_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) {
+protobuf_AssignDescriptorsOnce();
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlRequest_descriptor_, ::default_instance());
+::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+MysqlResponse_descriptor_, ::default_instance());
+}
+
+}  // namespace
+
+void protobuf_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto() {
+delete MysqlRequest::default_instance_;
+delete MysqlResponse::default_instance_;
+}
+
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl() {
+GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+#if GOOGLE_PROTOBUF_VERSION >= 3002000
+::google::protobuf::internal::InitProtobufDefaults();
+#else
+
::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
+#endif
+::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+"\n\032baidu/rpc/mysql_base.proto\022\tbaidu.rpc\032"
+" google/protobuf/descriptor.proto\"\016\n\014Mys"
+"qlRequest\"\017\n\rMysqlResponseB\003\200\001\001",
+111);
+
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile("baidu/rpc/mysql_base.proto",
+  
_RegisterTypes);
+MysqlRequest::default_instance_ = new MysqlRequest();
+MysqlResponse::default_instance_ = new MysqlResponse();
+MysqlRequest::default_instance_->InitAsDefaultInstance();
+MysqlResponse::default_instance_->InitAsDefaultInstance();
+::google::protobuf::internal::OnShutdown(
+_ShutdownFile_baidu_2frpc_2fmysql_5fbase_2eproto);
+}
+
+GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once);
+void protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto() {
+
::google::protobuf::GoogleOnceInit(_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_once,
+   
_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto_impl);
+}
+
+// Force AddDescriptors() to be called at static initialization time.
+struct StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto {
+StaticDescriptorInitializer_baidu_2frpc_2fmysql_5fbase_2eproto() {
+protobuf_AddDesc_baidu_2frpc_2fmysql_5fbase_2eproto();
+}
+} static_descriptor_initializer_baidu_2frpc_2fmysql_5fbase_2eproto_;
+
+
+// 

[GitHub] [incubator-brpc] yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, only support text protocol now, not support trans…

2019-03-20 Thread GitBox
yanglimingcn commented on a change in pull request #692: Add Mysql Protocol, 
only support text protocol now, not support trans…
URL: https://github.com/apache/incubator-brpc/pull/692#discussion_r267283363
 
 

 ##
 File path: src/brpc/socket.cpp
 ##
 @@ -1523,7 +1523,7 @@ int Socket::Write(butil::IOBuf* data, const 
WriteOptions* options_in) {
 if (options_in) {
 opt = *options_in;
 }
-if (data->empty()) {
+if (data->empty() && opt.with_auth == false) {
 
 Review comment:
   
因为mysql的鉴权是首先得先收一个消息,然后再发起鉴权,再发送正常请求,所以第一次write我需要把正常请求保存起来,这样我调用write传入的就是个空消息。


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org