1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Implement a fix for Bug#57058 -- send SERVER_QUERY_WAS_SLOW over

network when a query was slow.

When a query is slow, sent a special flag to the client
indicating this fact.

Add a test case.
Implement review comments.
This commit is contained in:
Konstantin Osipov
2010-11-12 15:56:21 +03:00
parent 936bec8e2c
commit 4749b88494
10 changed files with 70 additions and 27 deletions

View File

@ -277,7 +277,6 @@ int Materialized_cursor::open(JOIN *join __attribute__((unused)))
rc= result->send_result_set_metadata(item_list, Protocol::SEND_NUM_ROWS);
thd->server_status|= SERVER_STATUS_CURSOR_EXISTS;
result->send_eof();
thd->server_status&= ~SERVER_STATUS_CURSOR_EXISTS;
}
return rc;
}
@ -318,12 +317,10 @@ void Materialized_cursor::fetch(ulong num_rows)
case 0:
thd->server_status|= SERVER_STATUS_CURSOR_EXISTS;
result->send_eof();
thd->server_status&= ~SERVER_STATUS_CURSOR_EXISTS;
break;
case HA_ERR_END_OF_FILE:
thd->server_status|= SERVER_STATUS_LAST_ROW_SENT;
result->send_eof();
thd->server_status&= ~SERVER_STATUS_LAST_ROW_SENT;
close();
break;
default: