/**
  * Regression test for issue #155. Saving the root page causes sql errors:
  *
  * TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery" (60 chars)
  * ERROR => "You have an error in your SQL syntax; check the manual that corresponds to y
  * our MariaDB server version for the right syntax to use near 'OR (mount_pid=1
  * AND mount_pid_ol=1)) AND doktype = 7 AND no_search = 0 AND pages' at line 1" (228 chars)
  *
  * @see https://github.com/TYPO3-Solr/ext-solr/issues/155
  * @test
  */
 public function canUpdateRootPageRecordWithoutSQLErrorFromMountPages()
 {
     /** @var $database  \TYPO3\CMS\Core\Database\DatabaseConnection */
     $database = $GLOBALS['TYPO3_DB'];
     $database->debugOutput = true;
     $this->importDataSetFromFixture('update_mount_point_is_updating_the_mount_point_correctly.xml');
     // we expect that the index queue is empty before we start
     $this->assertEmptyIndexQueue();
     // @todo: detecting the sql error is a little bit ugly but it seems there is no other possibility right now
     ob_start();
     $this->recordMonitor->processCmdmap_postProcess('version', 'pages', 1, array('action' => 'swap'), $this->dataHandler);
     $output = trim(ob_get_contents());
     ob_end_clean();
     $this->assertNotContains('You have an error in your SQL syntax', $output, 'We expect no sql error during the update of a regular page root record');
     // we expect to have an index queue item now
     $this->assertNotEmptyIndexQueue();
 }