Commit eb3912c0 authored by serg@serg.mylan's avatar serg@serg.mylan

bug #1078. two innodb+delayed crashes

parent 58bdc6f5
......@@ -1329,3 +1329,15 @@ id label
3524 Societe Test
3525 Fournisseur Test
drop table t1,t2;
create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) type=innodb;
select * from t1;
c1 c2 stamp
replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
ERROR HY000: Table storage engine for 't1' doesn't have this option
select * from t1;
c1 c2 stamp
replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
ERROR HY000: Table storage engine for 't1' doesn't have this option
select * from t1;
c1 c2 stamp
drop table t1;
......@@ -906,3 +906,17 @@ SELECT t2.id, t1.label FROM t2 INNER JOIN
(SELECT t1.id_object as id_object FROM t1 WHERE t1.label LIKE '%test%') AS lbl
ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
drop table t1,t2;
#
# Bug #1078
#
create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) type=innodb;
select * from t1;
--error 1031
replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
select * from t1;
--error 1031
replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
select * from t1;
drop table t1;
......@@ -172,7 +172,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
else
res= (table == 0);
else
{
lock_type=TL_WRITE;
res= open_and_lock_tables(thd, table_list);
}
}
else
res= open_and_lock_tables(thd, table_list);
......@@ -627,6 +630,7 @@ class delayed_insert :public ilink {
thd.current_tablenr=0;
thd.version=refresh_version;
thd.command=COM_DELAYED_INSERT;
thd.lex.current_select= 0; /* for my_message_sql */
bzero((char*) &thd.net,sizeof(thd.net)); // Safety
thd.system_thread=1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment