BUG 10196 ProcessMaker 2.0.46 Error al importar un archivo .po SOLVED

- Restriction for user permissions.
- Was added section for connection closing
This commit is contained in:
Marco Antonio Nina
2012-12-17 14:37:46 -04:00
parent 8d0e0b1dbe
commit 4ce561af8c

View File

@@ -320,10 +320,6 @@ class Content extends BaseContent
)Engine=MyISAM DEFAULT CHARSET='utf8' COMMENT='Table for add content';" );
$oStatement->executeQuery();
//set interactive timeout
$oStatement = $connection->prepareStatement( "set global interactive_timeout = 100;" );
$oStatement->executeQuery();
$sql = " SELECT DISTINCT CON_LANG
FROM CONTENT ";
$stmt = $connection->createStatement();
@@ -344,7 +340,7 @@ class Content extends BaseContent
$workSpace = new workspaceTools( $workSpace );
$workSpace->getDBInfo();
$link = mysql_pconnect( $workSpace->dbHost, $workSpace->dbUser, $workSpace->dbPass, MYSQL_CLIENT_INTERACTIVE ) or die( "Could not connect" );
$link = mysql_pconnect( $workSpace->dbHost, $workSpace->dbUser, $workSpace->dbPass) or die( "Could not connect" );
mysql_select_db( $workSpace->dbName, $link );
mysql_query( "SET NAMES 'utf8';" );
@@ -397,6 +393,16 @@ class Content extends BaseContent
$statement = $connection->prepareStatement( "DROP TABLE CONTENT_BACKUP" );
$statement->executeQuery();
//close connection
$sql = "SELECT * FROM information_schema.processlist WHERE command = 'Sleep' and user = SUBSTRING_INDEX(USER(),'@',1) and db = DATABASE() ORDER BY id;";
$stmt = $connection->createStatement();
$rs = $stmt->executeQuery( $sql, ResultSet::FETCHMODE_ASSOC );
while ($rs->next()) {
$row = $rs->getRow();
$oStatement = $connection->prepareStatement( "kill ". $row['ID'] );
$oStatement->executeQuery();
}
if (! isset( $_SERVER['SERVER_NAME'] )) {
CLI::logging( "Rows Processed ---> $this->rowsProcessed ..... \n" );
CLI::logging( "Rows Clustered ---> $this->rowsClustered ..... \n" );