John,
It turns out that if you do experiments with SLEEP() or BENCHMARK(), you get
weird behavior since such a query, even if killed, will return a result set
and the server will terminate the connection after the result has been
returned. I assume this is by design because no rows are processed by those
functions and therefore neither KILL only works after the fact -- usually it
is a check if you have been killed is made as each row is processed, and
here we are not processing any rows.
The Executor is not set up to deal with this situation, where you both get a
result set on the query but then "connection lost" on the next query. I do
not think there is a need to make it even more complicated in order to
account for this very rare scenario.
So, to do experiments, use something like SELECT SUM(RAND()) FROM C,CC,D,E
to force actual rows to be processed.
So, in order for me to fix the issue, all I had to do was fortify some
Transforms with extra DROP TABLE IF EXISTS and then add the various
"connection lost" error codes to the mysql_grouping_errors table in
lib/GenTest/Transform.pm (the name is rather misleading). Then, the existing
mechanism will make sure the test continues properly.
I have not implemented the separation of STATUS_QUERY_KILLED from
STATUS_SERVER_CRASHED that we discussed, since it was not necessary to fix
this particular issue. Some day, it would be a nice thing to have.
Philip Stoev
_______________________________________________
Mailing list: https://launchpad.net/~randgen
Post to : [email protected]
Unsubscribe : https://launchpad.net/~randgen
More help : https://help.launchpad.net/ListHelp