diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2009-07-28 18:44:38 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2009-07-28 18:44:38 +0100 |
commit | 043e09b5433df9b9b0d4a14cb94cd979984a4b0a (patch) | |
tree | fabc16f145fee1a240be8559a0e326fedfda69fa /sql/sp.h | |
parent | 422696d673dececd0feb54c28d05327bf4825834 (diff) | |
download | mariadb-git-043e09b5433df9b9b0d4a14cb94cd979984a4b0a.tar.gz |
BUG#41166 stored function requires "deterministic" if binlog_format is "statement"
If the log_bin_trust_function_creators option is not defined, creating a stored
function requires either one of the modifiers DETERMINISTIC, NO SQL, or READS
SQL DATA. Executing a stored function should also follows the same rules if in
STATEMENT mode. However, this was not happening and a wrong error was being
printed out: ER_BINLOG_ROW_RBR_TO_SBR.
The patch makes the creation and execution compatible and prints out the correct
error ER_BINLOG_UNSAFE_ROUTINE when a stored function without one of the modifiers
above is executed in STATEMENT mode.
Diffstat (limited to 'sql/sp.h')
-rw-r--r-- | sql/sp.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -17,6 +17,9 @@ #ifndef _SP_H_ #define _SP_H_ +/* Tells what SP_DEFAULT_ACCESS should be mapped to */ +#define SP_DEFAULT_ACCESS_MAPPING SP_CONTAINS_SQL + // Return codes from sp_create_*, sp_drop_*, and sp_show_*: #define SP_OK 0 #define SP_KEY_NOT_FOUND -1 |