mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixing BUG#15658: Server crashes after creating function as empty string
Empty strings (and names with trailing spaces) should not be allowed. mysql-test/r/sp-error.result: New testcase for BUG#15658 mysql-test/t/sp-error.test: New testcase for BUG#15658 sql/share/errmsg.txt: New error message for bad stored routine names. sql/sp_head.cc: Added function for checking SP names. (Mustn't be empty or contain trailing spaces.) sql/sp_head.h: Added function for checking SP names. sql/sql_yacc.yy: Check db and name for stored routines.
This commit is contained in:
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user