SQL Server compatibility (MDEV-32521)

[MDEV-32522] sql_mode=MSSQL: Transact-SQL dialect for CREATE PROCEDURE Created: 2023-10-19  Updated: 2023-12-22

Status: Open
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: None
Fix Version/s: 11.5

Type: Technical task Priority: Major
Reporter: Alexander Barkov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Let's implement a Transact-SQL procedural language parser for sql_mode=MSSQL, so users migrating from SQL Server to MariaDB do not have to rewrite their stored procedures.

CREATE PROCEDURE grammar

CREATE [ OR ALTER ] { PROC | PROCEDURE }
    [schema_name.] procedure_name [ ; number ]
    [ { @parameter_name [ type_schema_name. ] data_type }
        [ VARYING ] [ NULL ] [ = default ] [ OUT | OUTPUT | [READONLY]
    ] [ ,...n ]
[ WITH <procedure_option> [ ,...n ] ]
[ FOR REPLICATION ]
AS { [ BEGIN ] sql_statement [;] [ ...n ] [ END ] }
[;]
 
<procedure_option> ::=
    [ ENCRYPTION ]
    [ RECOMPILE ]
    [ EXECUTE AS Clause ]


Generated at Thu Feb 08 10:31:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.