PL/SQL parser - Phase 2 (MDEV-10764)

[MDEV-13078] NOT NULL routine variables Created: 2017-06-13  Updated: 2021-05-11

Status: Open
Project: MariaDB Server
Component/s: Parser, Stored routines
Affects Version/s: 10.3
Fix Version/s: None

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


 Description   

For Oracle compatibility, we'll allow NOT NULL constraint for routine variables in sql_mode=ORACLE

DECLARE
  a NOT NULL INT;
BEGIN
  a:=1;
  a:=NULL; -- This should return an error
END;

and in the default sql_mode:

BEGIN
  DECLARE a NOT NULL INT;
  SET a=1;
  SET a=NULL; -- This should return an error
END;


Generated at Thu Feb 08 08:02:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.