deadlock on host_details: Missed adding the unique key constraint needed on host_details table in create_schema
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/56291658 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/56291658 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/56291658 Branch: refs/heads/master Commit: 5629165877b8dd44f7d8a72d45becf696254ccc6 Parents: 60f130c Author: Prachi Damle <[email protected]> Authored: Thu Sep 6 16:35:28 2012 -0700 Committer: Prachi Damle <[email protected]> Committed: Thu Sep 6 16:35:28 2012 -0700 ---------------------------------------------------------------------- setup/db/create-schema.sql | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/56291658/setup/db/create-schema.sql ---------------------------------------------------------------------- diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql index d1f2ace..9e01d28 100755 --- a/setup/db/create-schema.sql +++ b/setup/db/create-schema.sql @@ -829,7 +829,8 @@ CREATE TABLE `cloud`.`host_details` ( `name` varchar(255) NOT NULL, `value` varchar(255) NOT NULL, PRIMARY KEY (`id`), - CONSTRAINT `fk_host_details__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE + CONSTRAINT `fk_host_details__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE, + CONSTRAINT UNIQUE KEY `uk_host_id_name` (`host_id`, `name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`mshost` (
