You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by wu...@apache.org on 2022/10/17 09:55:38 UTC

[ambari] branch trunk updated: AMBARI-25729: Add support for Mysql 8.x (#3413)

This is an automated email from the ASF dual-hosted git repository.

wuzhiguo pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 22940a8257 AMBARI-25729: Add support for Mysql 8.x (#3413)
22940a8257 is described below

commit 22940a8257a86c54864cc3f9600472c65b7a6226
Author: Bhavik Patel <bh...@gmail.com>
AuthorDate: Mon Oct 17 15:25:30 2022 +0530

    AMBARI-25729: Add support for Mysql 8.x (#3413)
---
 ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
index 0106b81451..26e5f2467d 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -31,7 +31,7 @@
 set @version_short = substring_index(@@version, '.', 2);
 set @major = cast(substring_index(@version_short, '.', 1) as SIGNED);
 set @minor = cast(substring_index(@version_short, '.', -1) as SIGNED);
-set @engine_stmt = IF(@major >= 5 AND @minor>=6, 'SET default_storage_engine=INNODB', 'SET storage_engine=INNODB');
+set @engine_stmt = IF((@major >= 5 AND @minor>=6) or @major >= 8, 'SET default_storage_engine=INNODB', 'SET storage_engine=INNODB');
 prepare statement from @engine_stmt;
 execute statement;
 DEALLOCATE PREPARE statement;
@@ -357,7 +357,7 @@ CREATE TABLE user_authentication (
   CONSTRAINT FK_user_authentication_users FOREIGN KEY (user_id) REFERENCES users (user_id)
 );
 
-CREATE TABLE groups (
+CREATE TABLE `groups` (
   group_id INTEGER,
   principal_id BIGINT NOT NULL,
   group_name VARCHAR(255) NOT NULL,
@@ -372,7 +372,7 @@ CREATE TABLE members (
   group_id INTEGER NOT NULL,
   user_id INTEGER NOT NULL,
   CONSTRAINT PK_members PRIMARY KEY (member_id),
-  CONSTRAINT FK_members_group_id FOREIGN KEY (group_id) REFERENCES groups (group_id),
+  CONSTRAINT FK_members_group_id FOREIGN KEY (group_id) REFERENCES `groups` (group_id),
   CONSTRAINT FK_members_user_id FOREIGN KEY (user_id) REFERENCES users (user_id),
   CONSTRAINT UNQ_members_0 UNIQUE (group_id, user_id));
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org