[Pkg-owncloud-commits] [owncloud] 01/02: Fix upgrade issue in documents app

David Prévot taffit at moszumanska.debian.org
Sat Nov 30 02:33:51 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit c4fb6a57dc49d833626bc534c695e233b8661af1
Author: David Prévot <taffit at debian.org>
Date:   Fri Nov 29 21:59:37 2013 -0400

    Fix upgrade issue in documents app
---
 .../0017-remove-unnecessary-sub-select.patch       | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/0017-remove-unnecessary-sub-select.patch b/debian/patches/0017-remove-unnecessary-sub-select.patch
new file mode 100644
index 0000000..605d636
--- /dev/null
+++ b/debian/patches/0017-remove-unnecessary-sub-select.patch
@@ -0,0 +1,31 @@
+From: daniel <git at danger-it.de>
+Date: Thu, 28 Nov 2013 20:14:46 +0100
+Subject: remove unnecessary sub-select
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+member_id is the primary key and therefore unique => the nested select statement is not necessary and only adds additional computational overhead on the db.
+
+That fixes the “documents-app causes upgrading OC6beta5 to RC1 to hang”
+issue.
+
+Bugs: https://github.com/owncloud/documents/issues/135
+Origin: vendor, https://github.com/owncloud/documents/commit/a9f1c04ed23774fcd0830d3f6563ad0f04dd43c5
+---
+ apps/documents/appinfo/update.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/apps/documents/appinfo/update.php b/apps/documents/appinfo/update.php
+index b89894d..18ed655 100644
+--- a/apps/documents/appinfo/update.php
++++ b/apps/documents/appinfo/update.php
+@@ -11,7 +11,7 @@
+ 
+ $installedVersion = \OCP\Config::getAppValue('documents', 'installed_version');
+ 
+-$cleanup = \OC_DB::prepare('DELETE FROM `*PREFIX*documents_member` WHERE `member_id` NOT IN(SELECT `member_id` from `*PREFIX*documents_member` WHERE `last_activity`>0)');
++$cleanup = \OC_DB::prepare('DELETE FROM `*PREFIX*documents_member` WHERE `last_activity`=0 or `last_activity` is NULL');
+ $cleanup->execute();
+ 
+ if (version_compare($installedVersion, '0.7', '<=')) {
diff --git a/debian/patches/series b/debian/patches/series
index 04b28e8..f501648 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@ path/0013-Adapt-google-api-php-client-path.patch
 path/0014-Adapt-Dropbox-path.patch
 path/0015-Adapt-php-opencloud-path.patch
 path/0016-Adapt-Zend-path.patch
+0017-remove-unnecessary-sub-select.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list