mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
52 lines
910 B
Text
52 lines
910 B
Text
--source include/galera_cluster.inc
|
|
--source include/have_innodb.inc
|
|
|
|
#
|
|
# Test CREATE PROCEDURE
|
|
#
|
|
|
|
--connection node_1
|
|
CREATE USER 'user1';
|
|
CREATE TABLE t1 (f1 INTEGER);
|
|
|
|
CREATE
|
|
DEFINER = 'user1'
|
|
PROCEDURE p1 (IN param1 INTEGER, OUT param2 INTEGER, INOUT param3 INTEGER)
|
|
COMMENT 'p1_comment'
|
|
LANGUAGE SQL
|
|
NOT DETERMINISTIC
|
|
MODIFIES SQL DATA
|
|
SQL SECURITY DEFINER
|
|
INSERT INTO t1 VALUES (1);
|
|
GRANT EXECUTE ON PROCEDURE p1 TO user1;
|
|
|
|
CREATE
|
|
DEFINER = CURRENT_USER
|
|
PROCEDURE p2 (param VARCHAR(100))
|
|
DETERMINISTIC
|
|
NO SQL
|
|
SQL SECURITY INVOKER BEGIN END ;
|
|
|
|
--connection node_1
|
|
SHOW CREATE PROCEDURE p1;
|
|
|
|
--connection node_2
|
|
# Perform causal wait
|
|
SELECT 1 FROM DUAL;
|
|
SHOW CREATE PROCEDURE p1;
|
|
|
|
--connection node_1
|
|
SHOW CREATE PROCEDURE p2;
|
|
|
|
--connection node_2
|
|
SHOW CREATE PROCEDURE p2;
|
|
|
|
CALL p1(@a, @b, @c);
|
|
CALL p2('abc');
|
|
|
|
--connection node_1
|
|
DROP PROCEDURE p1;
|
|
DROP PROCEDURE p2;
|
|
|
|
DROP USER 'user1';
|
|
DROP TABLE t1;
|