-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48411/#review136630
-----------------------------------------------------------




security-admin/db/mysql/create_dbversion_catalog.sql (line 21)
<https://reviews.apache.org/r/48411/#comment201721>

    From MySQL 5.7 onwards default value is mandatory for timestamp datatype 
and need to be specified explicitly.


- Pradeep Agrawal


On June 8, 2016, 12:38 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48411/
> -----------------------------------------------------------
> 
> (Updated June 8, 2016, 12:38 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
> Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan Neethiraj, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1018
>     https://issues.apache.org/jira/browse/RANGER-1018
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** As there is unique key constraint on email column of 
> x_portal_user table; after removal of Auto generation of Email address 
> code(RANGER-978); Ranger user creation is failing with SQLAnywhere and MS SQL 
> Server DB Flavor.
> 
> **Proposed Solution:**
> If any column in SQL Anywhere DB is having UNIQUE constraint then during 
> schema creation it set 'nulls' flag to 'N' though it is defined to accept 
> NULL in schema. (for example : email varchar(512) DEFAULT NULL NULL). This 
> way SQL Anywhere DB engine does not allow NULL insertion on columns having 
> UNIQUE constraint.
> 
> In order to fix this issue we need to drop unique constraint from email 
> column and allow NULL value on email column; below given sql statements can 
> be used to fix this issue.
> 
> alter table x_portal_user drop constraint x_portal_user_UK_email;
> alter table x_portal_user alter email varchar(512) DEFAULT NULL NULL;
> 
> 
> Diffs
> -----
> 
>   security-admin/db/mysql/create_dbversion_catalog.sql 9c90633 
>   security-admin/db/sqlanywhere/patches/018-createtagsyncuser.sql 9b1ab09 
>   security-admin/db/sqlserver/patches/018-createtagsyncuser.sql b3c466b 
>   security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java d3befbe 
> 
> Diff: https://reviews.apache.org/r/48411/diff/
> 
> 
> Testing
> -------
> 
> **Steps Performed(With patch):**
> 1. Installed and started Ranger-Admin with SQL Anywhere DB flavor.
> 2. Installed and started Ranger-Usersync with sync_source property 'unix'
> 3. Visited Ranger-admin user/group page to check whether linux users are 
> appearing or not.
> 
> **Expected Behavior:**
> Ranger-usersync should able to sync users from linux machine; user should be 
> visible in Ranger-UI and x_portal_user table should have null value in email 
> column of all synced users.
> 
> **Actual Behavior:**
> Ranger-usersync was able to sync users from linux machine; synced users were 
> visible in Ranger-UI and x_portal_user table was having null value in email 
> column of all synced users.
> 
> Note : Similar behaviour was observed while testing this patch with MS-SQL 
> Server and other DB flavors.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>

Reply via email to