Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.3.22, 10.4.12
Description
Preconditions: MariaDB 10.4.12 is installed from your package without any additional server changes.
Only information_schema, mysql and performance_schema are available after installation. No user databases are present.
All actions are performed with the root user.
Steps to reproduce:
1. Run the command line and execute the command:
"C:\Program Files\MariaDB 10.4\bin\mysql.exe" -u root -p root
2. Execute the script (see attachment) with the command: source D:/Script.sql
Actual result:
ERROR 1054 (42S22) at line 40 in file: 'D:\Script.sql': Unknown column 'ID' in 'field list'
Expected result:
If we do the same steps on MariaDB10.3.22, this script is successfully completed.
The error seems to be correct though, isn't it? ID indeed isn't defined in the function/package, and the statement it's used in doesn't refer to any table.
The simplified example is this:
In 10.4, it throws an error upon function creation:
10.4 edc3899d97
but in 10.3 it only throws the error upon function call:
10.3 811e4409c
The difference was introduced in 10.4.0. We could find what exactly caused it, there was extensive refactoring in parser and around it, but I'm not sure it makes much sense. The behavior in 10.4 seems to be correct, so there is nothing to fix; but the difference is not critical enough to backport the change to 10.3.