By mondrake on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.2.x
Introduced in version:
11.2.0
Issue links:
Description:
SQL that executes data definition language (DDL) statements should be processed through the protected Schema::executeDdlStatement() method and no longer with the Connection::query() method. This allows Drupal’s transaction manager to handle gracefully autocommits that occur when a DDL statement is executed while a Drupal transaction stack is active, for databases that do not support transactional DDL (MySql, Oracle, ...).
Within the Schema class of a database driver,
Before
$this->connection->query('DROP TABLE {test}');
After
$this->executeDdlStatement('DROP TABLE {test}');
Impacts:
Module developers