diff options
author | unknown <bell@sanja.is.com.ua> | 2004-09-16 17:47:53 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-09-16 17:47:53 +0300 |
commit | e754501a1256129baf9c8eb9e0f79a9ca2f56313 (patch) | |
tree | 9c788da0200b12528d96a708e9fb19bcbb791ec7 /mysql-test | |
parent | 3b4c38336d554ecddec1ad41f60c50fff15a702d (diff) | |
parent | 6c2330407f99b0bab1db68ec38789fc10a3518ec (diff) | |
download | mariadb-git-e754501a1256129baf9c8eb9e0f79a9ca2f56313.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-update-4.1
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/multi_update.result | 7 | ||||
-rw-r--r-- | mysql-test/t/multi_update.test | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 39ec9ff4eb9..780ceb36ad6 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -455,3 +455,10 @@ create table t3 (a int, primary key (a)); delete t1,t3 from t1,t2 where t1.a=t2.a and t2.a=(select t3.a from t3 where t1.a=t3.a); ERROR 42S02: Unknown table 't3' in MULTI DELETE drop table t1, t2, t3; +create table t1 (col1 int); +create table t2 (col1 int); +update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +drop table t1,t2; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index c2814606aa2..40e742679f8 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -417,3 +417,14 @@ create table t3 (a int, primary key (a)); -- error 1109 delete t1,t3 from t1,t2 where t1.a=t2.a and t2.a=(select t3.a from t3 where t1.a=t3.a); drop table t1, t2, t3; + +# +# multi* unique updating table check +# +create table t1 (col1 int); +create table t2 (col1 int); +-- error 1093 +update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; +-- error 1093 +delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; +drop table t1,t2; |