Re: Review Request 52532: blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL

2016-10-05 Thread Robert Levas

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



That happened to the change to the `blueprint_setting` table?  Was the latest 
revision (3) a mistake?

- Robert Levas


On Oct. 5, 2016, 11:29 a.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52532/
> ---
> 
> (Updated Oct. 5, 2016, 11:29 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Myroslav Papirkovskyy, Robert 
> Levas, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18532
> https://issues.apache.org/jira/browse/AMBARI-18532
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 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.
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql e8a2569 
> 
> Diff: https://reviews.apache.org/r/52532/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52532: blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL

2016-10-05 Thread Vitalyi Brodetskyi

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

(Updated Жов. 5, 2016, 3:28 після полудня)


Review request for Ambari, Alejandro Fernandez, Robert Levas, Sumit Mohanty, 
and Sid Wagle.


Bugs: AMBARI-18532
https://issues.apache.org/jira/browse/AMBARI-18532


Repository: ambari


Description
---

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.


Diffs (updated)
-

  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql e8a2569 

Diff: https://reviews.apache.org/r/52532/diff/


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Re: Review Request 52532: blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL

2016-10-05 Thread Myroslav Papirkovskyy

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



Please test changes with different default encodings for MySQL. Theres limit 
for complex key size in bytes, but in varchar length depends on encoding.

- Myroslav Papirkovskyy


On Жов. 5, 2016, 1:40 до полудня, Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52532/
> ---
> 
> (Updated Жов. 5, 2016, 1:40 до полудня)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Robert Levas, Sumit Mohanty, 
> and Sid Wagle.
> 
> 
> Bugs: AMBARI-18532
> https://issues.apache.org/jira/browse/AMBARI-18532
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 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.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
>  ebfb267 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java
>  PRE-CREATION 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql e8a2569 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog242Test.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52532/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52532: blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL

2016-10-04 Thread Robert Levas

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


Ship it!




Ship It!

- Robert Levas


On Oct. 4, 2016, 6:40 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52532/
> ---
> 
> (Updated Oct. 4, 2016, 6:40 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Robert Levas, Sumit Mohanty, 
> and Sid Wagle.
> 
> 
> Bugs: AMBARI-18532
> https://issues.apache.org/jira/browse/AMBARI-18532
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 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.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
>  ebfb267 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java
>  PRE-CREATION 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql e8a2569 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog242Test.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52532/diff/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52532: blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL

2016-10-04 Thread Vitalyi Brodetskyi

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

(Updated Жов. 4, 2016, 10:40 після полудня)


Review request for Ambari, Alejandro Fernandez, Robert Levas, Sumit Mohanty, 
and Sid Wagle.


Bugs: AMBARI-18532
https://issues.apache.org/jira/browse/AMBARI-18532


Repository: ambari


Description
---

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.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
 ebfb267 
  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java
 PRE-CREATION 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql e8a2569 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog242Test.java
 PRE-CREATION 

Diff: https://reviews.apache.org/r/52532/diff/


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi



Review Request 52532: blueprint_setting table incorrectly defines blueprint_name column in DDL for MySQL

2016-10-04 Thread Vitalyi Brodetskyi

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

Review request for Ambari, Alejandro Fernandez, Robert Levas, Sumit Mohanty, 
and Sid Wagle.


Bugs: AMBARI-18532
https://issues.apache.org/jira/browse/AMBARI-18532


Repository: ambari


Description
---

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.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
 ebfb267 
  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog242.java
 PRE-CREATION 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql e8a2569 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog242Test.java
 PRE-CREATION 

Diff: https://reviews.apache.org/r/52532/diff/


Testing
---

mvn clean test


Thanks,

Vitalyi Brodetskyi