summaryrefslogtreecommitdiff
path: root/mysql-test/t/view.test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-04-04 11:00:25 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2017-04-07 17:56:21 +0200
commit27f6b11a97c8c95cb6d4e282e101c484c8acf281 (patch)
treefa24871f863d30c0f3ddb39d6ba54976b1b2474d /mysql-test/t/view.test
parenta33653eedb42a99568d9e7b4c3f4576e73ba3726 (diff)
downloadmariadb-git-27f6b11a97c8c95cb6d4e282e101c484c8acf281.tar.gz
MDEV-12379: Server crashes in TABLE_LIST::is_with_table on SHOW CREATE VIEW
In case of error on opening VIEW (absent table for example) it is still possible to print its definition but some variable is not set (table_list->derived->derived) so it is better do not try to test it when there is safer alternative (table_list itself).
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r--mysql-test/t/view.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index cb658b5146f..bab640e1371 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -6186,6 +6186,18 @@ REPLACE INTO v (f1,f2) VALUES (1,1);
drop view v;
drop table t1,t2,t3;
+
+--echo #
+--echo # MDEV-12379: Server crashes in TABLE_LIST::is_with_table on
+--echo # SHOW CREATE VIEW
+--echo #
+
+CREATE TABLE t (i INT);
+CREATE VIEW v AS SELECT * FROM ( SELECT * FROM t ) sq;
+DROP TABLE IF EXISTS t;
+SHOW CREATE VIEW v;
+DROP VIEW v;
+
--echo #
--echo # End of 10.2 tests
--echo #