diff options
author | unknown <evgen@moonbone.local> | 2005-07-18 19:37:42 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-07-18 19:37:42 +0400 |
commit | 3e5cbdbb221c331e34953c831d72130a10c7f7d7 (patch) | |
tree | 8555a1df98205cd318b5558085b136463a640782 /mysql-test/t/update.test | |
parent | 435a1c9392f9ed75f87f574abd9902c718bb71c1 (diff) | |
parent | cc57265b5df73742c7e0f73d8737a534fa96c1fd (diff) | |
download | mariadb-git-3e5cbdbb221c331e34953c831d72130a10c7f7d7.tar.gz |
Merge moonbone.local:/work/mysql-4.1-bug-11868
into moonbone.local:/work/mysql-5.0-bug-11482
mysql-test/r/update.result:
Auto merged
mysql-test/t/update.test:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r-- | mysql-test/t/update.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index 21789a550b9..66b3a2886b6 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -201,3 +201,16 @@ analyze table t1,t2; update t1, t2 set t1.a = t2.a where t2.b = t1.b; show warnings; drop table t1, t2; + +# +# Bug #11868 Update with subquery with ref built with a key from the updated +# table crashes server +# +create table t1(f1 int, f2 int); +create table t2(f3 int, f4 int); +create index idx on t2(f3); +insert into t1 values(1,0),(2,0); +insert into t2 values(1,1),(2,2); +UPDATE t1 SET t1.f2=(SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1); +select * from t1; +drop table t1,t2; |