Bug #45553 Error "Stored proc not exist" when editing another proc in Query Browser
Submitted: 17 Jun 2009 10:05 Modified: 4 Sep 2009 19:41
Reporter: Marcus Lo Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S1 (Critical)
Version:5.0.45-community-nt, 5.0.77 OS:Windows
Assigned to: CPU Architecture:Any
Tags: C API, prepared statement, query browser, stored procedure, trigger

[17 Jun 2009 10:05] Marcus Lo
Description:
I use C API Prepared statement to insert data into a table which calls a trigger and in turn, calls a stored procedure (procedure A) to insert table into another table. It works fine, until one day I use MySQL Query Browser to edit another totally unrelated stored procedure (procedure B). After editing, the C API fails and return error, stating that procedure A doesn't exist. But I have check MySQL and confirm procedure A exist.  After restarting the C API program, everything works fine.

How to repeat:
CREATE DATABASE DB;

CREATE TABLE DB.A1 (
    Data INTEGER
) ENGINE=INNODB;

CREATE TABLE DB.A2 (
    Data INTEGER
) ENGINE=MEMORY;

DELIMITER $$

DROP PROCEDURE IF EXISTS `DB`.`Proc_A` $$
CREATE PROCEDURE `DB`.`Proc_A`(
  inData INTEGER
)
BEGIN
    INSERT INTO DB.A2(Data) VALUES(inData);
END $$

DELIMITER ;

CREATE TRIGGER `DB`.`Trigger_A` BEFORE INSERT ON `DB`.`A1`
FOR EACH ROW
BEGIN
    CALL DB.Proc_A(New.Data);
END;

Then use C API Prepared Statement to INSERT data into DB.A1, and use Query Browser to edit another totally unrelated stored procedure.
[17 Jun 2009 10:08] Sveta Smirnova
Thank you for the report.

But version 5.0.45 is old and many bugs were fixed since. Please upgrade to current version 5.0.83 and inform us if problem still exists.
[14 Jul 2009 2:18] Marcus Lo
The problem still exist in 5.0.77, even if I edit stored procedure/trigger in mysql client (and MySQL Query Browser).
[4 Aug 2009 19:41] MySQL Verification Team
Thank you for the bug report. If I understood well you are reporting your C API application works fine until you edit a stored procedure with Query Browser right?. Anyway are you able to provide the an C API test case too. Thanks in advance.
[4 Sep 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".