This is an automated email from the ASF dual-hosted git repository.
pradeep pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new 2b593e6 RANGER-1955: Wrong quoting in Ranger SQL install scripts
2b593e6 is described below
commit 2b593e64afcd64301a8c2fed2ca8ce3b5c157293
Author: Pradeep <[email protected]>
AuthorDate: Mon Apr 22 11:52:25 2019 +0530
RANGER-1955: Wrong quoting in Ranger SQL install scripts
---
security-admin/db/mysql/patches/007-updateBlankPolicyName.sql | 4 ++--
security-admin/db/mysql/patches/008-removeTrailingSlash.sql | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/security-admin/db/mysql/patches/007-updateBlankPolicyName.sql
b/security-admin/db/mysql/patches/007-updateBlankPolicyName.sql
index 16d567e..114e73b 100644
--- a/security-admin/db/mysql/patches/007-updateBlankPolicyName.sql
+++ b/security-admin/db/mysql/patches/007-updateBlankPolicyName.sql
@@ -125,7 +125,7 @@ OPEN policyList;
set assetName = (select asset_name from x_asset asset where asset.id =
assetId);
call getTempPolicyCount(assetId, resId, tempPolicyCount);
- set currentTime = DATE_FORMAT(utc_timestamp(), "%Y%m%d%H%i%s");
+ set currentTime = DATE_FORMAT(utc_timestamp(), '%Y%m%d%H%i%s');
set genPolicyName = concat(assetName, '-', tempPolicyCount, '-',
currentTime);
set existPolId = (select id from x_resource where policy_name =
genPolicyName);
@@ -155,7 +155,7 @@ OPEN policyList;
set sessType = 'DB Script';
set parentObjName = assetName;
- set transId = concat(DATE_FORMAT(utc_timestamp(), "%Y%m%d%H%i%s"), '_',
rand());
+ set transId = concat(DATE_FORMAT(utc_timestamp(), '%Y%m%d%H%i%s'), '_',
rand());
insert into x_trx_log (create_time, update_time, added_by_id,
upd_by_id,
class_type, object_id, parent_object_id,
parent_object_class_type,
diff --git a/security-admin/db/mysql/patches/008-removeTrailingSlash.sql
b/security-admin/db/mysql/patches/008-removeTrailingSlash.sql
index 5640899..3e2f557 100644
--- a/security-admin/db/mysql/patches/008-removeTrailingSlash.sql
+++ b/security-admin/db/mysql/patches/008-removeTrailingSlash.sql
@@ -48,7 +48,7 @@ DECLARE transId varchar(50);
DECLARE assetTypeInt int;
DECLARE assetType varchar(30);
set updatedResName='';
-set noOfCommas = (LENGTH(resName)-LENGTH(REPLACE (resName, ",", "")));
+set noOfCommas = (LENGTH(resName)-LENGTH(REPLACE (resName, ',', '')));
set assetTypeInt = (select asset_type from x_asset where id = assetId);
if (assetTypeInt = 1) then
@@ -107,7 +107,7 @@ set act = 'update';
set sessType = 'DB Script';
set parentObjName = (select asset_name from x_asset where id = assetId);
-set transId = concat(DATE_FORMAT(utc_timestamp(), "%Y%m%d%H%i%s"), '_',
rand());
+set transId = concat(DATE_FORMAT(utc_timestamp(), '%Y%m%d%H%i%s'), '_',
rand());
insert into x_trx_log (create_time, update_time, added_by_id, upd_by_id,
class_type, object_id, parent_object_id, parent_object_class_type,