mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed BUG#6027: Stored procedures can be renamed.
Removed the support for renaming SPs. It's non-standard, conflicted with a standard syntax, and was a bit broken anyway. mysql-test/r/sp-error.result: Removed test for renaming procedures with alter. mysql-test/r/sp.result: Removed test for renaming procedures with alter. mysql-test/t/sp-error.test: Removed test for renaming procedures with alter. mysql-test/t/sp.test: Removed test for renaming procedures with alter. sql/sp.cc: Removed support for renaming SPs. It's non-standard, conflicted with a standard syntax, and was a bit broken anyway. sql/sp.h: Removed support for renaming SPs. It's non-standard, conflicted with a standard syntax, and was a bit broken anyway. sql/sql_parse.cc: Removed support for renaming SPs. It's non-standard, conflicted with a standard syntax, and was a bit broken anyway. sql/sql_yacc.yy: Removed support for renaming SPs. It's non-standard, conflicted with a standard syntax, and was a bit broken anyway.
This commit is contained in:
@ -235,9 +235,6 @@ ERROR 24000: Cursor is not open
|
||||
drop procedure p|
|
||||
alter procedure bar3 sql security invoker|
|
||||
ERROR 42000: PROCEDURE test.bar3 does not exist
|
||||
alter procedure bar3 name
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|
|
||||
ERROR 42000: Identifier name 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' is too long
|
||||
drop table t1|
|
||||
drop table if exists t1|
|
||||
create table t1 (val int, x float)|
|
||||
|
@ -893,15 +893,15 @@ select * from t1|
|
||||
id data
|
||||
chistics 1
|
||||
delete from t1|
|
||||
alter procedure chistics sql security invoker name chistics2|
|
||||
show create procedure chistics2|
|
||||
alter procedure chistics sql security invoker|
|
||||
show create procedure chistics|
|
||||
Procedure sql_mode Create Procedure
|
||||
chistics2 CREATE PROCEDURE `test`.`chistics2`()
|
||||
chistics CREATE PROCEDURE `test`.`chistics`()
|
||||
MODIFIES SQL DATA
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Characteristics procedure test'
|
||||
insert into t1 values ("chistics", 1)
|
||||
drop procedure chistics2|
|
||||
drop procedure chistics|
|
||||
create function chistics() returns int
|
||||
language sql
|
||||
deterministic
|
||||
@ -918,18 +918,18 @@ return 42
|
||||
select chistics()|
|
||||
chistics()
|
||||
42
|
||||
alter function chistics name chistics2
|
||||
alter function chistics
|
||||
no sql
|
||||
comment 'Characteristics function test'|
|
||||
show create function chistics2|
|
||||
show create function chistics|
|
||||
Function sql_mode Create Function
|
||||
chistics2 CREATE FUNCTION `test`.`chistics2`() RETURNS int
|
||||
chistics CREATE FUNCTION `test`.`chistics`() RETURNS int
|
||||
NO SQL
|
||||
DETERMINISTIC
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Characteristics function test'
|
||||
return 42
|
||||
drop function chistics2|
|
||||
drop function chistics|
|
||||
insert into t1 values ("foo", 1), ("bar", 2), ("zip", 3)|
|
||||
set @@sql_mode = 'ANSI'|
|
||||
create procedure modes(out c1 int, out c2 int)
|
||||
@ -2136,8 +2136,8 @@ insert into test.t1 values (x, y)|
|
||||
show procedure status like 'bar'|
|
||||
Db Name Type Definer Modified Created Security_type Comment
|
||||
test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER 111111111111
|
||||
alter procedure bar name bar2 comment "2222222222" sql security definer|
|
||||
alter procedure bar2 name bar comment "3333333333"|
|
||||
alter procedure bar comment "2222222222" sql security definer|
|
||||
alter procedure bar comment "3333333333"|
|
||||
alter procedure bar|
|
||||
show create procedure bar|
|
||||
Procedure sql_mode Create Procedure
|
||||
|
@ -307,9 +307,6 @@ drop procedure p|
|
||||
|
||||
--error 1305
|
||||
alter procedure bar3 sql security invoker|
|
||||
--error 1059
|
||||
alter procedure bar3 name
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|
|
||||
|
||||
drop table t1|
|
||||
|
||||
|
@ -990,9 +990,9 @@ show create procedure chistics|
|
||||
call chistics()|
|
||||
select * from t1|
|
||||
delete from t1|
|
||||
alter procedure chistics sql security invoker name chistics2|
|
||||
show create procedure chistics2|
|
||||
drop procedure chistics2|
|
||||
alter procedure chistics sql security invoker|
|
||||
show create procedure chistics|
|
||||
drop procedure chistics|
|
||||
|
||||
create function chistics() returns int
|
||||
language sql
|
||||
@ -1004,11 +1004,11 @@ create function chistics() returns int
|
||||
show create function chistics|
|
||||
# Call it, just to make sure.
|
||||
select chistics()|
|
||||
alter function chistics name chistics2
|
||||
alter function chistics
|
||||
no sql
|
||||
comment 'Characteristics function test'|
|
||||
show create function chistics2|
|
||||
drop function chistics2|
|
||||
show create function chistics|
|
||||
drop function chistics|
|
||||
|
||||
|
||||
# Check mode settings
|
||||
@ -2268,8 +2268,8 @@ create procedure bar(x char(16), y int)
|
||||
insert into test.t1 values (x, y)|
|
||||
--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
|
||||
show procedure status like 'bar'|
|
||||
alter procedure bar name bar2 comment "2222222222" sql security definer|
|
||||
alter procedure bar2 name bar comment "3333333333"|
|
||||
alter procedure bar comment "2222222222" sql security definer|
|
||||
alter procedure bar comment "3333333333"|
|
||||
alter procedure bar|
|
||||
show create procedure bar|
|
||||
--replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
|
||||
|
Reference in New Issue
Block a user