[MDEV-24611] Unable to restore a Oracle package after creation Created: 2021-01-18 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.3.25, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kim Gert Nielsen | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 20.04.1 LTS, 10.3.25+maria~focal |
||
| Description |
|
Since version 10.3.5 MariaDB has supported for Oracle packages and when creating one with:
and doing backup with:
I get
but when restoring it I get an syntax error on DROP PACKAGE because the Oracle mode is not set
If I manually change the DROP PACKAGE to:
The restore works |
| Comments |
| Comment by Elena Stepanova [ 2021-01-31 ] |
|
There is an option for mysqldump which is meant to take care of it, - Still, I wonder if it can be done better, more automatically. mysqldump detects the necessary sql_mode for CREATE statement, but the previous DROP still goes with the default mode. It's somewhat inconsistent. |
| Comment by Kim Gert Nielsen [ 2021-02-01 ] |
|
It would be much appreciated if it was automatic. We use MariaDB for hosting so its near impossible to know what the user is creating in the database and our workaround is that when restoring we inject the |