You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Sean Roberts (Jira)" <ji...@apache.org> on 2019/10/08 20:28:00 UTC

[jira] [Commented] (RANGER-1912) Ranger setup fails with mariadb/mysql when binary logging is enabled

    [ https://issues.apache.org/jira/browse/RANGER-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16947169#comment-16947169 ] 

Sean Roberts commented on RANGER-1912:
--------------------------------------

This is occurring again in HDP 3.1.4, so the issue wasn't resolved or has been re-introduced.

> Ranger setup fails with mariadb/mysql when binary logging is enabled
> --------------------------------------------------------------------
>
>                 Key: RANGER-1912
>                 URL: https://issues.apache.org/jira/browse/RANGER-1912
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 0.4.0, 0.5.0, 0.6.0, 0.7.0
>            Reporter: Pradeep Agrawal
>            Assignee: Pradeep Agrawal
>            Priority: Major
>             Fix For: 1.0.0
>
>         Attachments: 0001-RANGER-1912-Ranger-setup-fails-with-MySQL-when-binar.patch
>
>
> Ranger Admin installation fails when using MariaDB/MySQL with binary logging enabled.
> The install should work even if binary logging is enabled.
> *Problem Statement:* Currently MySQL DB patch 007 and 008 is having MySQL UDF functions which are not DETERMINISTIC
> When you create a stored function, you must declare either that it is deterministic or that it does not modify data. Otherwise, it may be unsafe for data recovery or replication.
> By default, for a CREATE FUNCTION statement to be accepted, at least one of DETERMINISTIC, NO SQL, or READS SQL DATA must be specified explicitly. Otherwise, an error occurs: 
> {code:java}
> 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)
> {code}
> Although it is possible to create a deterministic stored function without specifying DETERMINISTIC, you cannot execute this function using statement-based binary logging. To execute such a function, you must use row-based or mixed binary logging. Alternatively, if you explicitly specify DETERMINISTIC in the function definition, you can use any kind of logging, including statement-based logging.
> To relax the preceding conditions on function creation (that you must have the SUPER privilege and that a function must be declared deterministic or to not modify data), set the global log_bin_trust_function_creators system variable to 1. By default, this variable has a value of 0, but you can change it like this: 
> {code:java}
> SET GLOBAL log_bin_trust_function_creators = 1;
> {code}
> If binary logging is not enabled, log_bin_trust_function_creators does not apply. SUPER is not required for function creation unless, as described previously, the DEFINER value in the function definition requires it.
> *Proposed Solution:* We can remove usage of stored function and it can be replaced with the stored procedure.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)