kirby zhou created RANGER-3984:
----------------------------------
Summary: Support using TiDB as mysql-db in ranger
Key: RANGER-3984
URL: https://issues.apache.org/jira/browse/RANGER-3984
Project: Ranger
Issue Type: Improvement
Components: admin, kms
Affects Versions: 2.3.0, 3.0.0
Reporter: kirby zhou
TiDB is a 95% mysql-compatible NewSQL database. For legal reason, we have to
deploy ranger based on tidb. But TiDB is missing some features, which makes
ranger unable to install properly.
[https://docs.pingcap.com/tidb/stable/mysql-compatibility#unsupported-features]
The biggest problem affecting ranger is missing "Stored procedures and
functions".
ranger use Stored procedures in setup scripts to simplify SQL.
Some work is needed to remove the stored procedure.
{code:java}
ERROR 1064 (42000) at line 1595 in file: 'ranger_core_db_mysql.sql': You have
an error in your SQL syntax; check the manual that corresponds to your TiDB
version for the right syntax to use line 1 column 14 near "PROCEDURE if exists
getXportalUIdByLoginId"
ERROR 1064 (42000) at line 1596 in file: 'ranger_core_db_mysql.sql': You have
an error in your SQL syntax; check the manual that corresponds to your TiDB
version for the right syntax to use line 1 column 16 near "PROCEDURE
`getXportalUIdByLoginId`(IN input_val VARCHAR(100), OUT myid BIGINT)
BEGIN
SET myid = 0;
SELECT x_portal_user.id into myid FROM x_portal_user WHERE
x_portal_user.login_id = input_val;
END"
ERROR 1064 (42000) at line 1605 in file: 'ranger_core_db_mysql.sql': You have
an error in your SQL syntax; check the manual that corresponds to your TiDB
version for the right syntax to use line 1 column 14 near "PROCEDURE if exists
getModulesIdByName"
ERROR 1064 (42000) at line 1606 in file: 'ranger_core_db_mysql.sql': You have
an error in your SQL syntax; check the manual that corresponds to your TiDB
version for the right syntax to use line 1 column 16 near "PROCEDURE
`getModulesIdByName`(IN input_val VARCHAR(100), OUT myid BIGINT)
BEGIN
SET myid = 0;
SELECT x_modules_master.id into myid FROM x_modules_master WHERE
x_modules_master.module = input_val;
END"
ERROR 1064 (42000) at line 1679 in file: 'ranger_core_db_mysql.sql': You have
an error in your SQL syntax; check the manual that corresponds to your TiDB
version for the right syntax to use line 1 column 14 near "PROCEDURE if exists
insertRangerPrerequisiteEntries"
ERROR 1064 (42000) at line 1680 in file: 'ranger_core_db_mysql.sql': You have
an error in your SQL syntax; check the manual that corresponds to your TiDB
version for the right syntax to use line 1 column 16 near "PROCEDURE
`insertRangerPrerequisiteEntries`()
BEGIN
DECLARE adminID bigint;
DECLARE keyadminID bigint;
DECLARE rangerusersyncID bigint;
DECLARE rangertagsyncID bigint;
DECLARE moduleIdReports bigint;
DECLARE moduleIdResourceBasedPolicies bigint;
DECLARE moduleIdAudit bigint;
DECLARE moduleIdUG bigint;
DECLARE moduleIdTagBasedPolicies bigint;
DECLARE moduleIdKeyMana
ERROR 8108 (HY000) at line 1757 in file: 'ranger_core_db_mysql.sql':
Unsupported type *ast.CallStmt
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)