summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAxel Schwenke <axel@mysql.com>2012-07-19 13:21:53 +0200
committerAxel Schwenke <axel@mysql.com>2012-07-19 13:21:53 +0200
commit1b1b36ab3e28a465ca6a8e2cfa9b8535dd35d632 (patch)
tree34186fc868f042728a8d36940b827e3f6b58f81d /mysql-test
parent72a5542f0ef1fbc36aabc511f18855f302906501 (diff)
parent79c4b4e44008a3ba1ba9a5c947a0ffea6a6b54a2 (diff)
downloadmariadb-git-1b1b36ab3e28a465ca6a8e2cfa9b8535dd35d632.tar.gz
merged with maria/5.5
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/view.result13
-rw-r--r--mysql-test/t/view.test13
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 008f8f41ada..b50f6b81206 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4674,6 +4674,19 @@ INSERT INTO t2 VALUES (1);
DROP TRIGGER tr;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
+#
+# LP bug#1007622 Server crashes in handler::increment_statistics on
+# inserting into a view over a view
+#
+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;
+a
+1
+drop view v2,v1;
+drop table t1;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 0585073a6f5..17026e45724 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -4613,6 +4613,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 # -----------------------------------------------------------------