diff options
author | unknown <ramil@mysql.com> | 2006-04-11 23:46:27 +0500 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2006-04-11 23:46:27 +0500 |
commit | c97aa492e53fdc93d291f19f641cda386f9abf82 (patch) | |
tree | 54ed2f55fc09b6de43580d55c2512236737cea4e | |
parent | 961725aa518b283cf5a45aa3910a08c723710625 (diff) | |
parent | 8907bf0af7a04a6ac84ee027ffdba28a0854b836 (diff) | |
download | mariadb-git-c97aa492e53fdc93d291f19f641cda386f9abf82.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b14360
-rw-r--r-- | mysql-test/r/insert.result | 6 | ||||
-rw-r--r-- | mysql-test/t/insert.test | 12 | ||||
-rw-r--r-- | sql/sql_insert.cc | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index f788576f824..00a987c9254 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -299,3 +299,9 @@ select count(*) from t2; count(*) 25500 drop table t1,t2,t3; +create table t1 (n int); +create view v1 as select * from t1; +insert delayed into v1 values (1); +ERROR HY000: 'test.v1' is not BASE TABLE +drop table t1; +drop view v1; diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index ddde6cfa5d3..0c64dd80bec 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -175,3 +175,15 @@ select count(*) from t2; insert into t2 select t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = t3.id3; select count(*) from t2; drop table t1,t2,t3; + +# +# Test for INSERT DELAYED INTO a <view> +# BUG#13683: INSERT DELAYED into a view creates an infinite loop +# + +create table t1 (n int); +create view v1 as select * from t1; +--error 1347 +insert delayed into v1 values (1); +drop table t1; +drop view v1; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 67aab57b880..320b8e1df9d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -321,7 +321,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, if (!table_list->derived && !table_list->view) table_list->updatable= 1; // usual table } - else + else if (thd->net.last_errno != ER_WRONG_OBJECT) { /* Too many delayed insert threads; Use a normal insert */ table_list->lock_type= lock_type= TL_WRITE; |