Execution of session commands failed because session commands and normal sql statements were executed in a wrong order if backend was executing previous session command while new sql stmt was routed to that backend. There was a window where ordering went wrong. It is possible that one normal sql stmt arrives while previous sescmds are still being executed. Introduced a new member in backend_ref_t structure, bref_pending_cmd where new sql stmt pointer is stored in that case. When sescmds are executed completely, that command is automatically executed next.
This commit is contained in:
@ -1642,6 +1642,8 @@ void protocol_archive_srv_command(
|
||||
server_command_t* h1;
|
||||
int len = 0;
|
||||
|
||||
CHK_PROTOCOL(p);
|
||||
|
||||
spinlock_acquire(&p->protocol_lock);
|
||||
|
||||
if (p->protocol_state != MYSQL_PROTOCOL_ACTIVE)
|
||||
@ -1692,6 +1694,7 @@ void protocol_archive_srv_command(
|
||||
|
||||
retblock:
|
||||
spinlock_release(&p->protocol_lock);
|
||||
CHK_PROTOCOL(p);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user