summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/compat/oracle/r/sp-package-mdl.result
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/compat/oracle/r/sp-package-mdl.result')
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package-mdl.result80
1 files changed, 80 insertions, 0 deletions
diff --git a/mysql-test/suite/compat/oracle/r/sp-package-mdl.result b/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
new file mode 100644
index 00000000..bb46341f
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/r/sp-package-mdl.result
@@ -0,0 +1,80 @@
+SET sql_mode=ORACLE;
+DO GET_LOCK('lock',300);
+connect conn1,localhost,root,,;
+SET sql_mode=ORACLE;
+CREATE PACKAGE pkg1 AS
+PROCEDURE p1;
+FUNCTION f1 RETURN INT;
+END;
+$$
+CREATE PACKAGE BODY pkg1 AS
+PROCEDURE p1 AS
+BEGIN
+DO GET_LOCK('lock',300);
+END;
+FUNCTION f1 RETURN INT AS
+BEGIN
+CALL p1;
+RETURN 1;
+END;
+END;
+$$
+SELECT pkg1.f1();
+connection default;
+connect conn2,localhost,root,,;
+SET sql_mode=ORACLE;
+DROP PACKAGE pkg1;
+connection default;
+SELECT ID-CONNECTION_ID() AS CONN,INFO,STATE,LOCK_MODE,LOCK_TYPE,TABLE_NAME
+FROM INFORMATION_SCHEMA.PROCESSLIST
+LEFT JOIN INFORMATION_SCHEMA.METADATA_LOCK_INFO
+ON (ID=THREAD_ID)
+ORDER BY ID,TABLE_NAME,LOCK_MODE,LOCK_TYPE;
+CONN 0
+INFO SELECT ID-CONNECTION_ID() AS CONN,INFO,STATE,LOCK_MODE,LOCK_TYPE,TABLE_NAME
+FROM INFORMATION_SCHEMA.PROCESSLIST
+LEFT JOIN INFORMATION_SCHEMA.METADATA_LOCK_INFO
+ON (ID=THREAD_ID)
+ORDER BY ID,TABLE_NAME,LOCK_MODE,LOCK_TYPE
+STATE Filling schema table
+LOCK_MODE MDL_SHARED_NO_WRITE
+LOCK_TYPE User lock
+TABLE_NAME
+CONN 1
+INFO DO GET_LOCK('lock',300)
+STATE User lock
+LOCK_MODE MDL_SHARED
+LOCK_TYPE Stored package body metadata lock
+TABLE_NAME pkg1
+CONN 1
+INFO DO GET_LOCK('lock',300)
+STATE User lock
+LOCK_MODE MDL_SHARED
+LOCK_TYPE Stored function metadata lock
+TABLE_NAME pkg1.f1
+CONN 1
+INFO DO GET_LOCK('lock',300)
+STATE User lock
+LOCK_MODE MDL_SHARED
+LOCK_TYPE Stored procedure metadata lock
+TABLE_NAME pkg1.p1
+CONN 2
+INFO DROP PACKAGE pkg1
+STATE Waiting for stored package body metadata lock
+LOCK_MODE MDL_BACKUP_DDL
+LOCK_TYPE Backup lock
+TABLE_NAME
+CONN 2
+INFO DROP PACKAGE pkg1
+STATE Waiting for stored package body metadata lock
+LOCK_MODE MDL_INTENTION_EXCLUSIVE
+LOCK_TYPE Schema metadata lock
+TABLE_NAME
+DO RELEASE_LOCK('lock');
+connection conn1;
+pkg1.f1()
+1
+disconnect conn1;
+connection conn2;
+disconnect conn2;
+connection default;