Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jobmail committed Nov 1, 2024
1 parent 7742e22 commit 26e672d
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions refsapi_mysql_mngr.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,18 +455,16 @@ class mysql_mngr
}
bool get_result(m_query_t *q, bool is_buffered)
{
if (q->result == nullptr && !q->aborted)
{
q->result = (q->is_buffered = is_buffered) ? mysql_store_result(q->conn) : mysql_use_result(q->conn);
q->time_end = get_time();
DEBUG("get_result(): result = %p, query = %p, conn = %p, is_buffered = %d, state = %s", q->result, q, q->conn, is_buffered, q->conn->net.sqlstate);
if ((q->f_count = mysql_field_count(q->conn)) && q->result)
for (int i = 0; i < q->f_count; i++)
q->f_names.insert({q->result->fields[i].name, i});
DEBUG("get_result(): done, field count = %d", q->f_count);
return true;
}
return false;
if (q->result || q->aborted)
return false;
q->result = (q->is_buffered = is_buffered) ? mysql_store_result(q->conn) : mysql_use_result(q->conn);
q->time_end = get_time();
DEBUG("get_result(): result = %p, query = %p, conn = %p, is_buffered = %d, state = %s", q->result, q, q->conn, is_buffered, q->conn->net.sqlstate);
if ((q->f_count = mysql_field_count(q->conn)) && q->result)
for (int i = 0; i < q->f_count; i++)
q->f_names.insert({q->result->fields[i].name, i});
DEBUG("get_result(): done, field count = %d", q->f_count);
return true;
}
size_t num_rows(m_query_t *q)
{
Expand Down

0 comments on commit 26e672d

Please sign in to comment.