Bug #30074 Crash: Insert 2M rows & shutdown & restart & insert 2M rows & delete
Submitted: 26 Jul 2007 17:15 Modified: 31 Dec 2007 14:55
Reporter: Miguel Solorzano
Status: Closed
Category:Server: Falcon Severity:S1 (Critical)
Version:6.0.1 OS:Microsoft Windows (Vista X64)
Assigned to: Christopher Powers Target Version:
Tags: crash
Triage: D2 (Serious)

[26 Jul 2007 17:15] Miguel Solorzano
Description:
Inserting 2 millions rows, shutdown and restart the server and then insert
again 2 millions followed by a delete, crash the server.

How to repeat:
Start the server:

mysqld-nt --standalone --console --default-storage-engine=falcon

Create the table:

use test;
create table tbkill (id serial, col1 varchar(1000));
insert into tbkill (col1) values (repeat("A",1000));
insert into tbkill (col1) select col1 from tbkill;

issue the last command above until get around 2 millions rows and
shutdown the server. Start the server again and issue the below
commands:

insert into tbkill (col1) select col1 from tbkill;
delete from tbkill;

The server dies with the below message:

Version: '6.0.1-alpha-nt'  socket: ''  port: 3306  Source distribution

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
[26 Jul 2007 18:41] Hakan Kuecuekyilmaz
Could not repeat on 8GB system:

mysql> insert into tbkill (col1) select col1 from tbkill;
Query OK, 1048576 rows affected (1 min 44.09 sec)
Records: 1048576  Duplicates: 0  Warnings: 0

mysql> Bye
hakan@lu0009:~> mysqladmin -uroot shutdown
hakan@lu0009:~> mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.2-alpha Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> insert into tbkill (col1) select col1 from tbkill;
Query OK, 2097152 rows affected (4 min 35.85 sec)
Records: 2097152  Duplicates: 0  Warnings: 0

mysql> delete from tbkill;
Query OK, 4194304 rows affected (1 min 48.34 sec)
[26 Jul 2007 19:06] Hakan Kuecuekyilmaz
While deleting the 4 million rows mysqld's memory went up to 6.5 GB.
[14 Aug 2007 10:51] Christoffer Hall
This is the same bug as 30251. So code pushed.
[3 Dec 2007 14:36] Hakan Kuecuekyilmaz
Yes that's the fix. We don't crash anymore when record memory is exhausted.

Thanks,

Hakan
[31 Dec 2007 14:55] MC Brown
A note has been added to the 6.0.2 changelog: 

 When loading large data sets into a Falcon table
 mysqld could crash. An Out of memory error
 will now be raised in this situation.