From 7dad7b0da973df64edf07d077f785caded2c2f18 Mon Sep 17 00:00:00 2001 From: Koushik Das Date: Wed, 1 Aug 2012 16:22:25 +0530 Subject: [PATCH] CS-15790 : Failed to do DB upgrade from 3.0.4 to Burbank [SQL syntax error with schema-304to305.sql script Reviewed-by: Nitin --- setup/db/db/schema-304to305.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/db/db/schema-304to305.sql b/setup/db/db/schema-304to305.sql index 7c54ddbadda..f6ca0eecd77 100755 --- a/setup/db/db/schema-304to305.sql +++ b/setup/db/db/schema-304to305.sql @@ -344,4 +344,6 @@ ALTER TABLE `cloud`.`data_center` ADD COLUMN `is_local_storage_enabled` tinyint UPDATE `cloud`.`data_center` SET `is_local_storage_enabled` = IF ((SELECT `value` FROM `cloud`.`configuration` WHERE `name`='use.local.storage')='true', 1, 0) WHERE `removed` IS NULL; ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `max_data_volumes_limit` int unsigned DEFAULT 6 COMMENT 'Max. data volumes per VM supported by hypervisor'; -UPDATE TABLE `cloud`.`hypervisor_capabilities` SET `max_data_volumes_limit`=13 WHERE `hypervisor_type`='XenServer' AND (`hypervisor_version`='6.0' OR `hypervisor_version`='6.0.2'); +SET SQL_SAFE_UPDATES=0; +UPDATE `cloud`.`hypervisor_capabilities` SET `max_data_volumes_limit`=13 WHERE `hypervisor_type`='XenServer' AND (`hypervisor_version`='6.0' OR `hypervisor_version`='6.0.2'); +SET SQL_SAFE_UPDATES=1;