1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-32101 CREATE PACKAGE [BODY] for sql_mode=DEFAULT

This patch adds PACKAGE support with SQL/PSM dialect for sql_mode=DEFAULT:

- CREATE PACKAGE
- DROP PACKAGE
- CREATE PACKAGE BODY
- DROP PACKAGE BODY
- Package function and procedure invocation from outside of the package:
    -- using two step identifiers
    SELECT pkg.f1();
    CALL pkg.p1()

    -- using three step identifiers
    SELECT db.pkg.f1();
    CALL db.pkg.p1();

This is a non-standard MariaDB extension.

However, later this code can be used to implement
the SQL Standard and DB2 dialects of CREATE MODULE.
This commit is contained in:
Alexander Barkov
2023-09-04 15:28:50 +04:00
parent 9bd95e914f
commit aed9c656a9
21 changed files with 4866 additions and 3547 deletions

View File

@@ -2628,7 +2628,7 @@ Sp_handler::sp_resolve_package_routine(THD *thd,
const Sp_handler **pkg_routine_handler,
Database_qualified_name *pkgname) const
{
if (!thd->db.length || !(thd->variables.sql_mode & MODE_ORACLE))
if (!thd->db.length)
return false;
return name->m_explicit_name ?