PL/SQL parser - Phase 2
(MDEV-10764)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser, Stored routines |
| Affects Version/s: | None |
| Fix Version/s: | 10.8.1 |
| Type: | Technical task | Priority: | Blocker |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | Preview_10.8 | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Description |
|
When running with the default sql_mode, MariaDB does not support qualifiers in stored function parameters. Qualifiers are only supported in stored procedure parameters. When running with sql_mode=ORACLE, MariaDB should support IN, OUT, INOUT parameter qualifiers in CREATE FUNCTION, for Oracle compatibility. |
| Comments |
| Comment by Daniel Black [ 2021-11-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
User contribution per PR 1931. Test cases requested - https://lists.launchpad.net/maria-developers/msg12972.html I didn't think there was a problem with the syntax in non-Oracle mode. sanja, bar, any other/alternate feedback? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Federico Razzoli [ 2021-11-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
PostgreSQL and Db2 support this feature as well. So I wouldn't consider it Oracle-specific. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Manohar KB [ 2021-11-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Uploaded my own unit test cases (comparing Oracle vs MariaDB): Currently working on the review points mentioned in the PR. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-11-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please try to create test cases in MTR for this feature. bar [suggested, mysql-test/main (for SQL/PSM) and into suite/compat/oracle/t. A reference document is https://mariadb.com/kb/en/mysql-test-overview/ As you can imagine a collection of tests outside the framework isn't easily consumable. I pushed a commit to the end of your pull request (and is on your branch) that includes a sample test case. This was tested with:
When I was happy the output matches the functionality:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Manohar KB [ 2021-11-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for sample test case, that was helpful. How do I record negative test case? For example, I want to include cases which returns error message like below.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-11-09 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Make the previous line to the select statement --error ER_SF_OUT_INOUT_ARG_NOT_ALLOWED | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Manohar KB [ 2021-11-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you. I have added test cases to and pushed the changes. As the ticket description says, this fix only supports when sql_mode='ORACLE'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-12-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
pushed into preview-10.8- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2021-12-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Preview notice: https://mariadb.org/?p=24584&preview=1&_ppp=08ff268aca ManoharKB anything to add/change? If you want to credit an employer please let net me know. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-01-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Both myself and ramesh tested this feature and no major issues were observed. Please note this comment however (this could be made clear in the manual). OK to push and with thanks to the implementer for the two high quality MTR testcases. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-01-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Logged MDEV-27574 |