[Tickets #12476] Re: Database running mad after update to 5.1.1

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Jul 22 09:48:14 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12476
------------------------------------------------------------------------------
  Ticket             | 12476
  Updated By         | marth at tsvschlieben.de
  Summary            | Database running mad after update to 5.1.1
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Resolved
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             | Michael Rubinsky
------------------------------------------------------------------------------


marth at tsvschlieben.de (2013-07-22 09:48) wrote:

Add. Note: After applying the patch the load on the database server  
went from 15-20 down to 0.xx

This is the patch:

--- /usr/share/php/Horde/History/Sql.php        2013-07-15  
03:06:20.976871299 +0200
+++ /xxx/Horde/History/Sql.php  2013-07-22 11:23:27.641122721 +0200
@@ -293,10 +293,11 @@
       */
      public function getHighestModSeq($parent = null)
      {
-        $sql = 'SELECT MAX(history_modseq) FROM horde_histories';
+        $sql = 'SELECT history_modseq FROM horde_histories';
          if (!empty($parent)) {
              $sql .= ' WHERE object_uid LIKE ' .  
$this->_db->quote($parent . ':%');
          }
+        $sql .= ' ORDER BY history_modseq DESC LIMIT 1';

          try {
              $modseq = $this->_db->selectValue($sql);





More information about the bugs mailing list