summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/compat/oracle/r/sp-package-concurrent-dml-package.result
blob: eb7d38a8f673c1bb398c1fab517e09ab894baeb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# MDEV-15070 Crash when doing a CREATE VIEW inside a package routine
#
SET @object_type='package_replace_pkg1';
#
# Start of sp-package-concurrent-dml.inc
#
SET sql_mode=ORACLE;
CREATE PACKAGE pkg1 AS
PROCEDURE p1;
END;
$$
CREATE PACKAGE BODY pkg1 AS
PROCEDURE p2 AS
BEGIN
SELECT 'This is p2' AS msg;
END;
PROCEDURE p1 AS
BEGIN
SELECT 'This is p1' AS msg;
DO GET_LOCK('mdev15070',120);
CALL p2();
DO RELEASE_LOCK('mdev15070');
END;
END;
$$
connect  con2,localhost,root;
connection con2;
DO GET_LOCK('mdev15070', 120);
connection default;
CALL pkg1.p1;
connection con2;
SET sql_mode=ORACLE;
CREATE OR REPLACE PACKAGE pkg1 AS
PROCEDURE p1;
END;
$$
DROP PACKAGE pkg1;
DO RELEASE_LOCK('mdev15070');
disconnect con2;
connection default;
msg
This is p1
msg
This is p2
DROP PACKAGE IF EXISTS pkg1;
Warnings:
Note	1305	PACKAGE test.pkg1 does not exist
SET @object_type='package_body_replace_pkg1';
#
# Start of sp-package-concurrent-dml.inc
#
SET sql_mode=ORACLE;
CREATE PACKAGE pkg1 AS
PROCEDURE p1;
END;
$$
CREATE PACKAGE BODY pkg1 AS
PROCEDURE p2 AS
BEGIN
SELECT 'This is p2' AS msg;
END;
PROCEDURE p1 AS
BEGIN
SELECT 'This is p1' AS msg;
DO GET_LOCK('mdev15070',120);
CALL p2();
DO RELEASE_LOCK('mdev15070');
END;
END;
$$
connect  con2,localhost,root;
connection con2;
DO GET_LOCK('mdev15070', 120);
connection default;
CALL pkg1.p1;
connection con2;
SET sql_mode=ORACLE;
CREATE OR REPLACE PACKAGE BODY pkg1 AS
PROCEDURE p1 AS
BEGIN
SELECT 'This is p1 version 2' AS msg;
END;
END;
$$
DROP PACKAGE pkg1;
DO RELEASE_LOCK('mdev15070');
disconnect con2;
connection default;
msg
This is p1
msg
This is p2
DROP PACKAGE IF EXISTS pkg1;
Warnings:
Note	1305	PACKAGE test.pkg1 does not exist