Bug #15148 Stored procedure variables accept non-scalar values
Submitted: 22 Nov 2005 18:53 Modified: 7 Dec 2005 20:44
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.0 OS:
Assigned to: Alexander Nozdrin CPU Architecture:Any

[22 Nov 2005 18:53] Alexander Nozdrin
Description:
A stored procedure variable is a scalar. So, the only scalar values
can be assigned to SP-vars.

In 5.0.16 there is a test case (inside sp.test), which checks that a non-scalar
value can be assigned to a SP-var. This should be denied.

How to repeat:
(from sp.test, which is passed):
...
create procedure sub1(id char(16), x int)
  insert into test.t1 values (id, x)|
...
call sub1("sub1c", (select i,d from t2 limit 1))|
...
[7 Dec 2005 14:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/33136
[7 Dec 2005 20:44] Paul DuBois
Noted in 5.0.18 changelog.