diff options
author | Georgi Kodinov <kgeorge@mysql.com> | 2008-10-17 17:55:06 +0300 |
---|---|---|
committer | Georgi Kodinov <kgeorge@mysql.com> | 2008-10-17 17:55:06 +0300 |
commit | a0e3001cdbe8a308e01f984a006cc003c82ebd82 (patch) | |
tree | 9cc59e113b7bc151b40b190f7fc2e5bb12aa8534 /mysql-test/r/sp.result | |
parent | 4ab10baace0960f18a843beb880c99b6cd9ca2e3 (diff) | |
download | mariadb-git-a0e3001cdbe8a308e01f984a006cc003c82ebd82.tar.gz |
Bug #33811: Call to stored procedure with SELECT * / RIGHT JOIN
fails after the first time
Two separate problems :
1. When flattening joins the linked list used for name resolution
(next_name_resolution_table) was not updated.
Fixed by updating the pointers when extending the table list
2. The items created by expanding a * (star) as a column reference
were marked as fixed, but no cached table was assigned to them
(unlike what Item_field::fix_fields does).
Fixed by assigning a cached table (so the re-preparation is done
faster).
Note that the fix for #2 hides the fix for #1 in most cases
(except when a table reference cannot be cached).
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r-- | mysql-test/r/sp.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index dea51bb4c2c..ec00435548c 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6646,6 +6646,24 @@ ttt 2 drop function func30787; drop table t1; +CREATE TABLE t1 (id INT); +INSERT INTO t1 VALUES (1),(2),(3),(4); +CREATE PROCEDURE test_sp() +SELECT t1.* FROM t1 RIGHT JOIN t1 t2 ON t1.id=t2.id; +CALL test_sp(); +id +1 +2 +3 +4 +CALL test_sp(); +id +1 +2 +3 +4 +DROP PROCEDURE test_sp; +DROP TABLE t1; create table t1(c1 INT); create function f1(p1 int) returns varchar(32) return 'aaa'; |