diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index 935ef45e4a7..d6717583e41 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -317,6 +317,20 @@ abstract class Connection implements \Serializable { } } + /** + * Get a fully qualified table name. + * + * @param string $table + * The name of the table in question. + * + * @return string + */ + public function getFullQualifiedTableName($table) { + $options = $this->getConnectionOptions(); + $prefix = $this->tablePrefix($table); + return $options['database'] . '.' . $prefix . $table; + } + /** * Prepares a query string and returns the prepared statement. * @@ -922,7 +936,7 @@ abstract class Connection implements \Serializable { // in question has already been accidentally committed. if (!isset($this->transactionLayers[$savepoint_name])) { throw new TransactionNoActiveException(); - } + } // We need to find the point we're rolling back to, all other savepoints // before are no longer needed. If we rolled back other active savepoints, diff --git a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php index 59e075c6dc9..06a026a4b1e 100644 --- a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php +++ b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php @@ -207,10 +207,7 @@ class Sql extends PluginBase implements MigrateIdMapInterface { * The fully qualified map table name. */ public function getQualifiedMapTableName() { - $database = $this->getDatabase(); - $options = $database->getConnectionOptions(); - $prefix = $database->tablePrefix($this->mapTableName); - return $options['database'] . '.' . $prefix . $this->mapTableName; + return $this->getDatabase()->getFullQualifiedTableName($this->mapTableName); } /**