Index: sql/protocol.cc IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- sql/protocol.cc (revision 45fe3c0e2e7d2010cba412a867b73c650c54797a) +++ sql/protocol.cc (revision ) @@ -1617,16 +1617,14 @@ if (write()) return TRUE; - /* Restore THD::server_status. */ - thd->server_status&= ~SERVER_PS_OUT_PARAMS; - ret= net_send_eof(thd, thd->server_status, 0); /* - Reset SERVER_MORE_RESULTS_EXISTS bit, because this is the last packet - for sure. + Reset server_status: + - SERVER_MORE_RESULTS_EXISTS bit, because this is the last packet for sure. + - Restore SERVER_PS_OUT_PARAMS status. */ - thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS; + thd->server_status&= ~SERVER_PS_OUT_PARAMS && ~SERVER_MORE_RESULTS_EXISTS; return ret ? FALSE : TRUE; }