[CP] [to #52517941] fix SQL SECURITY clause in SHOW CREATE FUNCTION
This commit is contained in:
@ -4300,7 +4300,7 @@ int ObSchemaPrinter::print_routine_definition_v2_mysql(
|
|||||||
OZ (databuff_printf(buf, buf_len, pos, "%s",
|
OZ (databuff_printf(buf, buf_len, pos, "%s",
|
||||||
routine_info.is_deterministic() ? "\n DETERMINISTIC" : ""));
|
routine_info.is_deterministic() ? "\n DETERMINISTIC" : ""));
|
||||||
OZ (databuff_printf(buf, buf_len, pos, "%s",
|
OZ (databuff_printf(buf, buf_len, pos, "%s",
|
||||||
routine_info.is_invoker_right() ? "\n INVOKER" : ""));
|
routine_info.is_invoker_right() ? "\n SQL SECURITY INVOKER" : ""));
|
||||||
if (OB_SUCC(ret) && OB_NOT_NULL(routine_info.get_comment())) {
|
if (OB_SUCC(ret) && OB_NOT_NULL(routine_info.get_comment())) {
|
||||||
OZ (databuff_printf(buf, buf_len, pos, "\n COMMENT '%.*s'",
|
OZ (databuff_printf(buf, buf_len, pos, "\n COMMENT '%.*s'",
|
||||||
routine_info.get_comment().length(),
|
routine_info.get_comment().length(),
|
||||||
|
|||||||
@ -793,7 +793,7 @@ show create procedure chistics|
|
|||||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||||
chistics STRICT_ALL_TABLES CREATE DEFINER = `admin`@`%` PROCEDURE `chistics`()
|
chistics STRICT_ALL_TABLES CREATE DEFINER = `admin`@`%` PROCEDURE `chistics`()
|
||||||
MODIFIES SQL DATA
|
MODIFIES SQL DATA
|
||||||
INVOKER
|
SQL SECURITY INVOKER
|
||||||
COMMENT 'Characteristics procedure test'
|
COMMENT 'Characteristics procedure test'
|
||||||
insert into t1 values ("chistics", 1) utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
|
insert into t1 values ("chistics", 1) utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
|
||||||
drop procedure chistics|
|
drop procedure chistics|
|
||||||
@ -808,7 +808,7 @@ show create function chistics|
|
|||||||
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||||
chistics STRICT_ALL_TABLES CREATE DEFINER = `admin`@`%` FUNCTION `chistics`() RETURNS int(11)
|
chistics STRICT_ALL_TABLES CREATE DEFINER = `admin`@`%` FUNCTION `chistics`() RETURNS int(11)
|
||||||
DETERMINISTIC
|
DETERMINISTIC
|
||||||
INVOKER
|
SQL SECURITY INVOKER
|
||||||
COMMENT 'Characteristics procedure test'
|
COMMENT 'Characteristics procedure test'
|
||||||
return 42 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
|
return 42 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
|
||||||
select chistics()|
|
select chistics()|
|
||||||
@ -822,7 +822,7 @@ Function sql_mode Create Function character_set_client collation_connection Data
|
|||||||
chistics STRICT_ALL_TABLES CREATE DEFINER = `admin`@`%` FUNCTION `chistics`() RETURNS int(11)
|
chistics STRICT_ALL_TABLES CREATE DEFINER = `admin`@`%` FUNCTION `chistics`() RETURNS int(11)
|
||||||
NO SQL
|
NO SQL
|
||||||
DETERMINISTIC
|
DETERMINISTIC
|
||||||
INVOKER
|
SQL SECURITY INVOKER
|
||||||
COMMENT 'Characteristics function test'
|
COMMENT 'Characteristics function test'
|
||||||
return 42 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
|
return 42 utf8mb4 utf8mb4_general_ci utf8mb4_general_ci
|
||||||
drop function chistics|
|
drop function chistics|
|
||||||
|
|||||||
Reference in New Issue
Block a user