This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 145287 - Sakila: "PROCEDURE does not exist" error message is shown for some procedures
Summary: Sakila: "PROCEDURE does not exist" error message is shown for some procedures
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: MySQL (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Vancouvering
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-27 12:49 UTC by Roman Mostyka
Modified: 2008-09-08 19:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-08-27 12:49:39 UTC
1. Connect to MySQL server.
2. Create "sakila" database.
3. Execute following statement:
"show create procedure get_customer_balance".

Result: Execution finished with errors and "Error code 1305, SQL state 42000: PROCEDURE get_customer_balance does not
exist" error message is shown.
The same for inventory_held_by_customer and inventory_in_stock sored procedures. For film_in_stock, film_not_in_stock
and rewards_report everything is fine.
Comment 1 John Baker 2008-09-08 08:11:53 UTC
The first paramenter of those procedures with problems appears to have a blank name
Comment 2 David Vancouvering 2008-09-08 19:12:01 UTC
I can reproduce.  Also fails with "show create procedure sakila.get_customer_balance"

Here are some odd things:
- The procedure shows up in the procedure list under the Procedures folder
- select * from information_schema.routines shows the procedures

This seems like a bug with MySQL.  See http://bugs.mysql.com/bug.php?id=5462, it looks like it may be a JDBC issue.

I do notice a pattern - the procedures that fail don't use the 'IN' keyword for in parameters.

I'll see if I can create a reproduction outside of Sakila and then will submit a MySQL bug.  I'll also see if using the
'IN' keyword is a viable workaround

Comment 3 David Vancouvering 2008-09-08 19:23:10 UTC
Doh!  The problem is that these are *functions* not procedures.  Notice they say "CREATE FUNCTION". 

'show create function get_customer_balance' works fine.

This can be confusing when they are all listed in the Procedures folder.  If we were to be accurate we would have a
Procedures folder and a Functions folder, but that would not be very generic.

Closing, this is not a bug, just a misunderstanding