Added comment to assertion regarding to bref->bref_pending_cmd which is a one-slot buffer for database query. If sessoin command cursor is active when query is routed, instead of routing the query to backend it is stored to bref_pending_cmd to wait until previous (session) command is completed. The assertion traps if there is a command already in the bref_pending_cmd.
Situation is wrong because client shouldn't send new query before the previous (the pending one) is executed in backend and the reply is sent to the client.
This commit is contained in:
parent
a4968f2521
commit
4dd6f1b9c0
@ -2335,8 +2335,14 @@ static bool route_single_stmt(
|
||||
bref->bref_backend->backend_server->port)));
|
||||
/**
|
||||
* Store current stmt if execution of previous session command
|
||||
* haven't completed yet. Note that according to MySQL protocol
|
||||
* haven't completed yet.
|
||||
*
|
||||
* !!! Note that according to MySQL protocol
|
||||
* there can only be one such non-sescmd stmt at the time.
|
||||
*
|
||||
* If the assertion below traps, pending queries are treated
|
||||
* somehow wrong, or client is sending more queries before
|
||||
* previous is received.
|
||||
*/
|
||||
if (sescmd_cursor_is_active(scur))
|
||||
{
|
||||
@ -2516,7 +2522,6 @@ char *weightby;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user