Bug #2621 Server crash while executing select into existing outfile.
Submitted: 3 Feb 2004 1:19 Modified: 3 Feb 2004 11:41
Reporter: Andrzej Pruski Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.1 OS:Linux (Linux)
Assigned to: Dean Ellis CPU Architecture:Any

[3 Feb 2004 1:19] Andrzej Pruski
Description:
Attempt to execute any select into existing outfile causes server crash.

How to repeat:
mysql> select 1 into outfile "test.txt";
Query OK, 1 row affected (0.00 sec)
mysql> select 1 into outfile "test.txt";
ERROR 1086 (HY000): File 'test.txt' already exists
mysql> select 1 into outfile "test2.txt";
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: aste
..........................................................
error.log:

mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
                                                                                                   
key_buffer_size=134217728
read_buffer_size=16773120
max_used_connections=4
max_connections=50
threads_connected=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1359671 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
                                                                                                   
thd=0x8687588
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbfe7ef28, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8089167
0x82da818
0x82d6ef6
0x82b64d0
0x8081b3a
0x80b48ac
0x8096b1a
0x809b3f1
0x80957ff
0x8095192
0x8094907
0x82d7fcc
0x830b8fa
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow instructions on how to restack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8690808 = select 1 into outfile "test.txt"
thd->thread_id=8
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
                                                                                                   
Number of processes running now: 0
040203 10:13:07  mysqld restarted
[3 Feb 2004 11:21] Dean Ellis
This is a duplicate of bug #2123, and has been corrected in 4.1.2.

Thank you.
[3 Feb 2004 11:41] MySQL Verification Team
Fixed in 4.1.2:

[/mnt/work/mysql-4.1]$ ./client/mysql bug -e "select 1 into outfile 'text.txt'"
[/mnt/work/mysql-4.1]$ ./client/mysql bug -e "select 1 into outfile 'text.txt'"
ERROR 1086 at line 1: File 'text.txt' already exists
[/mnt/work/mysql-4.1]$ ./client/mysql bug -e "select 1 into outfile 'text.txt'"
ERROR 1086 at line 1: File 'text.txt' already exists
[