You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@gmail.com> on 2022/09/15 17:08:20 UTC

Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

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

Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


Bugs: RANGER-3914
    https://issues.apache.org/jira/browse/RANGER-3914


Repository: ranger


Description
-------

**Problem Statement:**
Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118

**Proposed solution:**
Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.


Diffs
-----

  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
  security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
  security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
  security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
  security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
  security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
  security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 


Diff: https://reviews.apache.org/r/74122/diff/1/


Testing
-------

Tested Ranger install and upgrade with this patch which was failing earlier.


Thanks,

Pradeep Agrawal


Re: Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

Posted by Pradeep Agrawal <pr...@gmail.com>.

> On Sept. 15, 2022, 5:41 p.m., Madhan Neethiraj wrote:
> > security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
> > Line 120 (original), 120 (patched)
> > <https://reviews.apache.org/r/74122/diff/1/?file=2269990#file2269990line120>
> >
> >     Pradeep - while at this, I suggest similar change for other columns as well: notes, other_attributes.

Thanks for suggestion. Though there is no problem with those attributes yet i would also prefer to change them (at least for fresh install because existing install will not be having any issue with that).


- Pradeep


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


On Sept. 15, 2022, 5:08 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74122/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2022, 5:08 p.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3914
>     https://issues.apache.org/jira/browse/RANGER-3914
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:**
> Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.
> 
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
> Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
> This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
> 
> SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118
> 
> **Proposed solution:**
> Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.
> 
> 
> Diffs
> -----
> 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
>   security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
>   security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
>   security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
>   security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
>   security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
>   security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 
> 
> 
> Diff: https://reviews.apache.org/r/74122/diff/1/
> 
> 
> Testing
> -------
> 
> Tested Ranger install and upgrade with this patch which was failing earlier.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74122/#review224674
-----------------------------------------------------------


Fix it, then Ship it!





security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
Line 120 (original), 120 (patched)
<https://reviews.apache.org/r/74122/#comment313469>

    Pradeep - while at this, I suggest similar change for other columns as well: notes, other_attributes.


- Madhan Neethiraj


On Sept. 15, 2022, 5:08 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74122/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2022, 5:08 p.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3914
>     https://issues.apache.org/jira/browse/RANGER-3914
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:**
> Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.
> 
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
> Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
> This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
> 
> SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118
> 
> **Proposed solution:**
> Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.
> 
> 
> Diffs
> -----
> 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
>   security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
>   security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
>   security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
>   security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
>   security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
>   security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 
> 
> 
> Diff: https://reviews.apache.org/r/74122/diff/1/
> 
> 
> Testing
> -------
> 
> Tested Ranger install and upgrade with this patch which was failing earlier.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74122/#review224676
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On Sept. 16, 2022, 6:12 a.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74122/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2022, 6:12 a.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3914
>     https://issues.apache.org/jira/browse/RANGER-3914
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:**
> Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.
> 
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
> Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
> This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
> 
> SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118
> 
> **Proposed solution:**
> Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.
> 
> 
> Diffs
> -----
> 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
>   security-admin/db/mysql/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql a23976b80 
>   security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
>   security-admin/db/oracle/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 3fc4b975d 
>   security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
>   security-admin/db/postgres/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql b1e8c3845 
>   security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
>   security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
>   security-admin/db/sqlanywhere/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 38a85e97b 
>   security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
>   security-admin/db/sqlserver/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql ae216445b 
>   security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 
> 
> 
> Diff: https://reviews.apache.org/r/74122/diff/2/
> 
> 
> Testing
> -------
> 
> Tested Ranger install and upgrade with this patch which was failing earlier.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

Posted by Pradeep Agrawal <pr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74122/
-----------------------------------------------------------

(Updated Sept. 21, 2022, 6:53 a.m.)


Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


Changes
-------

Tested the patch for mssql db flavor.


Bugs: RANGER-3914
    https://issues.apache.org/jira/browse/RANGER-3914


Repository: ranger


Description
-------

**Problem Statement:**
Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118

**Proposed solution:**
Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.


Diffs (updated)
-----

  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
  security-admin/db/mysql/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql a23976b80 
  security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
  security-admin/db/mysql/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
  security-admin/db/oracle/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 3fc4b975d 
  security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
  security-admin/db/oracle/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
  security-admin/db/postgres/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql b1e8c3845 
  security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
  security-admin/db/postgres/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
  security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
  security-admin/db/sqlanywhere/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 38a85e97b 
  security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
  security-admin/db/sqlanywhere/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
  security-admin/db/sqlserver/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql ae216445b 
  security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 
  security-admin/db/sqlserver/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 


Diff: https://reviews.apache.org/r/74122/diff/4/

Changes: https://reviews.apache.org/r/74122/diff/3-4/


Testing
-------

Tested Ranger install and upgrade with this patch which was failing earlier.


Thanks,

Pradeep Agrawal


Re: Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

Posted by Pradeep Agrawal <pr...@gmail.com>.

> On Sept. 20, 2022, 7:45 a.m., Kirby Zhou wrote:
> > security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql
> > Line 371 (original), 371 (patched)
> > <https://reviews.apache.org/r/74122/diff/3/?file=2270073#file2270073line371>
> >
> >     Why do not change this to text?
> >     There are a lot of VARCHAR(4000) / VARCHAR2(4000) left unchanged.

They are not creating the issue for which the patch has been raised for. 
Also changing all of them will take extra time during the upgrade when user is having lot of data.
If you are facing any issue with that please create a separate jira and provide all details.


- Pradeep


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


On Sept. 16, 2022, 6:12 a.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74122/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2022, 6:12 a.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3914
>     https://issues.apache.org/jira/browse/RANGER-3914
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:**
> Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.
> 
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
> Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
> This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
> 
> SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118
> 
> **Proposed solution:**
> Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.
> 
> 
> Diffs
> -----
> 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
>   security-admin/db/mysql/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql a23976b80 
>   security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
>   security-admin/db/mysql/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
>   security-admin/db/oracle/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 3fc4b975d 
>   security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
>   security-admin/db/oracle/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
>   security-admin/db/postgres/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql b1e8c3845 
>   security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
>   security-admin/db/postgres/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
>   security-admin/db/sqlanywhere/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 38a85e97b 
>   security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
>   security-admin/db/sqlanywhere/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
>   security-admin/db/sqlserver/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql ae216445b 
>   security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 
>   security-admin/db/sqlserver/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/74122/diff/3/
> 
> 
> Testing
> -------
> 
> Tested Ranger install and upgrade with this patch which was failing earlier.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

Posted by Kirby Zhou <ki...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74122/#review224683
-----------------------------------------------------------



A lot of varchar(4000) remained, why we keep them unchanged?


security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql
Line 371 (original), 371 (patched)
<https://reviews.apache.org/r/74122/#comment313479>

    Why do not change this to text?
    There are a lot of VARCHAR(4000) / VARCHAR2(4000) left unchanged.


- Kirby Zhou


On 九月 16, 2022, 6:12 a.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74122/
> -----------------------------------------------------------
> 
> (Updated 九月 16, 2022, 6:12 a.m.)
> 
> 
> Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-3914
>     https://issues.apache.org/jira/browse/RANGER-3914
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:**
> Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.
> 
> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
> Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
> This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
> 
> SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118
> 
> **Proposed solution:**
> Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.
> 
> 
> Diffs
> -----
> 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
>   security-admin/db/mysql/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql a23976b80 
>   security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
>   security-admin/db/mysql/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
>   security-admin/db/oracle/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 3fc4b975d 
>   security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
>   security-admin/db/oracle/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
>   security-admin/db/postgres/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql b1e8c3845 
>   security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
>   security-admin/db/postgres/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
>   security-admin/db/sqlanywhere/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 38a85e97b 
>   security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
>   security-admin/db/sqlanywhere/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
>   security-admin/db/sqlserver/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql ae216445b 
>   security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 
>   security-admin/db/sqlserver/patches/060-change-syncsrc-col-datatype-x_user-x_portal_user-x_group.sql PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/74122/diff/3/
> 
> 
> Testing
> -------
> 
> Tested Ranger install and upgrade with this patch which was failing earlier.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 74122: RANGER-3914: Change sync_source column's datatype from varchar to text

Posted by Pradeep Agrawal <pr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74122/
-----------------------------------------------------------

(Updated Sept. 16, 2022, 6:12 a.m.)


Review request for ranger, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


Changes
-------

Addressed review comments and updated the patch.


Bugs: RANGER-3914
    https://issues.apache.org/jira/browse/RANGER-3914


Repository: ranger


Description
-------

**Problem Statement:**
Ranger install or upgrade may fail with below error when mysql engine having database charset set to utfmb4.

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. 
This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ErrorCode: 1118

**Proposed solution:**
Since BLOBs are not counted in the calculation of row size we can change sync_source column type to Blob/text/clob type.


Diffs (updated)
-----

  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 309c4196b 
  security-admin/db/mysql/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql a23976b80 
  security-admin/db/mysql/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 5a40a89e0 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 1af0a04ac 
  security-admin/db/oracle/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 3fc4b975d 
  security-admin/db/oracle/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql ed8dbaf7f 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql baa6288d2 
  security-admin/db/postgres/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql b1e8c3845 
  security-admin/db/postgres/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 68117a123 
  security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 5e8070ba2 
  security-admin/db/sqlanywhere/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql 38a85e97b 
  security-admin/db/sqlanywhere/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 335459058 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 8b5833eae 
  security-admin/db/sqlserver/patches/045-add-displayName-col-in-x_service_def_and_x_service.sql ae216445b 
  security-admin/db/sqlserver/patches/055-add-syncSource-col-in-x_user-x_portal_user-x_group.sql 3b8a8d83a 


Diff: https://reviews.apache.org/r/74122/diff/2/

Changes: https://reviews.apache.org/r/74122/diff/1-2/


Testing
-------

Tested Ranger install and upgrade with this patch which was failing earlier.


Thanks,

Pradeep Agrawal