Bug #1078 insert|replace delayed brings service down
Submitted: 18 Aug 2003 10:03 Modified: 22 Aug 2003 8:52
Reporter: Hans Van_Harten Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:4.1.0-alpha-max-nt OS:Windows (windows XP SP1)
Assigned to: Sergei Golubchik CPU Architecture:Any

[18 Aug 2003 10:03] Hans Van_Harten
Description:
Running the sample code from MySQLcc the response to the 6th statement is 
'ERROR 2013: Lost connection to MySQL server during query'
To get the server back on its feet, 'net start mysql' is required.

Report chagned to 'ERROR 1031: Table handler for 't1' doesn't have this option' is reported after removing 'default_table_type=innodb' from my.ini.

Either using 'type (My)ISAM' or removing the DELAYED option solves both. However, on the second replace statement none of the four records is processed, that is inconsistent to the behaviour of 'LOAD INTO ... INFILE ...'

How to repeat:
create database if not exists D1;
use D1;
drop table if exists T1 ;
create table  if not exists T1 ( C1 char(5) unique not null, C2 int, stamp timestamp  ) type=InnoDB;
select * from T1;
replace delayed into T1 (C1, C2)  values ( "text1","11"),( "text2","12");
select * from T1;
replace delayed into T1 (C1, C2)  values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
select * from T1;

Suggested fix:
If DELAYED is not supported for a table type at least parse it gracefull, just like the FOREIGN KEY option in CREATE TABLE.

A new parameter pe 'IGNORE_BAD_DATA' might make insert|replace more consistent with the handling of mailformed records by 'LOAD INTO INFILE'. Then, in version 4.1.1, all failing records should be listed through 'show warnings' too.
[20 Aug 2003 22:04] MySQL Verification Team
Thank you for the bug report I was able to repeat with the release 4.1.0
and with a more recent bk tree server. Below the back trace:

mysqld.exe!my_message_sql(unsigned int error=1031, const char * str=0x05c1fd5c,
    int MyFlags=0)  Line 1838 + 0x15	C++
mysqld.exe!my_error(int nr=1031, int MyFlags=0, ...)  Line 109 + 0x3d	C
mysqld.exe!handle_delayed_insert(void * arg=0x03258058)  Line 1057 + 0x16	C++
mysqld.exe!pthread_start(void * param=0x0324fdd8)  Line 63 + 0x7	C
mysqld.exe!_threadstart(void * ptd=0x011fa498)  Line 173 + 0xd	C
KERNEL32.DLL!7969987c()
[22 Aug 2003 8:52] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html