[MDEV-12166] PROCEDURE using a SELECT from a temporary table does not work well Created: 2017-03-03 Updated: 2020-12-01 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Temporary, Stored routines |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
I create a table t1 and a temporary table t1.
Now I create and call a procedure that queries t1:
It uses the temporary table t1 (rather than the permanent table) and returns this result:
So far so good. Now I drop the temporary table and call the procedure again.
It returns an error:
Notice, it still tries to use the column x which belonged to the temporary table and which does not exist in the permanent table. This looks wrong. Note, if I now run a stand-alone SELECT query outside of a routine, it works fine:
The second CALL is expected to return the same result. |
| Comments |
| Comment by Elena Stepanova [ 2017-03-06 ] |
|
bar, I see that you linked it with MDEV-774, but is it not actually the same problem? Probably there will be lots of affected DDL variations? |