summaryrefslogtreecommitdiff
path: root/sql/sp.h
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2009-07-28 18:44:38 +0100
committerAlfranio Correia <alfranio.correia@sun.com>2009-07-28 18:44:38 +0100
commit043e09b5433df9b9b0d4a14cb94cd979984a4b0a (patch)
treefabc16f145fee1a240be8559a0e326fedfda69fa /sql/sp.h
parent422696d673dececd0feb54c28d05327bf4825834 (diff)
downloadmariadb-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp.h b/sql/sp.h
index 75c6856f64b..5a190c5480e 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -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