summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp_missing_4665.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/sp_missing_4665.test')
-rw-r--r--mysql-test/t/sp_missing_4665.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/sp_missing_4665.test b/mysql-test/t/sp_missing_4665.test
new file mode 100644
index 00000000000..19e845e58c7
--- /dev/null
+++ b/mysql-test/t/sp_missing_4665.test
@@ -0,0 +1,9 @@
+#
+# MDEV-4665 crash when referencing missing function in a subquery
+#
+create table t (a int);
+create or replace view v as select 1 from t where a;
+--error ER_SP_DOES_NOT_EXIST
+delete from v where (select g());
+drop view v;
+drop table t;