mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-11-30 19:08:48 +08:00
fixed compile error on linux
This commit is contained in:
parent
49bd1aae15
commit
0cf93e77dd
@ -71,7 +71,7 @@ bool MySQLConnect::ping() {
|
||||
void MySQLConnect::exec(const string& sql_string) {
|
||||
HKU_CHECK(m_mysql, "mysql connect is invalid!");
|
||||
int ret = mysql_query(m_mysql, sql_string.c_str());
|
||||
if (CR_SERVER_GONE_ERROR == ret) {
|
||||
if (ret) {
|
||||
// 尝试重新连接
|
||||
if (ping()) {
|
||||
ret = mysql_query(m_mysql, sql_string.c_str());
|
||||
@ -89,8 +89,9 @@ void MySQLConnect::exec(const string& sql_string) {
|
||||
do {
|
||||
MYSQL_RES* result = mysql_store_result(m_mysql);
|
||||
if (result) {
|
||||
auto num_fields = mysql_num_fields(result);
|
||||
HKU_TRACE("num_fields: {}", num_fields);
|
||||
// auto num_fields = mysql_num_fields(result);
|
||||
// HKU_TRACE("num_fields: {}", num_fields);
|
||||
mysql_num_fields(result);
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
if (mysql_field_count(m_mysql) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user