<commit_before><?php
/*=========================================================================

  Program:   CDash - Cross-Platform Dashboard System
  Module:    $RCSfile: common.php,v $
  Language:  PHP
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Kitware, Inc.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
include("config.php");
include("common.php");

$db = mysql_connect("$CDASH_DB_HOST", "$CDASH_DB_LOGIN","$CDASH_DB_PASS");
if(!$db)
  {
  echo mysql_error();
  }
if(mysql_select_db("$CDASH_DB_NAME",$db) === FALSE)
  {
  echo mysql_error();
  return;
  }

$xml = "<cdash>";
$xml .= "<cssfile>".$CDASH_CSS_FILE."</cssfile>";
$xml .= "</cdash>";
@$submit = $_POST["Submit"];

if(isset($submit))
  {
  $command = "mysqldump -u $CDASH_DB_LOGIN --password=$<PASSWORD> --extended-insert=0 $CDASH_DB_NAME";
  $output = shell_exec($command);

  header("Content-type: application/octet-stream");
  header("Content-length: ".strlen($output));
  header("Content-disposition: attachment; filename=cdash_backup.sql");
  echo $output;
  exit(1);
  }
else
  {
  generate_XSLT($xml,"backup");
  }
?><commit_msg>BUG: fix backup.php to work with large databases<commit_after><?php
/*=========================================================================

  Program:   CDash - Cross-Platform Dashboard System
  Module:    $RCSfile: common.php,v $
  Language:  PHP
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Kitware, Inc.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
include("config.php");
include("common.php");

$db = mysql_connect("$CDASH_DB_HOST", "$CDASH_DB_LOGIN","$CDASH_DB_PASS");
if(!$db)
  {
  echo mysql_error();
  }
if(mysql_select_db("$CDASH_DB_NAME",$db) === FALSE)
  {
  echo mysql_error();
  return;
  }

$xml = "<cdash>";
$xml .= "<cssfile>".$CDASH_CSS_FILE."</cssfile>";
$xml .= "</cdash>";
@$submit = $_POST["Submit"];

if(isset($submit))
  {
  $filename = "cdash_dump" . time() . ".sql";
  $command = "mysqldump -u $CDASH_DB_LOGIN --password=$CD<PASSWORD> --extended-insert=0 $CDASH_DB_NAME > $filename";
  $output = shell_exec($command);

  header("Content-type: application/octet-stream");
  header("Content-length: ".strlen($output));
  header("Content-disposition: attachment; filename=cdash_backup.sql");
  readfile($filename);
  #unlink($filename);
  exit(1);
  }
else
  {
  generate_XSLT($xml,"backup");
  }
?>
{'fraction_non_alphanumeric': 0.24395819725669496, 'fraction_numerical': 0.003919007184846506, 'mean_word_length': 4.8121442125237195, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5338694', 'n_tokens_mistral': 985, 'n_tokens_neox': 953, 'n_words': 212}