PL/SQL parser (MDEV-10142)

[MDEV-10655] sql_mode=ORACLE: Anonymous blocks Created: 2016-08-24  Updated: 2020-05-11  Resolved: 2017-02-01

Status: Closed
Project: MariaDB Server
Component/s: Parser
Affects Version/s: None
Fix Version/s: 10.3.0

Type: Technical task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: Compatibility

Sprint: 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

 Description   

MariaDB uses BEGIN NOT ATOMIC to start anonymous blocks that can be used directly, outside of an SP context:
MariaDB:

delimiter ;;
BEGIN NOT ATOMIC
 ...
END;;

When running with sql_mode=ORACLE, MariaDB will understand this syntax for anonymous blocks.

DECLARE
  ...
BEGIN
  ...
END;;

In ORACLE mode, BEGIN is same as BEGIN NOT ATOMIC

BEGIN
 ...
END;;

This change will disallow BEGIN and BEGIN WORK as a transaction start for sql_mode=ORACLE. But one can still use START TRANSACTION if needed.



 Comments   
Comment by Alexander Barkov [ 2017-01-30 ]

Hi Alvin,
I'm almost done with it. Sending for Monty's review today.

Comment by Michael Widenius [ 2017-01-31 ]

Reviewed. Ok to push

Comment by Alexander Barkov [ 2017-02-01 ]

Pushed to bb-10.2-compatibility

Generated at Thu Feb 08 07:43:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.