Bug #21794 | MYSQL_STMT operations cause seg fault after connection reset (see bug #12744) | ||
---|---|---|---|
Submitted: | 23 Aug 2006 13:36 | Modified: | 28 Sep 2006 22:03 |
Reporter: | Eric Estabrooks | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.22 | OS: | Linux (linux) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | mysql_stmt_execute, segfault, server connection lost |
[23 Aug 2006 13:36]
Eric Estabrooks
[23 Aug 2006 15:59]
MySQL Verification Team
Thank you for the bug report. Could you please provide the code test case, also have you tested against the latest 5.0.24 release? Thanks in advance.
[24 Aug 2006 3:30]
Eric Estabrooks
code sample that causes segfault
Attachment: sql_fail.c (text/x-csrc), 2.88 KiB.
[24 Aug 2006 3:31]
Eric Estabrooks
I haven't tried it against 5.0.24
[24 Aug 2006 12:50]
Eric Estabrooks
It looks like 5.0.24 has the problem as well. I installed the debian packages for 5.0.24 and the segfault still occurs. mysqld Ver 5.0.24-Debian_1-log for pc-linux-gnu on i486 mysql Ver 14.12 Distrib 5.0.24, for pc-linux-gnu (i486) using readline 5.1
[24 Aug 2006 12:56]
MySQL Verification Team
Thank you for the feedback. Then could you please provide the code/dump table test case? Thanks in advance.
[24 Aug 2006 14:01]
Eric Estabrooks
The code is already attached as a file. The table is: create table Inodes ( inode int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, rpath varchar(4095) NOT NULL, UNIQUE(inode) ); the entry in the table is: insert into Inodes(rpath) values('/\0');
[28 Aug 2006 22:03]
MySQL Verification Team
Thank you for the feedback. I tested against the current source tree and I added the below line of code for to verify if the server is sending the correct error message for to allow to quit the client application gracefully (which was the bug #12744) and I noticed the correct error message: fprintf(stderr, "res = %lu, sleeping 30 seconds, reset mysql server now\n", res); sleep(30); err = mysql_stmt_execute(stmt); if (err != 0) { /* expect the reset connection message here */ fprintf(stderr, "statement(2) execute failed: %s\n", mysql_stmt_error(stmt)); if (mysql_stmt_reset(stmt)) fprintf(stderr, "mysql_stmt_reset error: %s\n", mysql_stmt_error(stmt)); } else { miguel@hegel:~/dbs/5.0> ./bug21974 ./bug21974: /usr/lib/libmysqlclient.so.15: no version information available (required by ./bug21974) res = 1, sleeping 30 seconds, reset mysql server now statement(2) execute failed: MySQL server has gone away mysql_stmt_reset error: MySQL server has gone away Segmentation fault miguel@hegel:~/dbs/5.0> You can see above: MySQL server has gone away What you got here: if (err != 0) { /* expect the reset connection message here */ fprintf(stderr, "statement(2) execute failed: %s\n",mysql_stmt_error(stmt)); Thanks in adavance.
[28 Sep 2006 23: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".