[MDEV-18092] Query with the table I_S.PARAMETERS stop working after a package is created. Created: 2018-12-27  Updated: 2019-04-18  Resolved: 2019-04-18

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.3.11, 10.3.13
Fix Version/s: 10.3.15, 10.4.5

Type: Bug Priority: Blocker
Reporter: Alena Subotina Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Attachments: File Script.7z     PNG File image-2018-12-27-14-08-39-039.png    

 Description   

Preconditions: MariaDB 10.3.11 is installed from box.
Only information_schema, mysql and performance_schema are available after installation. No user databases are present.
All actions are performed with the user root.
Steps to reproduce:
1. Run the command line and execute the command:
"C:\Program Files\MariaDB 10.3\bin\mysql.exe" -u root -proot
2. Execute the script (see attachment) with the command: source D:/Script.sql
After the script is executed, the db1 database will be created with two tables and one package.
3. Execute the query: SELECT * FROM information_schema.parameters;

Actual Result: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BEGIN END' at line 1

P.S Execution of the command drop database db1; makes the specified query to execute successfully.



 Comments   
Comment by Anel Husakovic [ 2018-12-27 ]

I have tried this and the solution to this is to call show create package body

SHOW CREATE PACKAGE BODY db1.employee_tools\G

After that you will produce the output from query

SELECT * FROM information_schema.parameters; 

Comment by Alena Subotina [ 2018-12-27 ]

Indeed, after executing SHOW CREATE, the query started to execute succesfully. Why does it happen?

Comment by Alena Subotina [ 2018-12-27 ]

Does show create package body need to be executed for all packages on all databases? What about the other situation where a package was created by a different user in a different database, but I still want to refer to i_f.parameters?

Comment by Alexander Barkov [ 2019-01-10 ]

Hi Anel,

the patch
https://github.com/an3l/server/commit/252ca79493e18fa8fd364992f5022af8a57b79d5
looks fine.

Please remove this statement in the beginning of the test:

DROP DATABASE IF EXISTS db1_mdev18092;

It's not necessary. Ok to push after this change.

Thanks.

Comment by Anel Husakovic [ 2019-01-10 ]

Hi Alexander,
I changed the patch, will be pushed soon.
Thanks.

Comment by Alena Subotina [ 2019-01-15 ]

In which server version can we expect this change?

Comment by Alexander Barkov [ 2019-01-16 ]

anel, what is the state of the patch? Are you going to push it soon. Thanks.

Comment by Anel Husakovic [ 2019-01-18 ]

Hi, cvicentiu told me it should be pushed soon.

Comment by Alexander Barkov [ 2019-01-21 ]

Thanks anel. Will it be included into 10.3.13?

Comment by Anel Husakovic [ 2019-01-21 ]

Hi bar, Vicentiu told me it will be included in 10.3.13

Comment by Alena Subotina [ 2019-02-26 ]

Hello, guys. Could you please tell when will the bug be fixed? We found it kept in the new version 10.3.13 as well.

Comment by Sergei Golubchik [ 2019-04-11 ]

AlenaS, in the next release

Generated at Thu Feb 08 08:41:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.