sbuf_prepare_skip(sbuf, pkt->len);
} else if (client) {
sbuf_prepare_send(sbuf, &client->sbuf, pkt->len);
- if (ready) {
+ if (ready && client->query_start) {
usec_t total;
- Assert(client->query_start != 0);
-
total = get_cached_time() - client->query_start;
client->query_start = 0;
server->pool->stats.query_time += total;
slog_debug(client, "query time: %d us", (int)total);
+ } else if (ready) {
+ slog_warning(client, "FIXME: query end, but query_start == 0");
}
} else {
if (server->state != SV_TESTED)