peng.jianhua created RANGER-1694: ------------------------------------ Summary: Execute 007-updateBlankPolicyName.sql failed in some mysql environment, which will cause ranger-admin start fail. Key: RANGER-1694 URL: https://issues.apache.org/jira/browse/RANGER-1694 Project: Ranger Issue Type: Bug Components: admin Reporter: peng.jianhua Assignee: peng.jianhua
Environment: mysql Ver 14.14 Distrib 5.5.35, for linux2.6 (x86_64). There are following error when installed ranger admin. Error executing: CREATE FUNCTION `getTempPolicyCount`(assetId bigint, resId bigint) RETURNS int(11) BEGIN DECLARE tempPolicyCount int default 1; DECLARE dbResourceId bigint; DECLARE exitLoop int DEFAULT FALSE; DECLARE policyList CURSOR FOR SELECT id from x_resource where asset_id = assetId; DECLARE CONTINUE HANDLER FOR NOT FOUND SET exitLoop = true; OPEN policyList; readPolicy : LOOP FETCH policyList into dbResourceId; IF exitLoop THEN set tempPolicyCount = tempPolicyCount + 1; LEAVE readPolicy; END IF; IF (resId = dbResourceId) THEN LEAVE readPolicy; END IF; set tempPolicyCount = tempPolicyCount + 1; END LOOP; CLOSE policyList; RETURN tempPolicyCount; 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 Lots of tables are not created in ranger db after installed ranger admin. So start ranger admin fail. -- This message was sent by Atlassian JIRA (v6.4.14#64029)