Hi,
Can anyone confirm whether MySQL 5.1 can safely handle non-deterministic stored functions with row-based replication?
The docs don't appear to be crystal clear on this, as I read them.
If it can, what's the clean way to do it? Is it:
- set binlog-format = ROW (obviously)
- set log-bin-trust-function-creators = 1
- make sure function declarations are still honest so as not to mislead the optimizer (e.g. use NOT DETERMINISTIC and MODIFIES SQL DATA)
Setting log-bin-trust-function-creators seems heavy-handed, but without it (or without lying and declaring functions as DETERMINISTIC) the usual error occurs when attempting to create the function:
ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL,
or READS SQL DATA in its declaration and binary logging is enabled
(you *might* want to use the less safe log_bin_trust_function_creators
variable)
Cheers,
Chuck
Can anyone confirm whether MySQL 5.1 can safely handle non-deterministic stored functions with row-based replication?
The docs don't appear to be crystal clear on this, as I read them.
If it can, what's the clean way to do it? Is it:
- set binlog-format = ROW (obviously)
- set log-bin-trust-function-creators = 1
- make sure function declarations are still honest so as not to mislead the optimizer (e.g. use NOT DETERMINISTIC and MODIFIES SQL DATA)
Setting log-bin-trust-function-creators seems heavy-handed, but without it (or without lying and declaring functions as DETERMINISTIC) the usual error occurs when attempting to create the function:
ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL,
or READS SQL DATA in its declaration and binary logging is enabled
(you *might* want to use the less safe log_bin_trust_function_creators
variable)
Cheers,
Chuck