Bug #6382 changes in stored procedures are invisible to open sessions
Submitted: 2 Nov 2004 9:40 Modified: 2 Nov 2004 9:57
Reporter: Michael Kofler Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0 OS:probably all (testet with linux)
Assigned to: CPU Architecture:Any

[2 Nov 2004 9:40] Michael Kofler
Description:
if I drop and re-create a SP in session a, session b continues to use the old version of the SP; FLUSH tables, query cache and privileges does not help; only disconnect/reconnect helps

How to repeat:
session a: 

mysql> delimiter |
mysql> create  function test() returns INT begin return 1; end|
Query OK, 0 rows affected (0.00 sec)

session b:

mysql> select test();
+--------+
| test() |
+--------+
|      1 |
+--------+
1 row in set (0.00 sec)

session a:

mysql> drop function test|
Query OK, 0 rows affected (0.01 sec)
mysql> create  function test() returns INT begin return 2; end|
Query OK, 0 rows affected (0.00 sec)

session b:

mysql> select test();
+--------+
| test() |
+--------+
|      1 |  <--------------- WRONG, should be 2
+--------+
1 row in set (0.00 sec)

Suggested fix:
perhaps something like FLUSH FUNCTIONS?
[2 Nov 2004 9:57] MySQL Verification Team
Hi,

Thank you for the report, but I can't reproduce it with  5.0.2-alpha-debug-log
[2 Nov 2004 10:03] Michael Kofler
perhaps it is already solved; I am using MySQL 5.0.1 snapshot on Linux
[2 Nov 2004 10:44] Per-Erik Martin
This was fixed on Aug 8 (BUG#4934: Caching issue with stored procedures), which
apparently just missed the 5.0.1 snapshot build by a few days.