diff options
author | unknown <aivanov@mysql.com> | 2006-04-05 01:09:07 +0400 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2006-04-05 01:09:07 +0400 |
commit | ec984b8c9d758132a32bfcdea9c6212d3826a191 (patch) | |
tree | b8a537f5ba78842f7fb147123c69df7ed9182a00 /mysql-test/r/insert.result | |
parent | 9cc49085b0e83040817e824c74cdd3d0940718ba (diff) | |
download | mariadb-git-ec984b8c9d758132a32bfcdea9c6212d3826a191.tar.gz |
Fixed BUG#13683: INSERT DELAYED into a view creates an infinite loop.
The bug was caused by wrong behaviour of mysql_insert() which in case
of INSERT DELAYED into a view exited with thd->net.report_error == 0.
This blocked error reporting to the client which started waiting
infinitely for response to the query.
mysql-test/r/insert.result:
Fixed results for the added test case.
mysql-test/t/insert.test:
Added test case.
sql/sql_insert.cc:
Fixed BUG#13683: INSERT DELAYED into a view creates an infinite loop.
Changed mysql_insert(): delayed_get_table() applied to a view exits
with ER_WRONG_OBJECT error (and with thd->net.report_error == 1) and
in this case we must just exit from mysql_insert(). Prior to this
change, instead of exiting open_and_lock_tables() was invoked which
cleared thd->net.report_error to zero and caused the bug.
Diffstat (limited to 'mysql-test/r/insert.result')
-rw-r--r-- | mysql-test/r/insert.result | 6 |
1 files changed, 6 insertions, 0 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; |