summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/t/sp-error.test25
-rw-r--r--mysql-test/t/udf.test18
2 files changed, 40 insertions, 3 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index ad516f028e6..a956a246770 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -1763,7 +1763,7 @@ drop procedure bug15091;
drop function if exists bug16896;
--enable_warnings
---error ER_SP_NO_AGGREGATE
+--error ER_PARSE_ERROR
create aggregate function bug16896() returns int return 1;
#
@@ -2200,6 +2200,29 @@ END|
--delimiter ;
#
+# Bug#29816 Syntactically wrong query fails with misleading error message
+#
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest;
+--enable_warnings
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+# Both ER_SP_DOES_NOT_EXIST and ER_PARSE_ERROR are valid here,
+# the result is implementation dependent:
+# See Bug#29816 for details
+--error ER_SP_DOES_NOT_EXIST
+SELECT inexistent(), 1 + ,;
+--error ER_SP_DOES_NOT_EXIST
+SELECT inexistent();
+--error ER_PARSE_ERROR
+SELECT .inexistent();
+--error ER_PARSE_ERROR
+SELECT ..inexistent();
+USE test;
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test
index 2f1d197cb9e..23d5111be8e 100644
--- a/mysql-test/t/udf.test
+++ b/mysql-test/t/udf.test
@@ -113,11 +113,11 @@ DROP TABLE bug19904;
# Bug#21269: DEFINER-clause is allowed for UDF-functions
#
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
CREATE DEFINER=CURRENT_USER() FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
---error ER_WRONG_USAGE
+--error ER_PARSE_ERROR
CREATE DEFINER=someone@somewhere FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
#
@@ -363,6 +363,20 @@ drop table t1;
drop function metaphon;
set GLOBAL query_cache_size=default;
+#
+# Bug#28318 CREATE FUNCTION (UDF) requires a schema
+#
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest;
+--enable_warnings
+CREATE DATABASE mysqltest;
+USE mysqltest;
+DROP DATABASE mysqltest;
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+DROP FUNCTION metaphon;
+USE test;
#
# Bug #29804 UDF parameters don't contain correct string length