[MDEV-29867] A column is extracted as NULL in a stored procedure when the procedure has an output param of the same name Created: 2022-10-24 Updated: 2022-10-26 Resolved: 2022-10-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Stored routines |
| Affects Version/s: | 10.5, 10.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Assen Totin (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | None | ||
| Description |
|
If a stored procedure contains an output parameter with a certain name, and if the procedure selects a column of with the same name, the selected value is reported inside the procedure as NULL. The issue also present when the SELECT is run in a cursor with a subsequent FETCH - the fetched value is NULL. The error occurs on any data type (the example below shows JSON, but it also happens on INT etc.) Example:
|
| Comments |
| Comment by Sergei Golubchik [ 2022-10-26 ] | ||||
|
You see NULL because in
the second column is not a table's column, but a stored procedure parameter. |