FIX InnoDB FULLTEXT compat in tests

> InnoDB FULLTEXT indexes have special transaction handling characteristics due its caching and batch processing behavior. Specifically, updates and insertions on a FULLTEXT index are processed at transaction commit time, which means that a FULLTEXT search can only see committed data. The following example demonstrates this behavior. The FULLTEXT search only returns a result after the inserted lines are committed.

https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html#innodb-fulltext-index-transaction
This commit is contained in:
Ingo Schommer 2020-04-09 10:23:02 +12:00
parent dd839ca2d9
commit e51bd421a6
2 changed files with 10 additions and 1 deletions

View File

@ -13,6 +13,11 @@ class DatabaseSearchEngineTest extends SapphireTest
{
protected $usesDatabase = true;
/**
* @var bool InnoDB doesn't update indexes until transactions are committed
*/
protected $usesTransactions = false;
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
@ -46,5 +51,4 @@ class DatabaseSearchEngineTest extends SapphireTest
$results->First()->Title
);
}
}

View File

@ -44,6 +44,11 @@ class ZZZSearchFormTest extends FunctionalTest
*/
protected $mockController;
/**
* @var bool InnoDB doesn't update indexes until transactions are committed
*/
protected $usesTransactions = false;
public function waitUntilIndexingFinished()
{
$schema = DB::get_schema();