From 5e5199aeb986adbba29e483e30023a5c10b091e2 Mon Sep 17 00:00:00 2001 From: Cyrill Schumacher Date: Sat, 26 Apr 2014 16:40:29 +1000 Subject: [PATCH] This bugfix inserts the schema name into the SHOW CREATE TABLE statement for method getCreateTable(). --- lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php index de85b40366bd7..eb9901041eac8 100644 --- a/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -1100,7 +1100,8 @@ public function getCreateTable($tableName, $schemaName = null) $cacheKey = $this->_getTableName($tableName, $schemaName); $ddl = $this->loadDdlCache($cacheKey, self::DDL_CREATE); if ($ddl === false) { - $sql = 'SHOW CREATE TABLE ' . $this->quoteIdentifier($tableName); + $schemaName = empty($schemaName) === true ? '' : $this->quoteIdentifier($schemaName) . '.'; + $sql = 'SHOW CREATE TABLE ' . $schemaName . $this->quoteIdentifier($tableName); $ddl = $this->rawFetchRow($sql, 'Create Table'); $this->saveDdlCache($cacheKey, self::DDL_CREATE, $ddl); }