Not the answer you need?
Register and ask your own question!

when restoring/script out a function from percona xtraDB cluster 5.7.x to 8.0.19 it shows error

DBA100DBA100 Current User Role Patron
hi

when restoring/script out a function from percona xtraDB cluster 5.7.x to 8.0.19, the function is

DELIMITER $$
CREATE DEFINER=`asadmin`@`%` FUNCTION `rawtohex`(raw varbinary(100)) RETURNS varchar(100) CHARSET utf8
return hex(raw)$$
DELIMITER ;

but it shows error

DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled


I check this:
https://stackoverflow.com/questions/26015160/deterministic-no-sql-or-reads-sql-data-in-its-declaration-and-binary-logging-i

it seems I have to run this:

  1. Execute the following in the MySQL console:

    SET GLOBAL log_bin_trust_function_creators = 1;

  2. Add the following to the mysql.ini configuration file:

    log_bin_trust_function_creators = 1;

but it seems it still lock the ability to create function even I use root to test creating it.

any reason for it? and i still have to run  SET GLOBAL log_bin_trust_function_creators = 1;   on each cluster node for replication to works well.

how to make it once restarted mysql this configure still keep ?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.