Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E0B7C200BA3 for ; Wed, 5 Oct 2016 18:38:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DF5D6160AC9; Wed, 5 Oct 2016 16:38:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 26370160ADE for ; Wed, 5 Oct 2016 18:38:27 +0200 (CEST) Received: (qmail 81073 invoked by uid 500); 5 Oct 2016 16:38:27 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 81047 invoked by uid 99); 5 Oct 2016 16:38:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2016 16:38:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C85502C2A67 for ; Wed, 5 Oct 2016 16:38:20 +0000 (UTC) Date: Wed, 5 Oct 2016 16:38:20 +0000 (UTC) From: "Vitaly Brodetskyi (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-18532) Getting errors with max length 1000byte, when using Mysql db with charset UTF8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 05 Oct 2016 16:38:29 -0000 [ 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)