Changeset 419 for trunk/lib/DB.inc.php


Ignore:
Timestamp:
Jul 3, 2013 3:36:59 PM (11 years ago)
Author:
anonymous
Message:

Final check for active mysql connection. Changed truncate function arg defaults.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/DB.inc.php

    r418 r419  
    302302        }
    303303       
    304         // Ensure we have an active connection.
     304        // Ensure we have an active connection.
     305        // If we continue on a dead connection we might experience a "MySQL server has gone away" error.
     306        // http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
    305307        if (!mysql_ping($this->dbh)) {
    306             $app->logMsg('MySQL ping failed; reconnecting
', LOG_NOTICE, __FILE__, __LINE__);
     308            $app->logMsg(sprintf('MySQL ping failed; reconnecting
 ("%s")', truncate(trim($debugqry), 150)), LOG_NOTICE, __FILE__, __LINE__);
    307309            $this->reconnect();
    308310        }
Note: See TracChangeset for help on using the changeset viewer.