<commit_before><?php
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

class Search_MySql_Table extends TikiDb_Table
{
	private $definition = false;
	private $indexes = array();
	private $exists = null;

	private $schemaBuffer;
	private $dataBuffer;

	function __construct($db, $table)
	{
		parent::__construct($db, $table);

		$table = $this->escapeIdentifier($this->tableName);
		$this->schemaBuffer = new Search_MySql_QueryBuffer($db, 2000, "ALTER TABLE $table ");
		$this->dataBuffer = new Search_MySql_QueryBuffer($db, 100, '-- '); // Null Object, replaced later
	}

	function __destruct()
	{
		$this->flush();
	}

	function drop()
	{
		$table = $this->escapeIdentifier($this->tableName);
		$this->db->query("DROP TABLE IF EXISTS $table");
		$this->definition = false;
		$this->exists = false;

		$this->emptyBuffer();
	}<commit_msg>[FIX] ignore mysql index buffer errors when destructing the table object<commit_after><?php
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

class Search_MySql_Table extends TikiDb_Table
{
	private $definition = false;
	private $indexes = array();
	private $exists = null;

	private $schemaBuffer;
	private $dataBuffer;

	function __construct($db, $table)
	{
		parent::__construct($db, $table);

		$table = $this->escapeIdentifier($this->tableName);
		$this->schemaBuffer = new Search_MySql_QueryBuffer($db, 2000, "ALTER TABLE $table ");
		$this->dataBuffer = new Search_MySql_QueryBuffer($db, 100, '-- '); // Null Object, replaced later
	}

	function __destruct()
	{
		try {
			$this->flush();
		} catch( Search_MySql_Exception $e ) {
			# ignore this to cleanly destruct the object
		}
	}

	function drop()
	{
		$table = $this->escapeIdentifier($this->tableName);
		$this->db->query("DROP TABLE IF EXISTS $table");
		$this->definition = false;
		$this->exists = false;

		$this->emptyBuffer();
	}
{'fraction_non_alphanumeric': 0.13722886232846393, 'fraction_numerical': 0.013280212483399735, 'mean_word_length': 4.330188679245283, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5808119', 'n_tokens_mistral': 779, 'n_tokens_neox': 698, 'n_words': 211}