mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX Remove searchEngine() test that's using API wrong
Required to allow InnoDB usage, see https://github.com/silverstripe/silverstripe-framework/pull/9454. This came up in https://github.com/silverstripe/silverstripe-cms/issues/1452, and wasn't fully addressed. Either we allow boolean mode and all the constraints this brings around special character usage, or we filter out those special characters, which makes boolean mode pointless. You can't just pass arbitrary user input in a power-user function like this. See https://dev.mysql.com/doc/refman/5.6/en/fulltext-boolean.html Context: This used to work for some examples like "foo>*" under MyISAM, presumably because it had a more lenient parser. InnoDB rightfully complains about this now.
This commit is contained in:
parent
e81659344c
commit
dd839ca2d9
@ -47,19 +47,4 @@ class DatabaseSearchEngineTest extends SapphireTest
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate that https://github.com/silverstripe/silverstripe-cms/issues/1452 is fixed
|
||||
*/
|
||||
public function testSearchEngineEscapeGreaterThan()
|
||||
{
|
||||
$page = new SiteTree();
|
||||
$page->Title = "Unrelated page";
|
||||
$page->write();
|
||||
$page->doPublish();
|
||||
|
||||
$results = DB::get_conn()->searchEngine([ SiteTree::class, File::class ], "foo>*", 0, 100, "\"Relevance\" DESC", "", true);
|
||||
|
||||
// We're not trying to match this query, just confirm that it successfully executes
|
||||
$this->assertCount(0, $results);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user