diff options
author | unknown <bell@sanja.is.com.ua> | 2004-09-08 13:39:15 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-09-08 13:39:15 +0300 |
commit | 6c2330407f99b0bab1db68ec38789fc10a3518ec (patch) | |
tree | 42e71f47652f97532ac4741a570233064060593d /mysql-test/r/multi_update.result | |
parent | eb72c28b9b8e7fe785e918cc1c366b4fce6fa8f6 (diff) | |
download | mariadb-git-6c2330407f99b0bab1db68ec38789fc10a3518ec.tar.gz |
check that table used in multi-update is unique added (BUG#5455)
mysql-test/r/multi_update.result:
multi* unique updating table check
mysql-test/t/multi_update.test:
multi* unique updating table check
sql/sql_lex.cc:
new method to check table only in subqueries
sql/sql_lex.h:
new method to check table only in subqueries
sql/sql_parse.cc:
used new method to check table only in subqueries
sql/sql_update.cc:
check that table is unique added
Diffstat (limited to 'mysql-test/r/multi_update.result')
-rw-r--r-- | mysql-test/r/multi_update.result | 7 |
1 files changed, 7 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; |