Des Smith wrote:
>
> When I set the read query timeout to 1 second , I'm seeing the query
> wait about 10 seconds before returning.
I suspect you're misunderstanding what the option actually does.
Quoting from the MySQL manual:
> Timeout for reads from server (works only for TCP/IP connections, and
> only for Windows prior to MySQL 5.0.25).
Possible reasons you're not getting the behavior you want:
1. You're on an older version than 5.0.25, and not on Windows
2. You're using a local IPC connection, not a network connection
3. You're expecting the timeout to apply to the entire transaction. I
haven't looked at the C API code, but I'll bet it only applies to each
individual network read, so as long as the server doesn't take more than
1 second to send each piece of data, this timeout will never occur.
I suspect you'll see the same behavior with a straight C API program.
If so, the issue isn't on topic here.