PL/SQL parser
(MDEV-10142)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser, Stored routines |
| 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 |
|
In Oracle, VARCHAR, VARCHAR2, RAW can be specified without length in parameters and RETURN clause. Note, variable declarations still require length. Example:
Example:
In case of CHAR data type, when used in a parameter or a return value, a data type without parentheses means maximum size, while in a variable definition, CHAR with no parentheses still means CHAR(1).
In Oracle, CHAR and RAW data types have a limit of 2000 bytes. In MariaDB, fixed length types are limited to 255 characters. To guarantee that all possible values can fit, we'll translate CHAR without length in SP parameters or return values to VARCHAR(2000). In Oracle, VARCHAR is limited to 4000 bytes. We'll translate a VARCHAR with no length (in SP parameters or return values) to VARCHAR(4000) as well. The full translation list:
|