You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/12/08 10:16:35 UTC
[1/3] git commit: updated refs/heads/4.5 to 57a210e
Repository: cloudstack
Updated Branches:
refs/heads/4.5 3ddf553d1 -> 57a210ede
CLOUDSTACK-6212: Let vm_instance table's ID field be unique and auto_increment
`vm_instance` table's id column is unique but does not auto_increment like other
resource tables. The fix simply alter the table's id column to have it
auto_increment which may avoid id conflicts in a multi-master mysql setup.
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e1e5e12a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e1e5e12a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e1e5e12a
Branch: refs/heads/4.5
Commit: e1e5e12aaa649c05f2d5bebe1bdaec00e284dcf0
Parents: 4f748e6
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Sat Dec 6 05:54:39 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Sat Dec 6 05:54:39 2014 +0530
----------------------------------------------------------------------
setup/db/db/schema-442to450.sql | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1e5e12a/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index d158c51..4469ecc 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -35,6 +35,7 @@ CREATE VIEW `cloud`.`storage_tag_view` AS
ALTER TABLE `cloud`.`volumes` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
+ALTER TABLE `cloud`.`vm_instance` MODIFY id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
DROP VIEW IF EXISTS `cloud`.`disk_offering_view`;
CREATE VIEW `cloud`.`disk_offering_view` AS
[2/3] git commit: updated refs/heads/4.5 to 57a210e
Posted by bh...@apache.org.
CLOUDSTACK-6212: auto_increment for some other resource tables
This fix alters table columns which are primary keys but don't have them
auto_increment such as region, domain_router, user_vm etc.
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a11ddf30
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a11ddf30
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a11ddf30
Branch: refs/heads/4.5
Commit: a11ddf307747ef03785c27519fb535a36d4be145
Parents: e1e5e12
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Sat Dec 6 06:26:31 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Sat Dec 6 06:26:31 2014 +0530
----------------------------------------------------------------------
setup/db/db/schema-442to450.sql | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a11ddf30/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index 4469ecc..3981415 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -35,7 +35,15 @@ CREATE VIEW `cloud`.`storage_tag_view` AS
ALTER TABLE `cloud`.`volumes` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
-ALTER TABLE `cloud`.`vm_instance` MODIFY id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+
+-- Have primary keys of following table AUTO_INCREMENT
+ALTER TABLE `cloud`.`region` MODIFY `id` int unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`vm_instance` MODIFY `id` bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`user_vm` MODIFY `id` bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`domain_router` MODIFY `id` bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`service_offering` MODIFY `id` bigint unsigned AUTO_INCREMENT NOT NULL;
+ALTER TABLE `cloud`.`load_balancing_rules` MODIFY `id` bigint unsigned AUTO_INCREMENT NOT NULL;
+ALTER TABLE `cloud`.`port_forwarding_rules` MODIFY `id` bigint unsigned AUTO_INCREMENT NOT NULL;
DROP VIEW IF EXISTS `cloud`.`disk_offering_view`;
CREATE VIEW `cloud`.`disk_offering_view` AS
[3/3] git commit: updated refs/heads/4.5 to 57a210e
Posted by bh...@apache.org.
Merge branch 'hotfix/CLOUDSTACK-6212' into 4.5
This closes #52
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/57a210ed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/57a210ed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/57a210ed
Branch: refs/heads/4.5
Commit: 57a210ede92e61501cd8520f1872053b796a43fc
Parents: 3ddf553 a11ddf3
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Dec 8 14:45:57 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Dec 8 14:46:23 2014 +0530
----------------------------------------------------------------------
setup/db/db/schema-442to450.sql | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------