mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
dd839ca2d9
commit
e51bd421a6
@ -13,6 +13,11 @@ class DatabaseSearchEngineTest extends SapphireTest
|
|||||||
{
|
{
|
||||||
protected $usesDatabase = true;
|
protected $usesDatabase = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool InnoDB doesn't update indexes until transactions are committed
|
||||||
|
*/
|
||||||
|
protected $usesTransactions = false;
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
parent::setUpBeforeClass();
|
parent::setUpBeforeClass();
|
||||||
@ -46,5 +51,4 @@ class DatabaseSearchEngineTest extends SapphireTest
|
|||||||
$results->First()->Title
|
$results->First()->Title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,11 @@ class ZZZSearchFormTest extends FunctionalTest
|
|||||||
*/
|
*/
|
||||||
protected $mockController;
|
protected $mockController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool InnoDB doesn't update indexes until transactions are committed
|
||||||
|
*/
|
||||||
|
protected $usesTransactions = false;
|
||||||
|
|
||||||
public function waitUntilIndexingFinished()
|
public function waitUntilIndexingFinished()
|
||||||
{
|
{
|
||||||
$schema = DB::get_schema();
|
$schema = DB::get_schema();
|
||||||
|
Loading…
Reference in New Issue
Block a user