After upgrade to Drupal 10.1.0 from 10.0.9, site is down and we get this on logs:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET SESSION TX_ISOLATION='READ-COMMITTED'' at line 1 in /PATH_TO_DRUPAL/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php on line 79 #0 /PATH_TO_DRUPAL/core/modules/mysql/src/Driver/Database/mysql/Connection.php(243): PDO->exec()
#1 /PATH_TO_DRUPAL/core/lib/Drupal/Core/Database/Database.php(451): Drupal\mysql\Driver\Database\mysql\Connection::open()
#2 /PATH_TO_DRUPAL/core/lib/Drupal/Core/Database/Database.php(194): Drupal\Core\Database\Database::openConnection()
#3 [internal function]: Drupal\Core\Database\Database::getConnection()
#4 /PATH_TO_DRUPAL/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(79): call_user_func_array()
#5 /PATH_TO_DRUPAL/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\PhpArrayContainer->createService()
#6 /PATH_TO_DRUPAL/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(212): Drupal\Component\DependencyInjection\Container->get()
#7 /PATH_TO_DRUPAL/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(62): Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters()
#8 /PATH_TO_DRUPAL/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\PhpArrayContainer->createService()
#9 /PATH_TO_DRUPAL/core/lib/Drupal/Core/DrupalKernel.php(554): Drupal\Component\DependencyInjection\Container->get()
#10 /PATH_TO_DRUPAL/core/lib/Drupal/Core/DrupalKernel.php(928): Drupal\Core\DrupalKernel->getCachedContainerDefinition()
#11 /PATH_TO_DRUPAL/core/lib/Drupal/Core/DrupalKernel.php(494): Drupal\Core\DrupalKernel->initializeContainer()
#12 /PATH_TO_DRUPAL/core/lib/Drupal/Core/DrupalKernel.php(702): Drupal\Core\DrupalKernel->boot()
#13 /PATH_TO_DRUPAL/index.php(19): Drupal\Core\DrupalKernel->handle()
#14 {main}

Comments

JOINSO created an issue. See original summary.

JOINSO’s picture

Solved.
In 10.0.9 this line in settings.php is allowed:
'isolation_level' => "SET SESSION tx_isolation='READ-COMMITTED'"
Now must be changeg to:
'init_commands' => [
'isolation_level' => 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
]

JOINSO’s picture

Assigned: Unassigned » JOINSO
JOINSO’s picture

Status: Active » Closed (works as designed)
froboy’s picture