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) {