Open AndriiNikitin opened 6 years ago
The reason for the error is
#ifdef WITH_WSREP
if (WSREP(thd) && thd->wsrep_retry_query)
{
WSREP_DEBUG("skipping select metadata");
return FALSE;
}
#endif /* WITH_WSREP */
in Query_result_send::send_result_set_metadata()
which leaves THD::protocol
metadata uninitialized. As a result garbage is returned to client.
mtr test below occasionally shows error 2027, unless wsrep_retry_autocommit=0
This raises question: should CALL command be considered as 'autocommit query' ? Since stored procedure may execute several commands, (including COMMIT) - my strong belief is that CALL shouldn't be considered as 'autocommit query' and thus shouldn't be retried without regard of wsrep_retry_autocommit configuration.
If for some reasons it will be decided that stored procedures should be re-tried, galera must (somehow) ensure that outgoing packets from Server do follow MySQL protocol and don't cause 2027 errors on retry.
Credit: https://jira.mariadb.org/browse/MDEV-4237 https://jira.mariadb.org/browse/MDEV-13770
mtr test