Oracle 5.0 Reference Manual page 2893

Table of Contents

Advertisement

MySQL 5.0 FAQ: Stored Procedures and Functions
B.4.12: Do stored procedures have a statement for raising application errors?
Not in MySQL 5.0. The SQL standard
5.5.
B.4.13: Do stored procedures provide exception handling?
MySQL implements
HANDLER
"DECLARE ... HANDLER
B.4.14: Can MySQL 5.0 stored routines return result sets?
Stored procedures can, but stored functions cannot. If you perform an ordinary
procedure, the result set is returned directly to the client. You need to use the MySQL 4.1 (or above)
client/server protocol for this to work. This means that—for instance—in PHP, you need to use the
extension rather than the old
mysqli
B.4.15: Is
WITH RECOMPILE
Not in MySQL 5.0.
B.4.16: Is there a MySQL equivalent to using
directly to a stored procedure in the database?
There is no equivalent in MySQL 5.0.
B.4.17: Can I pass an array as input to a stored procedure?
Not in MySQL 5.0.
B.4.18: Can I pass a cursor as an
In MySQL 5.0, cursors are available inside stored procedures only.
B.4.19: Can I return a cursor as an
In MySQL 5.0, cursors are available inside stored procedures only. However, if you do not open a
cursor on a SELECT, the result will be sent directly to the client. You can also
See
Section 13.2.8,
"SELECT
B.4.20: Can I print out a variable's value within a stored routine for debugging purposes?
Yes, you can do this in a stored procedure, but not in a stored function. If you perform an ordinary
inside a stored procedure, the result set is returned directly to the client. You will need to use
SELECT
the MySQL 4.1 (or above) client/server protocol for this to work. This means that—for instance—in
PHP, you need to use the
B.4.21: Can I commit or roll back transactions inside a stored procedure?
Yes. However, you cannot perform transactional operations within a stored function.
B.4.22: Do MySQL 5.0 stored procedures and functions work with replication?
Yes, standard actions carried out in stored procedures and functions are replicated from a master
MySQL server to a slave server. There are a few limitations that are described in detail in
"Binary Logging of Stored
B.4.23: Are stored procedures and functions created on a master server replicated to a slave?
Yes, creation of stored procedures and functions carried out through normal DDL statements on a
master server are replicated to a slave, so the objects will exist on both servers.
statements for stored procedures and functions are also replicated.
B.4.24: How are actions that take place inside stored procedures and functions replicated?
and
SIGNAL
definitions according to the SQL standard. See
Syntax", for details.
extension.
mysql
supported for stored procedures?
parameter to a stored procedure?
IN
parameter from a stored procedure?
OUT
Syntax".
extension rather than the old
mysqli
Programs".
2873
statements are implemented in MySQL
RESIGNAL
as a gateway on Apache to talk
mod_plsql
mysql
Section 13.6.7.2,
inside a stored
SELECT
variables.
SELECT INTO
extension.
Section 18.6,
and
ALTER
DROP

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents