summaryrefslogtreecommitdiff
path: root/mysql-test/t/view.test
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-06-26 21:43:34 +0300
committerunknown <sanja@montyprogram.com>2012-06-26 21:43:34 +0300
commit1b84c0cfee4db6f0a6c97459a47444ed1f0d6ce1 (patch)
treeff1b4efbdc46359d4de4ca1bd51e03ecca646cba /mysql-test/t/view.test
parent20f3f4a273202ef539314acbbdbb67ab91376ab6 (diff)
downloadmariadb-git-1b84c0cfee4db6f0a6c97459a47444ed1f0d6ce1.tar.gz
Fix for LP bug#1007622
TABLE_LIST::check_single_table made aware about fact that now if table attached to a merged view it can be (unopened) temporary table (in 5.2 it was always leaf table or non (in case of several tables)).
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r--mysql-test/t/view.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 93e0cce8a5d..6f11d6909ea 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -4420,6 +4420,19 @@ DROP TRIGGER tr;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
+--echo #
+--echo # LP bug#1007622 Server crashes in handler::increment_statistics on
+--echo # inserting into a view over a view
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a1.* FROM t1 AS a1, t1 AS a2;
+CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM v1;
+INSERT INTO v2 (a) VALUES (1) ;
+select * from t1;
+drop view v2,v1;
+drop table t1;
+
--echo # -----------------------------------------------------------------
--echo # -- End of 5.3 tests.
--echo # -----------------------------------------------------------------