From fa71782ccce67f7df2ba8aedbb9985f456a12488 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 11 Feb 2019 15:12:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cpp/dbpool.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cpp/dbpool.cc b/cpp/dbpool.cc index ad7e2b2..a909892 100644 --- a/cpp/dbpool.cc +++ b/cpp/dbpool.cc @@ -230,10 +230,10 @@ namespace f8 int ret = last_query_->ExecQuery(node->_sql_fmt.c_str(), node->_sql_params); if (ret < 0) { f8::MsgQueue::Instance()->PostMsg_r(exec_async_query_msgid, - a8::XParams() - .SetSender(node->context_id) - .SetParam1(AQE_SYNTAX_ERROR) - .SetParam2(last_query_->GetError())); + a8::XParams() + .SetSender(node->context_id) + .SetParam1(AQE_SYNTAX_ERROR) + .SetParam2(last_query_->GetError())); } else { DataSet* data_set = new DataSet(); data_set->reserve(last_query_->RowsNum()); @@ -247,10 +247,10 @@ namespace f8 last_query_->Next(); } f8::MsgQueue::Instance()->PostMsg_r(exec_async_query_msgid, - a8::XParams() - .SetSender(node->context_id) - .SetParam1(AQE_NO_ERROR) - .SetParam2((void*)data_set)); + a8::XParams() + .SetSender(node->context_id) + .SetParam1(AQE_NO_ERROR) + .SetParam2((void*)data_set)); } } break; @@ -313,11 +313,11 @@ namespace f8 /*mysql_init()不是完全线程安全的,但是只要成功调用一次就后就线程安全了, 如果有多线程并发使用mysql_init(),建议在程序初始化时空调一次mysql_init(),他的这点特性很像qsort() */ - a8::mysql::Connection conn; + a8::mysql::Connection conn; #endif - curr_seqid = 1000001; - exec_async_query_msgid = MsgQueue::Instance()->AllocIMMsgId(); - } + curr_seqid = 1000001; + exec_async_query_msgid = MsgQueue::Instance()->AllocIMMsgId(); + } void SetThreadNum(int thread_num) {