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

Pradeep Agrawal commented on RANGER-3587:
-----------------------------------------

[~bpatel]  I tested upgrade from 2.0 to 2.1 and 3.0, using mysql connector jar 
5.1.25 on centos mysql (Server version: 5.7.35 MySQL Community Server (GPL)). 

The issue is not reproducible therefore you need to check your env. 

> Failed to apply 046*.sql patch
> ------------------------------
>
>                 Key: RANGER-3587
>                 URL: https://issues.apache.org/jira/browse/RANGER-3587
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin
>    Affects Versions: 2.1.0
>            Reporter: Bhavik Patel
>            Priority: Blocker
>
> [JISQL] /usr/java/latest/bin/java  -cp 
> /opt/tusker/ranger-admin/ranger-2.1.0-1-admin/ews/lib/mysql-connector-java-5.1.25.jar:/opt/tusker/ranger-admin/ranger-2.1.0-1-admin/jisql/lib/*
>  org.apache.util.sql.Jisql -driver mysqlconj -cstring 
> jdbc:mysql://localhost.visa.com/ranger_admin -u 'rangeradmin' -p '********' 
> -noheader -trim -c \; -input 
> /opt/tusker/ranger-admin/ranger-2.1.0-1-admin/db/mysql/patches/046-insert-statename-in-x-ranger-global-state.sql
> Error executing: CREATE FUNCTION `getXportalUIdByLoginId`(input_val 
> VARCHAR(100)) RETURNS int(11) BEGIN DECLARE myid INT; SELECT x_portal_user.id 
> into myid FROM x_portal_user WHERE x_portal_user.login_id = input_val; RETURN 
> myid; END
> java.sql.SQLException: 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)
> SQLException : SQL state: HY000 java.sql.SQLException: 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) ErrorCode: 1418
>  
> Note: mysql version is 5.7.35



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to