> > === modified file 'sql/sql_prepare.cc'
> > --- a/sql/sql_prepare.cc 2009-02-13 16:41:47 +0000
> > +++ b/sql/sql_prepare.cc 2009-05-18 14:51:10 +0000
> > @@ -2461,6 +2461,9 @@ void mysql_stmt_execute(THD *thd, char *
> >
> > stmt->execute_loop(&expanded_query, open_cursor, packet,
> packet_end);
> >
> > + /* close connection socket; for use with client testing (bug 43560) */
> > + DBUG_EXECUTE_IF("close_conn_after_stmt_execute",
> close(thd->net.vio->sd););
> > +
>
> Can't you call vio_close() here? or perhaps assert that its a socket
> based connection. I'm not sure close will be available here in every
> platform that we build. Comments?
Hum, for the current use, we are guaranteed that this is a regular
socket given that mysql_client_test explicitly sets up a TCP connection
for testing this bug. However, I've changed to use vio_close() in any
case.
> > + /* clean up and turn off the debug functionality in server */
> > + client_disconnect();
> > + client_connect(0, MYSQL_PROTOCOL_DEFAULT);
> > + rc= mysql_query(mysql,"DROP TABLE IF EXISTS t1");
> > + myquery(rc);
> > + rc= mysql_query(mysql,"SET SESSION
> debug='-d,close_conn_after_stmt_execute'");
> > + myquery(rc);
>
> Clean up wouldn't be needed with a new handle.
Except for the table drop... But changed to use a separate connection
for this subtest.
Staale