Bug #42865 | System call interrupt in mysql_real_connect | ||
---|---|---|---|
Submitted: | 15 Feb 2009 10:16 | Modified: | 16 Mar 2009 11:05 |
Reporter: | Petr Vodicka | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
Version: | 5.1.31 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | (4), EINTR, mysql_real_connect, System call interrupted |
[15 Feb 2009 10:16]
Petr Vodicka
[15 Feb 2009 10:19]
Petr Vodicka
Use for simulate bug
Attachment: bugtest.c (text/plain), 1.61 KiB.
[15 Feb 2009 10:21]
Petr Vodicka
Sorry, use: mysql.options.connect_timeout = 1; instead of mysql.options.connect_timeout = 0; whis I type in bug report. Or use bugtest.c attached file.
[16 Feb 2009 7:28]
Sveta Smirnova
Thank you for the report. But error 4 is "Interrupted system call": $perror 4 OS error code 4: Interrupted system call So this is expected what you get this error if you kill thread which calls mysql_real_connect. Why do you see bug here?
[16 Feb 2009 10:10]
Petr Vodicka
I confirm that EINTR is Interuption from signal while processing poll() request. But I think, that EINTR should be processed inside by mysql client library directly because I did not expect EINTR, processing of it.. Also, it's not listed in manual of mysql_real_connect what mean (4). As a programmer I do expect that if I get non-zero from mysql_real_connect something bad was happened and probably I will give up connecting to MySQL. I am not also ordered to look in errno after mysql_real_connect. This is why I see it as a possible bug.
[16 Feb 2009 11:05]
Sveta Smirnova
Thank you for the feedback. But errno is system error and not MySQL error. To get MySQL error number please use function mysql_errno (http://dev.mysql.com/doc/refman/5.1/en/mysql-errno.html): Running main() i=0 errno=4 old_errno=0 mysql_error=Can't connect to MySQL server on '127.0.0.1' (4), mysql_errno=2003 Ending main() So this is still looks not as MySQL bug for me.
[17 Mar 2009 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[9 May 2012 6:32]
MySQL Verification Team
see http://bugs.mysql.com/bug.php?id=64333