Manually set 'POLLOUT' event for 'SHOW_WARNINGS' session status to ensure sending by 'MySQL_Connection' #3606

pull/3652/head
Javier Jaramago Fernández 5 years ago
parent 4312cd9a72
commit a49433cc91

@ -4646,6 +4646,13 @@ handler_again:
{
MySQL_Data_Stream *myds=mybe->server_myds;
MySQL_Connection *myconn=myds->myconn;
// Setting POLLOUT is required just in case this state has been reached when 'RunQuery' from
// 'PROCESSING_QUERY' state has immediately return. This is because in case 'mysql_real_query_start'
// immediately returns with '0' the session is never processed again by 'MySQL_Thread', and 'revents' is
// never updated with the result of polling through the 'MySQL_Thread::mypolls'.
myds->revents |= POLLOUT;
int rc = myconn->async_query(
mybe->server_myds->revents,(char *)"SHOW WARNINGS", strlen((char *)"SHOW WARNINGS")
);

Loading…
Cancel
Save