Commit 03198127 authored by unknown's avatar unknown

Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0

into moonbone.local:/work/mysql-5.0-bug-12340

parents d3614012 71a8b11f
......@@ -2475,3 +2475,11 @@ SELECT GRADE FROM t1 WHERE GRADE= 151;
GRADE
151
DROP TABLE t1;
create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
insert into t2 values ('aa','cc');
insert into t1 values ('aa','bb'),('aa','cc');
delete t1 from t1,t2 where f1=f3 and f4='cc';
select * from t1;
f1 f2
drop table t1,t2;
......@@ -1394,3 +1394,13 @@ SELECT GRADE FROM t1 WHERE GRADE > 160 AND GRADE < 300;
SELECT GRADE FROM t1 WHERE GRADE= 151;
DROP TABLE t1;
#
# Bug #12340 multitable delete deletes only one record
#
create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
insert into t2 values ('aa','cc');
insert into t1 values ('aa','bb'),('aa','cc');
delete t1 from t1,t2 where f1=f3 and f4='cc';
select * from t1;
drop table t1,t2;
......@@ -6852,8 +6852,8 @@ ha_innobase::cmp_ref(
return(result);
}
ref1 += key_part->length;
ref2 += key_part->length;
ref1 += key_part->store_length;
ref2 += key_part->store_length;
}
return(0);
......
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