You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Vitaly Brodetskyi (JIRA)" <ji...@apache.org> on 2016/10/05 16:38:20 UTC

[jira] [Updated] (AMBARI-18532) Getting errors with max length 1000byte, when using Mysql db with charset UTF8

     [ https://issues.apache.org/jira/browse/AMBARI-18532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vitaly Brodetskyi updated AMBARI-18532:
---------------------------------------
    Summary: Getting errors with max length 1000byte, when using Mysql db with charset UTF8  (was: blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL)

> Getting errors with max length 1000byte, when using Mysql db with charset UTF8
> ------------------------------------------------------------------------------
>
>                 Key: AMBARI-18532
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18532
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server, ambari-upgrade
>    Affects Versions: 2.4.0
>            Reporter: Vitaly Brodetskyi
>            Assignee: Vitaly Brodetskyi
>            Priority: Critical
>             Fix For: 2.4.2
>
>         Attachments: AMBARI-18532.patch
>
>
> blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL:
> {code:title=Current Definition}
> CREATE TABLE blueprint_setting (
>   id BIGINT NOT NULL,
>   blueprint_name VARCHAR(100) NOT NULL,
>   setting_name VARCHAR(100) NOT NULL,
>   setting_data MEDIUMTEXT NOT NULL,
>   CONSTRAINT PK_blueprint_setting PRIMARY KEY (id),
>   CONSTRAINT UQ_blueprint_setting_name UNIQUE(blueprint_name,setting_name),
>   CONSTRAINT FK_blueprint_setting_name FOREIGN KEY (blueprint_name) REFERENCES blueprint(blueprint_name));
> {code}
> {code:title=Correct Definition}
> CREATE TABLE blueprint_setting (
>   id BIGINT NOT NULL,
>   blueprint_name VARCHAR(255) NOT NULL,
>   setting_name VARCHAR(100) NOT NULL,
>   setting_data MEDIUMTEXT NOT NULL,
>   CONSTRAINT PK_blueprint_setting PRIMARY KEY (id),
>   CONSTRAINT UQ_blueprint_setting_name UNIQUE(blueprint_name,setting_name),
>   CONSTRAINT FK_blueprint_setting_name FOREIGN KEY (blueprint_name) REFERENCES blueprint(blueprint_name));
> {code}
> This will cause errors when creating the table while MySQL sets up the foreign key constraint due to the column mismatch.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)