summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2006-01-19 11:48:07 +0100
committerunknown <pem@mysql.com>2006-01-19 11:48:07 +0100
commit663fe66468143aa457a93bd180998d8187d53ca6 (patch)
tree77998d0059ac8f7e597b7ada28b273f939d4a8d5 /mysql-test
parent48ac5c4a2b241d8fcc8f7266b4192664855e0ee6 (diff)
parent1e968057523db1313438368812b99a38ba460542 (diff)
downloadmariadb-git-663fe66468143aa457a93bd180998d8187d53ca6.tar.gz
Merge mysql.com:/extern/mysql/bk/mysql-5.0
into mysql.com:/extern/mysql/work/bug15658/mysql-5.0 mysql-test/r/sp-error.result: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_yacc.yy: Auto merged sql/share/errmsg.txt: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp-error.result19
-rw-r--r--mysql-test/t/sp-error.test27
2 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 9a148c3516e..8483f6dc664 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -1128,3 +1128,22 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
drop function bug11555_1;
drop table t1;
drop view v1;
+drop procedure if exists ` bug15658`;
+create procedure ``() select 1;
+ERROR 42000: Incorrect routine name ''
+create procedure ` `() select 1;
+ERROR 42000: Incorrect routine name ' '
+create procedure `bug15658 `() select 1;
+ERROR 42000: Incorrect routine name 'bug15658 '
+create procedure ``.bug15658() select 1;
+ERROR 42000: Incorrect database name ''
+create procedure `x `.bug15658() select 1;
+ERROR 42000: Incorrect database name 'x '
+create procedure ` bug15658`() select 1;
+call ` bug15658`();
+1
+1
+show procedure status;
+Db Name Type Definer Modified Created Security_type Comment
+test bug15658 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
+drop procedure ` bug15658`;
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index cf8f8dfc79c..25944144d21 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -1556,6 +1556,7 @@ drop procedure bug13012_1|
drop function bug13012_2|
delimiter ;|
+#
# BUG#11555 "Stored procedures: current SP tables locking make
# impossible view security". We should not expose names of tables
# which are implicitly used by view (via stored routines/triggers).
@@ -1616,7 +1617,33 @@ drop function bug11555_1;
drop table t1;
drop view v1;
+#
+# BUG#15658: Server crashes after creating function as empty string
+#
+--disable_warnings
+drop procedure if exists ` bug15658`;
+--enable_warnings
+
+--error ER_SP_WRONG_NAME
+create procedure ``() select 1;
+--error ER_SP_WRONG_NAME
+create procedure ` `() select 1;
+--error ER_SP_WRONG_NAME
+create procedure `bug15658 `() select 1;
+--error ER_WRONG_DB_NAME
+create procedure ``.bug15658() select 1;
+--error ER_WRONG_DB_NAME
+create procedure `x `.bug15658() select 1;
+# This should work
+create procedure ` bug15658`() select 1;
+call ` bug15658`();
+--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
+show procedure status;
+drop procedure ` bug15658`;
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings