PL/SQL parser (MDEV-10142)

[MDEV-10588] sql_mode=ORACLE: TRUNCATE TABLE t1 [ {DROP|REUSE} STORAGE ] Created: 2016-08-18  Updated: 2020-08-27  Resolved: 2016-11-15

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   

When running with sql_mode=ORACLE, MariaDB will support an optional STORAGE clause.

Example:

TRUNCATE TABLE t1 DROP STORAGE;

An open question is if the parser should just consume and ignore the STORAGE clause, or the underlying engine should perform some actions, depending on the choice between DROP or REUSE.

The default behavior is DROP STORAGE.

Note, although REUSE is a reserved keyword in Oracle, we won't reserve it even in sql_mode=ORACLE under terms of this task, as REUSE does not introduce grammar conflicts.



 Comments   
Comment by Michael Widenius [ 2016-08-18 ]

For first version, lets just ignore the extra options for truncate that only affects performance.

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