r4394 upgrade.php: delete invalid rows in RackSpace, which could be left by transacti...
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 25 Mar 2011 12:40:24 +0000 (12:40 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 25 Mar 2011 12:40:24 +0000 (12:40 +0000)
ChangeLog
wwwroot/inc/upgrade.php

index 94a1a9e1543a173726e8f68426da9f7dd3658277..34627967cd8a2ad5daf3fc720c788ace77317f0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 0.19.3
        update: when searching for object by its hostname (FQDN attr) and single match is found, no searching by other fields is done
+       bugfix: handle SQL remnants of bug 399/415
 0.19.2 2011-03-24
        new feature: JunOS10 802.1q gateway
        bugfix: port linking was broken for some users due to open PDO cursor (#413)
index 8077f6ad9ce321a04e60399a3890396245bd84fc..0b46710a7c641e00e971b2febdde14770c628d46 100644 (file)
@@ -1042,6 +1042,11 @@ CREATE TABLE `EntityLink` (
                        $query[] = "ALTER TABLE AttributeValue ADD KEY `attr_id-string_value` (`attr_id`,`string_value`(12))";
                        $query[] = "UPDATE Config SET varvalue = '0.19.2' WHERE varname = 'DB_VERSION'";
                        break;
+               case '0.19.3':
+                       $query = array_merge ($query, reloadDictionary ($batchid));
+                       $query[] = "DELETE FROM RackSpace WHERE object_id IS NULL AND state = 'T'";
+                       $query[] = "UPDATE Config SET varvalue = '0.19.3' WHERE varname = 'DB_VERSION'";
+                       break;
                default:
                        showError ("executeUpgradeBatch () failed, because batch '${batchid}' isn't defined", __FUNCTION__);
                        die;