[MDEV-27816] Server fails to load a dump, taken on the same version Created: 2022-02-11 Updated: 2022-05-06 Resolved: 2022-05-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.6.4, 10.3, 10.4, 10.5, 10.7, 10.8 |
| Fix Version/s: | 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4, 10.8.3, 10.9.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Assen Totin (Inactive) | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
10.6.4-1-MariaDB-enterprise-log |
||
| Description |
|
A dump was taken on a system that has PL/SQL packages with the below version and command.
The dump contains the following line:
Loading the dump into a blank schema on another MariaDB server of the same version and default config (incl. default SQL mode) fails:
The dump seems to set up the proper mode for most of what is does, like CREATE PACKAGE statements - but it fails on the above comment. Here is a line form the dump which sets the SQL mode to include Oracle (found multiple times inside the dump).
|
| Comments |
| Comment by Ralf Gebhardt [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The SQL Mode is not set correctly before DROP PACKAGE
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hartmut Holzgraefe [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
How to reproduce:
Result:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hartmut Holzgraefe [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This should fix it, the line that sets the SQL mode for the CREATE part just needs to be moved up a bit to also cover the DROP IF EXISTS part:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hartmut Holzgraefe [ 2022-04-29 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Pull request against 10.3 branch | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2022-05-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This patch is OK to push: https://github.com/MariaDB/server/pull/2107/commits/a0af3937e574973f8e72ceb57a36296b11a9720a | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-05-06 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks hholzgra. |