Reply To: Index Table

#9609
Ernest Marcinko
Ernest Marcinko
Keymaster

That is very interesting. My only guess is that the DB account that wordpress uses does not have permissions to the SHOW command (?), so it’s not able to check it’s existence. It only makes sense to me this way.

If the table is indeed there correctly, then I guess it’s safe to ignore this check, as it makes no difference whatsoever. For that you will have to make a modification. Open up the wp-content/plugins/ajax-search-pro/includes/etc/indextable.class.php file and scroll to lines 154-168, which should be this function:

function checkIndexTable( $create_if_not_exist = false ) {
	global $wpdb;

	$table_name = $this->asp_index_table;
	if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) != $table_name ) {
		if ( $create_if_not_exist === true ) {
			$this->createIndexTable();

			return $this->checkIndexTable( false );
		} else {
			return false;
		}
	}

	return true;
}

Replace that function with simply this:

function checkIndexTable( $create_if_not_exist = false ) {
	return true;
}
Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)